@nebula.js/sn-distributionplot 0.27.1 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,990 +1,12 @@
1
1
  /*
2
- * @nebula.js/sn-distributionplot v0.27.1
2
+ * @nebula.js/sn-distributionplot v0.28.0
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import{useConstraints as e,useState as t,useLayout as r,useEffect as n,useAction as i,useRect as o,useOptions as a,usePromise as s,useApp as u,useAppLayout as l,useDeviceType as c,useTheme as p,useTranslator as d,useMemo as f,onTakeSnapshot as m,useImperativeHandle as h,useElement as g,useSelections as y,useStaleLayout as b,useModel as v,useRenderState as q}from"@nebula.js/stardust";import x from"jquery";import D from"picasso.js";import S from"picasso-plugin-q";import C from"picasso-plugin-hammer";import E from"hammerjs";import M from"extend";function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e){return(w="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 O(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function T(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){O(o,n,i,a,s,"next",e)}function s(e){O(o,n,i,a,s,"throw",e)}a(void 0)}))}}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function j(e,t,r){return t&&L(e.prototype,t),r&&L(e,r),e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||N(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 R(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||N(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 N(e,t){if(e){if("string"==typeof e)return H(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var F={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","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_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_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_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",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.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function B(e){e.component("event-area",{mounted:function(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:function(){return[]}})}var V={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render:function(e){var t=this.settings,r=t.settings,n=r.label,i=r.rtl,o=t.layout.dock,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left";break;case"right":r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left";break;case"center":r.width="".concat(t.width,"px"),r.height="".concat(t.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(o,this.rect),u="center"===o?n:"* ".concat(n),l="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:s,dir:a},e("span",{ref:this.alignToRef,style:l,title:u},u))}};var z={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 U(e){return(U="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e){return function(e){if(Array.isArray(e))return X(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 X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(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 X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $=Object.prototype.hasOwnProperty,J=Object.prototype.toString,Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,ee=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===J.call(e)},te=function(e){if(!e||"[object Object]"!==J.call(e))return!1;var t,r=$.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&$.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||$.call(e,t)},re=function(e,t){Z&&"__proto__"===t.name?Z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!$.call(e,t))return;if(Q)return Q(e,t).value}return e[t]},ie=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!=w(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(r in t)n=ne(s,r),s!==(i=ne(t,r))&&(c&&i&&(te(i)||(o=ee(i)))?(o?(o=!1,a=n&&ee(n)?n:[]):a=n&&te(n)?n:{},re(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&re(s,{name:r,newValue:i}));return s};function oe(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function ae(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function se(e,t,r,n,i){var o,a=i.byRow,s=i.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var u=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,u)}return{}}function ue(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var i=r[n.activeDimensionIndex];n=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function le(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function ce(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function pe(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function de(){}var fe=1/.7,me="\\s*([+-]?\\d+)\\s*",he="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ye=/^#([0-9a-f]{3,8})$/,be=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),ve=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgba\\("+[me,me,me,he]+"\\)$"),xe=new RegExp("^rgba\\("+[ge,ge,ge,he]+"\\)$"),De=new RegExp("^hsl\\("+[he,ge,ge]+"\\)$"),Se=new RegExp("^hsla\\("+[he,ge,ge,he]+"\\)$"),Ce={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 Ee(){return this.rgb().formatHex()}function Me(){return this.rgb().formatRgb()}function Ie(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ye.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ae(t):3===r?new ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?we(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?we(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=be.exec(e))?new ke(t[1],t[2],t[3],1):(t=ve.exec(e))?new ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=qe.exec(e))?we(t[1],t[2],t[3],t[4]):(t=xe.exec(e))?we(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=De.exec(e))?Pe(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Pe(t[1],t[2]/100,t[3]/100,t[4]):Ce.hasOwnProperty(e)?Ae(Ce[e]):"transparent"===e?new ke(NaN,NaN,NaN,0):null}function Ae(e){return new ke(e>>16&255,e>>8&255,255&e,1)}function we(e,t,r,n){return n<=0&&(e=t=r=NaN),new ke(e,t,r,n)}function Oe(e){return e instanceof de||(e=Ie(e)),e?new ke((e=e.rgb()).r,e.g,e.b,e.opacity):new ke}function Te(e,t,r,n){return 1===arguments.length?Oe(e):new ke(e,t,r,null==n?1:n)}function ke(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Le(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)}function je(){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 _e(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Pe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ne(e,t,r,n)}function Re(e){if(e instanceof Ne)return new Ne(e.h,e.s,e.l,e.opacity);if(e instanceof de||(e=Ie(e)),!e)return new Ne;if(e instanceof Ne)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ne(a,s,u,e.opacity)}function Ne(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function He(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function Fe(e){return function(){return e}}function Be(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Fe(isNaN(e)?t:e)}ce(de,Ie,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return Re(this).formatHsl()},formatRgb:Me,toString:Me}),ce(ke,Te,pe(de,{brighter:function(e){return e=null==e?fe:Math.pow(fe,e),new ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ke(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:Le,formatHex:Le,formatRgb:je,toString:je})),ce(Ne,(function(e,t,r,n){return 1===arguments.length?Re(e):new Ne(e,t,r,null==n?1:n)}),pe(de,{brighter:function(e){return e=null==e?fe:Math.pow(fe,e),new Ne(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ne(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ke(He(e>=240?e-240:e+120,i,n),He(e,i,n),He(e<120?e+240:e-120,i,n),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 Ve=function e(t){var r=function(e){return 1==(e=+e)?Be:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):Fe(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Te(e)).r,(t=Te(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Be(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),ze=/^class(-pyramid)?/,Ue=function(e,t,r,n){var i=void 0!==r.min?r.min:n.min(),o=void 0!==r.max?r.max:n.max(),a=i,s=o,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(G(c))),o=Math.max.apply(Math,[o].concat(G(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,r=e.max,n=e.limits,i=e.range,o=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(n[0]>r)a.push(t,r),o.push(i[0],i[0],i[0]);else{if(n[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){o.push(i[s]);break}}for(var u=0;u<n.length;u++)t<n[u]&&n[u]<r&&(a.push(n[u]),o.push(i[u]));if(n[n.length-1]<r)a.push(r),o.push(i[n.length]),o.push(i[n.length]);else{a.push(r);for(var l=0;l<n.length;l++)if(n[l]>r){o.push(i[l]),o.push(i[l]);break}}}else o.push(i[0]);return{min:t,max:r,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:p,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var d=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=Ve(m,h)(.5);l.range.push(g),l.domain.push(c[f]),f<c.length-1&&d[f+1]&&(l.range.push(p[f+1]),l.domain.push((c[f]+c[f+1])/2))}else l.range.push(p[f]),l.range.push(p[f+1]),l.domain.push(c[f]),l.domain.push(c[f]+Math.min(1e-6,(o-i)/1e6));l.range.push(p[p.length-1]),l.domain.push(o)}else l.domain=c,l.range=p;return l};function We(e,t,r,n,i){var o,a,s,u=0,l=[],c=(e-t)/(n+1);if(0===c)return 1;for(o=0;o<r.length;o+=1)a=.99*(r[o]-t),s=r[o]>e?Math.floor(e/c):r[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=n||u>=i?Math.max(u,n):We(e,t,r,n+1,i)}var Ke=function(e,t,r,n){var i,o,a=t.theme,s=t.hc,u=n.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(p=!("S"===(i=r.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=r.pic.extract({field:0,props:{num:{field:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,G(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===r.input.autoMinMax){if(l.min=r.input.measureMin,l.max=r.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!p)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,G(c)),l.max=Math.max.apply(Math,G(c))}if(r.input.measureScheme&&(l.palettes={quant:r.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];l.type=d&&ze.test(d.type)?"categorical":"continuous","categorical"===l.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,G(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===l.type){for(var f=p?We(l.max,l.min,c,1,o):o,m=(l.max-l.min)/f,h=[],g=0;g<f+1;g+=1)h.push(l.min+m*g);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",f),r=Math.max(1,Math.floor(t.length/f)),n=[],i=0;i<f;i+=1)n.push(t[i*r]);return[n[0]].concat(n,[n[n.length-1]])}}return l};function Ye(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function Ge(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Xe(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(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=r.indexOf(o);-1===s?(r.push(o),n.push(a.primary)):n[s]=a.primary,e[o]=null}else if(a){i.push(o);var u=r.indexOf(o);-1!==u&&(r.splice(u,1),n.splice(u,1))}}return{domain:r,range:n,exclude:i}}function $e(e,t,r,n){var i=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Ye:o,s=r.input.byMeasureDef||{activeMeasureIndex:0},u=a(r,s),l=Ke(0,{theme:n,hc:i},r,{f:u});if(l.invalid)return l;("expression"===s.type||s.activeMeasureIndex<0)&&(l.label=s.label,u&&"color.altLabel"===u.raw().labelExpRef&&(l.label=r.input.altLabel)),!l.label&&u&&(l.label=u.title());var c=s.activeMeasureIndex>=0?u:null;if(!c&&u&&void 0!==u.raw().matchMeasure&&u.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&ie(l,Ue(e,p.gradient,l,c))}else l.auxiliary=s;return l}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.getCDef,o=void 0===i?ue:i,a=n.getCByField,s=void 0===a?le:a,u=n.getPersistence,l=void 0===u?se:u,c=o(t,r),p=s(r,c),d=p?p.raw():{},f=r&&r.pic?r.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),ie(m,l(t,r,c,p,{byRow:ae,byElemNo:oe})),m}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var u=Ke(0,{hc:i,theme:o},r,{f:s});return u.invalid||(u.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var u=[],l=[];"measure"===r.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(n.primary):l.push(i)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=o?o.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:u.length?{domain:u,range:l}:void 0}}if("dimension"===s){var d=[],f=[];return i.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?f.push(n.primary):f.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.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,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(r,i){return function(e){var t,r=e.cm,n=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,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),Y(Y({},r),{},{mode:"constant",type:"constant",primary:n})}(r,o,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),o=i;return Y(Y({},r),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(i,a,n):null}({cm:e,input:r,defaults:n,index:i,pic:t.pic})})),function(e,t){var r,n,i,o=t.translator;if(Ge(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Xe(e.measureOverrides,e.explicit),Ge(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.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=Xe(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,r)):i}function Je(e){var t=Y({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={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?(n.auto=e,i):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,i):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,i):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,i):n.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ie(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=n.auto(e.layout);r.input=ie(!0,{},r.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=r.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(r.input=ie(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=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 n.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?n.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var o=r.pic.field(e.field);return Ue(i,n.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],u=n[1]?n[1].colorMap:null;if(s){var l=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=l}return u?function(e,t,r,n){var i=n.external,o=n.field,a=Y({},e);ie(a,oe(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,ie(a,oe(o)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ie(a,oe(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},i=0;i<e.length;i+=1)n[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 u=i.items[s],l=(u.text||u).label;n[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(n[l])))}return a.push(-3,-2),o.push(r.others),o.push(r.nil),a},range:function(){return o}}}(t.colors,r,a)),a}(a,u,i,{external:t,field:r.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===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=Y(Y({},e),n.getDataColorSpecials())),r.settings=ie(e,$e(this,r,t,e))}return r.settings}};return i}var Ze=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var i=t.coloring;i&&(n.measureGradient=i.gradient)}else if("dimension"===r){var o=t[0],a=t[1];o&&(n.legendDataPage=o),a&&(n.dimValsData=a.colorMap)}return n},Qe=function(e){throw e.isHandled=!0,e},et=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},tt=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},rt=function(e,t){var r=t.layout,n=t.model,i=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&i?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Qe):Promise.reject()};function nt(e){var t=e.hc,r=e.source,n=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:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function it(e){return function(t){return"object"===U(t.datum[e])?t.datum[e].value:void 0}}function ot(e){return"object"===U(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function at(e){return-3===e.datum.value}var st=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return r?"left":"right"},ut=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function lt(e,t){var r=e.styleReference,n=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:st(o,n,i)},show:"function"==typeof o.show?function(){return ut(o,u,a)}:ut(o,u,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(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ct(e,t,r){var n=[],i=[],o=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=lt(e,t);if(!n.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,u=e.settings,l=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={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 ie(!0,n,{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(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(o,"legend.label","color"):void 0,fontSize:p?p.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=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:f[r]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,u=t.theme,l=lt(e,t);return!!l.show&&ie(!0,l,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(n,"legend.label","color"):void 0,fontSize:u?u.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(n,"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,r&&r.navigationDisabled);return n.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=i&&null!==(n=i.interact)&&void 0!==n&&n.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=r.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,r)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===r||!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(n,"-cat")}))}},events:(e={},W(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),W(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),W(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:i,components:n}}var pt=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function dt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=Je(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return et(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return tt(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,i=t.app;return rt(e,{layout:r,model:n,app:i})}));return r.getSnapshotData=Ze,r}({resources:e}),r={},n={},i=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},o={config:function(i){if(r=Y({},i),n={},!r.key)throw new Error("Missing key");t.set(Y(Y({},e),r))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=Y(Y({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var r=i();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,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 r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,i=[];if(r&&r.palettes&&n){var o=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||n.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,u=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(G(u.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:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},u=i;if(r){var l={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(G((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(G((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=nt({hc:t,source:o,coloring:r}).data;if(r.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.domain,explicit:l,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[u]=m,c&&(s["".concat(u,"Legend")]=Y(Y({},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"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[u]=ie({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=ie({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=g}else if("measure"===r.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=y}}return s}({hc:r.hc,coloring:i(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,i=it(n),o=it("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,p=e.type;return a?function(e){return at(e)||o(e)?l:u}:r[t]?function(e){return at(e)?l:ot(e)||-2===i(e)&&"dimension"===n||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return at(e)||o(e)?l:ot(e)?u:c}:"color"===p?function(e){return at(e)||o(e)?l:ot(e)?u:i(e)||l}:null},s=a(t,n);if(t.measureOverrides){var u=it("".concat(n,"MeasureIdx")),l=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=u(e);return l[t]?l[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,u=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?(r={field:t,reduce:"first"},"color"===i.type&&(r.value=function(e){return"NaN"!==e.qNum?pt(e.qNum):e.qText&&Ie(e.qText)?e.qText:c})):"dimension"===i.mode?r=void 0!==i.field?i.field:n.qDimensionInfo.length-1:"measure"===i.mode&&(r=u);var p=W({},l,r);return n.qDimensionInfo.length>1&&(p["".concat(l,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(l,"MeasureIdx")]=u),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.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:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,o=e.viewState,a=e.chart,s=e.rtl,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return ct({eventName:t,key:n,rtl:s,viewState:o,chart:a,styleReference:l,settings:p,style:f},{legendProps:r.legendProps,scaleKey:r.key,coloring:i(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return o}var ft=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function mt(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(ft),o=n.some(ft),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Y(Y(Y({},e),t),{},{colorProps:Y(Y({},e.colorProps),t.colorProps||{})});return r}var gt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function yt(e){var t,r=e.qHyperCube.qDimensionInfo.some(gt),n=e.qHyperCube.qMeasureInfo.some(gt),i=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var bt=function(){};function vt(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}function qt(e,t,r){if(void 0!==e&&void 0!==t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}function xt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function St(e,t,r){return t&&Dt(e.prototype,t),r&&Dt(e,r),e}function Ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Et,Mt=(function(e){
7
+ import{useConstraints as e,useState as t,useLayout as n,useEffect as r,useAction as i,useRect as o,useOptions as a,usePromise as s,useApp as l,useAppLayout as u,useDeviceType as c,useTheme as p,useTranslator as d,useMemo as f,onTakeSnapshot as m,useImperativeHandle as h,useElement as g,useSelections as y,useStaleLayout as v,useModel as b,useRenderState as q}from"@nebula.js/stardust";import x from"jquery";import D from"picasso.js";import S from"picasso-plugin-q";import C from"picasso-plugin-hammer";import E from"hammerjs";import M from"extend";function A(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e){return(w="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 O(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 T(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){O(o,r,i,a,s,"next",e)}function s(e){O(o,r,i,a,s,"throw",e)}a(void 0)}))}}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(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&&L(e.prototype,t),n&&L(e,n),e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||H(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 N(e){return function(e){if(Array.isArray(e))return F(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(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 H(e,t){if(e){if("string"==typeof e)return F(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)?F(e,t):void 0}}function F(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 B={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","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_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_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_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",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.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function j(e){e.component("event-area",{mounted:function(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:function(){return[]}})}var z={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render:function(e){var t=this.settings,n=t.settings,r=n.label,i=n.rtl,o=t.layout.dock,a="top"!==o&&"bottom"!==o||!i?"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}(o,this.rect),l="center"===o?r:"* ".concat(r),u="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:s,dir:a},e("span",{ref:this.alignToRef,style:u,title:l},l))}};var V={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 U(e){return(U="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(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 Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G(e){return function(e){if(Array.isArray(e))return X(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 X(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)?X(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 X(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 $=Object.prototype.hasOwnProperty,J=Object.prototype.toString,Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,ee=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===J.call(e)},te=function(e){if(!e||"[object Object]"!==J.call(e))return!1;var t,n=$.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&$.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||$.call(e,t)},ne=function(e,t){Z&&"__proto__"===t.name?Z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},re=function(e,t){if("__proto__"===t){if(!$.call(e,t))return;if(Q)return Q(e,t).value}return e[t]},ie=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"!=w(s)&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=re(s,n),s!==(i=re(t,n))&&(c&&i&&(te(i)||(o=ee(i)))?(o?(o=!1,a=r&&ee(r)?r:[]):a=r&&te(r)?r:{},ne(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&ne(s,{name:n,newValue:i}));return s};function oe(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 ae(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 se(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 le(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 ue(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 ce(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function de(){}var fe=1/.7,me="\\s*([+-]?\\d+)\\s*",he="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ye=/^#([0-9a-f]{3,8})$/,ve=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),be=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgba\\("+[me,me,me,he]+"\\)$"),xe=new RegExp("^rgba\\("+[ge,ge,ge,he]+"\\)$"),De=new RegExp("^hsl\\("+[he,ge,ge]+"\\)$"),Se=new RegExp("^hsla\\("+[he,ge,ge,he]+"\\)$"),Ce={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 Ee(){return this.rgb().formatHex()}function Me(){return this.rgb().formatRgb()}function Ae(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ye.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ie(t):3===n?new ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?we(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?we(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=ve.exec(e))?new ke(t[1],t[2],t[3],1):(t=be.exec(e))?new ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=qe.exec(e))?we(t[1],t[2],t[3],t[4]):(t=xe.exec(e))?we(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=De.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Ce.hasOwnProperty(e)?Ie(Ce[e]):"transparent"===e?new ke(NaN,NaN,NaN,0):null}function Ie(e){return new ke(e>>16&255,e>>8&255,255&e,1)}function we(e,t,n,r){return r<=0&&(e=t=n=NaN),new ke(e,t,n,r)}function Oe(e){return e instanceof de||(e=Ae(e)),e?new ke((e=e.rgb()).r,e.g,e.b,e.opacity):new ke}function Te(e,t,n,r){return 1===arguments.length?Oe(e):new ke(e,t,n,null==r?1:r)}function ke(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Le(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function _e(){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 Pe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Re(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function Ne(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof de||(e=Ae(e)),!e)return new He;if(e instanceof He)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 He(a,s,l,e.opacity)}function He(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Fe(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 Be(e){return function(){return e}}function je(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Be(isNaN(e)?t:e)}ce(de,Ae,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return Ne(this).formatHsl()},formatRgb:Me,toString:Me}),ce(ke,Te,pe(de,{brighter:function(e){return e=null==e?fe:Math.pow(fe,e),new ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ke(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:Le,formatHex:Le,formatRgb:_e,toString:_e})),ce(He,(function(e,t,n,r){return 1===arguments.length?Ne(e):new He(e,t,n,null==r?1:r)}),pe(de,{brighter:function(e){return e=null==e?fe:Math.pow(fe,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(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 ke(Fe(e>=240?e-240:e+120,i,r),Fe(e,i,r),Fe(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 ze=function e(t){var n=function(e){return 1==(e=+e)?je: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):Be(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Te(e)).r,(t=Te(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=je(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),Ve=/^class(-pyramid)?/,Ue=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,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(G(c))),o=Math.max.apply(Math,[o].concat(G(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:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=ze(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&d[f+1]&&(u.range.push(p[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(p[f]),u.range.push(p[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(o-i)/1e6));u.range.push(p[p.length-1]),u.domain.push(o)}else u.domain=c,u.range=p;return u};function We(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):We(e,t,n,r+1,i)}var Ke=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=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("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,G(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&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,G(c)),u.max=Math.max.apply(Math,G(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=d&&Ve.test(d.type)?"categorical":"continuous","categorical"===u.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,G(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?We(u.max,u.min,c,1,o):o,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),n=Math.max(1,Math.floor(t.length/f)),r=[],i=0;i<f;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Ye(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 Ge(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Xe(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 $e(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?Ye:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Ke(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 p=c.raw().coloring;p&&p.gradient&&ie(u,Ue(e,p.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?le:i,a=r.getCByField,s=void 0===a?ue:a,l=r.getPersistence,u=void 0===l?se:l,c=o(t,n),p=s(n,c),d=p?p.raw():{},f=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.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&&p&&(m.label=p.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),ie(m,u(t,n,c,p,{byRow:ae,byElemNo:oe})),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=Ke(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,p=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&p&&(c={categorical:p.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 d=[],f=[];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?f.push(r.primary):f.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}: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)),Y(Y({},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 Y(Y({},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(Ge(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=Xe(e.measureOverrides,e.explicit),Ge(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=Xe(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 Je(e){var t=Y({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(ie(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=ie(!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=ie(!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 Ue(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=Y({},e);ie(a,oe(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,ie(a,oe(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ie(a,oe(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=Y(Y({},e),r.getDataColorSpecials())),n.settings=ie(e,$e(this,n,t,e))}return n.settings}};return i}var Ze=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},Qe=function(e){throw e.isHandled=!0,e},et=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()},tt=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()},nt=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(Qe):Promise.reject()};function rt(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 it(e){return function(t){return"object"===U(t.datum[e])?t.datum[e].value:void 0}}function ot(e){return"object"===U(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function at(e){return-3===e.datum.value}var st=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"},lt=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 ut(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:st(o,r,i)},show:"function"==typeof o.show?function(){return lt(o,l,a)}:lt(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 ct(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=ut(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,p=t.theme,d=t.scales,f={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 ie(!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:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(o,"legend.label","color"):void 0,fontSize:p?p.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:p?p.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:f[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=ut(e,t);return!!u.show&&ie(!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={},W(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),W(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),W(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 pt=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function dt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=Je(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 et(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return tt(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return nt(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=Ze,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=Y({},i),r={},!n.key)throw new Error("Missing key");t.set(Y(Y({},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=Y(Y({},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(G(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(G((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(G((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,p=rt({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,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")]=Y(Y({},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]=ie({},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")]=ie({},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=it(r),o=it("".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,p=e.type;return a?function(e){return at(e)||o(e)?u:l}:n[t]?function(e){return at(e)?u:ot(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 at(e)||o(e)?u:ot(e)?l:c}:"color"===p?function(e){return at(e)||o(e)?u:ot(e)?l:i(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=it("".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?pt(e.qNum):e.qText&&Ae(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 p=W({},u,n);return r.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({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,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return ct({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:u,settings:p,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return o}var ft=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function mt(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(ft),o=r.some(ft),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Y(Y(Y({},e),t),{},{colorProps:Y(Y({},e.colorProps),t.colorProps||{})});return n}var gt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function yt(e){var t,n=e.qHyperCube.qDimensionInfo.some(gt),r=e.qHyperCube.qMeasureInfo.some(gt),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 vt=function(){};function bt(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 qt(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 xt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(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 St(e,t,n){return t&&Dt(e.prototype,t),n&&Dt(e,n),e}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Et,Mt=(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 r,n,i,o,a,s,u,l,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),q=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[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(;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],u=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%u,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%u)&&v<d-u&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+q}}(Et={exports:{}}),Et.exports);function It(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var At={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"},wt=/%$/,Ot=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Tt=/^\(oct\)/i,kt=/^\(dec\)/i,Lt=/^\(hex\)/i,jt=/^\(bin\)/i,_t=/^\(rom\)/i,Pt=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Rt=/#|0/g;function Nt(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function Ht(e,t,r){var n=It(e);return r?n:new RegExp(n||"",t)}function Ft(e,t,r){var n,i,o,a,s,u,l,c,p,d,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(f=r)&&(f=It(f)),d&&(d=It(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(o=(o=m.match(p))?o[0]:"")?m.substr(0,m.indexOf(o)):m,s=o?m.substring(m.indexOf(o)+o.length):"",o||(o=m?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),u=t,t=/,/.test(r)?"¤":",",u&&(o=o.replace(Ht(u,"g"),t)),l=r,r=".",l&&(o=o.replace(Ht(l,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(l);g[1]&&(h=g[1].match(Rt)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=wt.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Ht(t,null,!0),"|").concat(Ht(r,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=r,e.temp=c}!function(){function e(t,r,n,i,o){xt(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return At;var r={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])})),r}(t,this.patternSeparator),this.prepare()}St(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,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],Pt.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Pt.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Pt.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Ft(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Ft(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Ft(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,u,l,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);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,r){var n;return Ot.test(t)?e=Nt(e,Number(/\d{2}/.exec(t)[0]),t,r):Tt.test(t)?e=Nt(e,8,t,r):kt.test(t)?e=Nt(e,10,t,r):Lt.test(t)?e=Nt(e,16,t,r):jt.test(t)?e=Nt(e,2,t,r):_t.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){for(var r,n="",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(r=0;r<a.length;r++)if(a[r]<=i){n+=s[r],i-=a[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+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,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(y<0&&y-r<=c.maxPrecision?h=y:m<=r&&!(y>0&&-r<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var b=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),v=u.split(o)[0];if(e=Mt(v+=o,b)||"0",l){var q=Math.max(0,Math.min(14,l.length)),x=l.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(s=D.length;s<x;s++)D+="0";D&&(e+=o+D)}else 0===b&&(i=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=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(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)u+="#";e=Mt(u,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+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var Bt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zt=["January","February","March","April","May","June","July","August","September","October","November","December"],Ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wt(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Kt(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){xt(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bt,qDayNames:Vt,qLongMonthNames:zt,qMonthNames:Ut}),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(),r||(r=(Ct(i={},"T",o.qTimeFmt||"hh:mm:ss"),Ct(i,"D",o.qDateFmt||"YYYY-MM-DD"),Ct(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}St(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 r,n,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(n=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:o,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*Kt(t),n=60*Kt(r),i=60*Kt(n),o=1e3*Kt(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}(e),i=n.d,o=n.h,a=n.m,s=n.s,u=n.f,l=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=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)&&(l=r?r.getDay()-1:0)<0&&(l=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}(e,t));var u=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Wt("".concat(t.year).slice(-2),2),YYY:Wt("".concat(t.year).slice(-3),3),def:function(e){return Wt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Wt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Wt("".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 Wt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Wt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Wt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Wt("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var i=0;i<n;i++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r.slice(0,e.length)}}}}(this,r),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var p=new RegExp(l.join("|"),"g");return t.replace(p,(function(e){var t,r,n;for(r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in u[r])if(i===e||i.toLowerCase()===e){void 0===(n=u[r][i])&&(n=u[r][i.toLowerCase()]);break}return void 0===n&&(n=u[r].def),"function"==typeof n&&(n=n(e)),n}))}}])}();var Yt=/xyz/.test((function(){}))?/\b_super\b/:/.*/,Gt=function(){};function Xt(e,t,r,n){0===arguments.length?this.set(0,0,0,0):this.set(e,t,r,n)}Gt.extend=function e(t,r){var n=this.prototype;"string"!=typeof t&&(r=t,t="Class");var i=Object.create(this.prototype);for(var o in r)i[o]="function"==typeof r[o]&&"function"==typeof n[o]&&Yt.test(r[o])?function(e,t){return function(){var r=this._super;this._super=n[e];var i=t.apply(this,arguments);return this._super=r,i}}(o,r[o]):r[o];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");var a=new Function("return (function ".concat(t,"(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });"))();return a.prototype=i,a.prototype.constructor=a,a.extend=e,a},Xt.prototype={toString:function(){return"".concat(this.x," ").concat(this.y," ").concat(this.width," ").concat(this.height)},clone:function(){return new Xt(this.x,this.y,this.width,this.height)},set:function(e,t,r,n){r>=0?(this.x=e,this.width=r):(this.x=e+r,this.width=-r),n>=0?(this.y=t,this.height=n):(this.y=t+n,this.height=-n)},setLTRB:function(e,t,r,n){e<=r?(this.x=e,this.width=r-e):(this.x=r,this.width=e-r),t<=n?(this.y=t,this.height=n-t):(this.y=n,this.height=t-n)},equal:function(e){return e&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},combineWith:function(e){var t=Math.max(e.getRight(),this.getRight()),r=Math.max(e.getBottom(),this.getBottom()),n=Math.min(e.x,this.x),i=Math.min(e.y,this.y);return new Xt(n,i,Math.max(0,t-n),Math.max(0,r-i))},intersectsWith:function(e){return!!e&&(this.x<=e.getRight()&&e.x<=this.getRight()&&this.y<=e.getBottom()&&e.y<=this.getBottom())},intersectsRect:function(e){return this.intersectsWith(e)},intersection:function(e,t){if(this.intersectsWith(e)){var r=Math.max(this.x,e.x),n=Math.max(this.y,e.y);return new Xt(r,n,Math.min(this.getRight(),e.getRight())-r,Math.min(this.getBottom(),e.getBottom())-n)}return t?null:new Xt(this.x,this.y,this.width,this.height)},union:function(e){var t=Math.min(this.x,e.x),r=Math.min(this.y,e.y);return new Xt(t,r,Math.max(this.getRight(),e.getRight())-t,Math.max(this.getBottom(),e.getBottom())-r)},pointInside:function(e,t){return e>=this.x&&e<=this.getRight()&&t>=this.y&&t<=this.getBottom()},rectInside:function(e){var t,r=e.getPoints();for(t=0;t<4;t++)if(!this.pointInside(r[t].x,r[t].y))return!1;return!0},getPoints:function(){var e=[];return e.push({x:this.x,y:this.y}),e.push({x:this.getRight(),y:this.y}),e.push({x:this.getRight(),y:this.getBottom()}),e.push({x:this.x,y:this.getBottom()}),e},getRight:function(){return this.x+this.width},getBottom:function(){return this.y+this.height},getCenterPoint:function(){return{x:this.x+this.width/2,y:this.y+this.height/2}},getBoundingRect:function(){return this},scale:function(e){var t=e-1,r=t*this.width/2,n=t*this.height/2;this.x-=r,this.y-=n,this.width*=e,this.height*=e},hasNaN:function(){return Number.isNaN(+this.x)||Number.isNaN(+this.y)||Number.isNaN(+this.width)||Number.isNaN(+this.height)}};var $t,Jt=new Xt(0,0,0,0),Zt=new Xt(0,0,0,0),Qt=Gt.extend("CubeSlicer",{init:function(){this.pages=[]},get:function(e){var t=this;return e.map((function(e){return t.getPage(e)}))},getPage:function(e){var t,r,n,i=[];for(r=0;r<this.pages.length;r++)if(t=this.pages[r].qArea,Jt.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Zt.set(t.qLeft,t.qTop,t.qWidth,t.qHeight),n=Zt.intersection(Jt,!0),i.push({coverage:n?n.clone():new Xt(0,0,0,0),idx:r}),t.qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[r]);return i.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),i[0].coverage.height>0&&i[0].coverage.width>0?this._extract(e,this.pages[i[0].idx]):{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qMatrix:[]}},destroy:function(){this.clear()},isEmpty:function(){return!(this.pages&&this.pages[0]&&this.pages[0].qArea.qHeight&&this.pages[0].qArea.qWidth)},clear:function(){this.pages=[]},store:function(e){this.pages=e},containsArea:function(e){for(var t,r=0;r<this.pages.length;r++)if((t=this.pages[r].qArea).qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return!0;return!1},contains:function(e){var t=this;return!(!this.pages||!this.pages.length)&&0===e.filter((function(e){return!t.containsArea(e)})).length},_extract:function(e,t){Jt.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Zt.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var r=Jt.intersection(Zt,!0);if(!r)return{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qMatrix:[]};var n=Math.max(0,e.qTop-t.qArea.qTop),i=Math.max(0,e.qLeft-t.qArea.qLeft),o=t.qMatrix.slice(n,n+r.height).map((function(e){return e.slice(i,i+r.width)}));return{qArea:{qTop:r.y,qLeft:r.x,qWidth:r.width,qHeight:r.height},qMatrix:o}}});function er(e,t){var r,n={};for(r in e)"qSubNodes"!==r&&e.hasOwnProperty(r)&&(n[r]=e[r]);return t.push(n),n}function tr(e,t,r){var n,i,o,a=[],s=[],u=0,l=0;for(r.length&&(u=r[0].qUp||0,l=r[r.length-1].qDown||0),n=0;n<r.length;++n)if((i=r[n]).qSubNodes.length>0&&(s=tr(e,t,i.qSubNodes)),o=null,(0===i.qSubNodes.length&&$t>=e&&$t<=e+t||s.length>0)&&(void 0!==(o=er(i,a)).qUp&&1===a.length&&(o.qUp=u+n),o.qSubNodes=s),0===i.qSubNodes.length&&$t++,$t===e+t){o&&void 0!==o.qDown&&(o.qDown=l+(r.length-1-n));break}return a}function rr(e,t,r){return $t=0,tr(e,t,r)}var nr=new Xt(0,0,0,0),ir=new Xt(0,0,0,0),or=Qt.extend("PivotCubeSlicer",{init:function(){this._super(),this.requestedAreas=[]},getPage:function(e){var t,r,n,i=[];for(r=0;r<this.pages.length;r++)if(t=this.pages[r].qArea,nr.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),ir.set(t.qLeft,t.qTop,t.qWidth,t.qHeight),n=ir.intersection(nr,!0),i.push({coverage:n?n.clone():new Xt(0,0,0,0),idx:r}),t.qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[r]);return i.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),i[0].coverage.height>0&&i[0].coverage.width>0?this._extract(e,this.pages[i[0].idx]):{qLeft:[],qTop:[],qData:[],qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0}}},_extract:function(e,t){nr.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),ir.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var r=nr.intersection(ir,!0);if(!r)return{qLeft:[],qTop:[],qData:[],qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0}};var n=Math.max(0,e.qTop-t.qArea.qTop),i=Math.max(0,e.qLeft-t.qArea.qLeft),o=t.qData.slice(n,n+r.height).map((function(e){return e.slice(i,i+r.width)}));return{qLeft:rr(n,r.height,t.qLeft),qTop:rr(i,r.width,t.qTop),qData:o,qArea:{qTop:r.y,qLeft:r.x,qWidth:r.width,qHeight:r.height}}}});function ar(e){if("pivot-table"===e.visualization)this.responseProperty="qPivotDataPages",this.slicer=new or;else{if("table"!==e.visualization)return;this.slicer=new Qt}var t=e.snapshotData.object.origDataPages;t||(t=e.qHyperCube[this.responseProperty]),this.slicer.store(t.filter((function(e){return e})))}var sr=function(){function e(t,r,n){k(this,e),this.layout=t,this.dataPath=r,this.responseProperty=n,ar.call(this,t)}return j(e,[{key:"getData",value:function(e){!function(e,t,r,n){if(e){t.snapshotData.object.origDataPages||(t.snapshotData.object.origDataPages=t.qHyperCube[n]);for(var i=0;i<r.length;i++)r[i].qHeight=Math.min(t.qHyperCube.qSize.qcy,r[i].qHeight),r[i].qTop=t.snapshotData.object.origDataPages[i].qArea.qTop;t.qHyperCube[n]=e.get(r)}}(this.slicer,this.layout,e,this.responseProperty);var t=vt(this.layout,"".concat(this.dataPath,".").concat(this.responseProperty));return Promise.resolve(t)}},{key:"setCacheOptions",value:function(){}},{key:"updateCache",value:function(){}}]),e}(),ur={version:"0.27.1",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"K",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},color:{box:{paletteColor:{index:-1,color:"#e6e6e6"}},expressionLabel:"",point:{auto:!0,mode:"primary",useBaseColors:"off",expressionIsColor:!0}},dataPoint:{bubbleScales:100,displacement:"none"},dimensionAxis:{dock:"near",label:"auto",show:"all"},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},gridlines:{auto:!0,spacing:2},orientation:"horizontal",presentation:{visibleComponents:"points_box"},refLine:{refLines:[]},sorting:{autoSort:!0},showTitles:!0,subtitle:"",title:"",footnote:""};function lr(e){2===e.qHyperCubeDef.qInterColumnSortOrder.length?e.qHyperCubeDef.qInterColumnSortOrder=[1,0]:3===e.qHyperCubeDef.qInterColumnSortOrder.length&&(e.qHyperCubeDef.qInterColumnSortOrder=[1,2,0])}function cr(e){e.qHyperCubeDef.qDimensions.length>1&&e.color&&(e.color.point.persistent=!0)}function pr(e){var t=e.translator;return{path:"/qHyperCubeDef",dimensions:{min:1,max:2,description:function(e,r){var n;return n=0===r?"Visualizations.Descriptions.Point":"horizontal"===e.orientation?"properties.yAxis":"properties.xAxis",t.get(n)},added:function(e,t){lr(t),cr(t)},moved:function(e,t){lr(t),cr(t)},removed:function(e,t){lr(t),cr(t)}},measures:{min:1,max:1,description:function(e){var r="horizontal"===e.orientation?"properties.xAxis":"properties.yAxis";return t.get(r)}}}}var dr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mr={exports:{}};window;var hr=fr(mr.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===w(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s="./index.js")}({"../node_modules/extend/index.js":
10
- /*!***************************************!*\
11
- !*** ../node_modules/extend/index.js ***!
12
- \***************************************/
13
- /*! no static exports found */
14
- function(e,t,r){var n=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)},u=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.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(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!==w(p)&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=c(p,r),p!==(i=c(t,r))&&(m&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&u(n)?n:{},l(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&l(p,{name:r,newValue:i}));return p}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
15
- /*!*************************************************************!*\
16
- !*** ../node_modules/qlik-modifiers/dist/qlik-modifiers.js ***!
17
- \*************************************************************/
18
- /*! no static exports found */
19
- function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==w(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=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)},u=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.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(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=w(p)&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=c(p,r),p!==(i=c(t,r))&&(m&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&u(n)?n:{},l(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&l(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o={setValue:function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},getValue:function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function u(e){return a+e+s}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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 f(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,u=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=g(l(n[0],i),f(0));return"".concat(a,"({1<").concat(c,">}").concat(u,")")}if(n&&2===n.length){var p=l(n[0],i),d=l(n[1],i),m=f(0),h=f(1),y=g(p,m),b=g(d,h);return"".concat(a,"({1<").concat(y,",").concat(b,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function b(e){return"".concat(e,"(")}function v(){return")"}function q(e){var t=e.properties,r=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(r,"qHyperCube.qDimensionInfo",[])).length}var x={isFullRange:c,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(d(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=f(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var p=f(0),m=f(1);return"If(Count(".concat(p,") * Count(").concat(m,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!c(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:h,getAboveComp:function(e,t,r,n){return m(e,t)+r+h(n)},getFunctionPrefix:b,getFunctionSuffix:v,getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===q({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=f(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:d,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(a);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+a.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:l,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=q({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(a),r=e.indexOf(s);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:f,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(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"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}var C=i.a.bind(null,!0),E={},M=Array.isArray;function I(e){return null!=e&&!Array.isArray(e)&&"object"===S(e)}function A(e){return void 0===e}function O(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=A(e[r||t])?o:e[t],e=e[r||t]}})),e}function k(e,t){var r=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){k(e[n],t[n])||(r=!1)})),r);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!k(e[n],t[n]))return!1;return!0}return e===t}E.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);k(o,a)||O(t,i)||(A(a)?n.push({op:"add",path:s,value:o}):I(o)&&I(a)?n=n.concat(E.generate(a,o,s)):M(o)&&M(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&A(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(k(t,i))return n;if(!A(t[0])&&A(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(E.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(n.push({op:"move",path:"".concat(r,"/").concat(u),from:"".concat(r,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){A(t[i])&&!O(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=T(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?n[i]:n[+i]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(M(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(M(o)&&M(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,D(u))}else if(I(o)&&I(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!O(r,e)&&delete r[e]})),C(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var l=T(e,t.from);M(n)?n.splice(+i,0,l.splice(+a,1)[0]):(n[i]=l[a],delete l[a])}else"remove"===t.op&&(M(n)?n.splice(+i,1):delete n[i])}))},E.clone=function(e){return C({},e)},E.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},E.updateObject=function(e,t){Object.keys(e).length?E.apply(e,E.generate(e,t)):C(e,t)};var L=E,j={saveSoftProperties:function(e,t,r){if(!e)return Promise.resolve();var n=L.generate(t,r);return i()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()}},_="accumulation";function P(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function R(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===_)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var N={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},H={translationKey:"properties.modifier.accumulation",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=x.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=x.getNumStepComp(r,u),d=x.getAboveComp(r,u,c,p),f=x.getRangeComp("RangeSum",d);if(x.needDimension({modifier:r,properties:n,layout:i})){var m=x.getDimComp(l,1),h=x.getDimComp(l,0),g=x.getAggrComp(f,m,h);f=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:l,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,N)},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(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(R(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(R(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(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=P(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=P(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(_))return!1;var o=P(t,e);return o&&!o.disabled}}}},F="movingAverage";function B(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===F)return r[n]}function V(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===F)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},U={translationKey:"properties.modifier.movingAverage",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,u=e.dimensionAndFieldList;if(!n)return r;var l=s;void 0===l&&(l=x.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=x.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:p}),f=x.getNumStepComp(n,l),m=x.getAboveComp(n,l,d,f);if(n.nullSuppression)t=x.getRangeComp("RangeAvg",m);else{var h=x.getRangeComp("RangeSum",m),g=function(e,t){var r=x.getRowNoComp(e,t);if(!x.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,l);t="".concat(h," / ").concat(g)}var y=t;if(x.needDimension({modifier:n,properties:i,layout:a})){var b=x.getDimComp(c,1),v=x.getDimComp(c,0),q=x.getAggrComp(y,b,v);y=n.showExcludedValues?x.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:u,funcComp:"Only",valueComp:q}):q}return y},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,z)},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!x.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 r=B(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=B(t,e);return r&&!r.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 x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(F))return!1;var o=B(t,e);return o&&!o.disabled}}}},W="difference";function K(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function Y(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},X={translationKey:"properties.modifier.difference",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=x.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=x.getAboveComp(r,u,c),d="".concat(c," - ").concat(p);if(x.needDimension({modifier:r,properties:n,layout:i})){var f=x.getDimComp(l,1),m=x.getDimComp(l,0),h=x.getAggrComp(d,f,m);d=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:l,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Y(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(Y(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(Y(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=K(t,e);return o&&!o.disabled}}}},$={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},J="normalization";function Z(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===J)return r[n]}function Q(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===J)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ee(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function te(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:$.DIMENSION.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:$.DIMENSION.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:$.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,r){if(e<2){var n=ee(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=ee(t,1);t.splice(n,1)}return t}(Z(e,n).selectionScope,o)}function re(e,t,r){var n=[{value:$.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:$.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:$.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=ee(t,0);t.splice(n,1)}return t}(Z(e,r).dimensionalScope,n)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:$.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:$.SELECTION.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,r){return 1===e?"{$<".concat(x.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,r){return 0===e&&t>1?"<".concat(x.getDimDefWithWrapper(r),">"):""}function ue(e,t,r,n,i,o,a){var s=ie(t),u=oe(t,r,n),l=""===s&&""===u?"":s||u,c=ae(i,o),p=se(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=x.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(p," Aggr(").concat(l," ").concat(e,", ").concat(d,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=x.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return ue(c,p,r.field,r.value,d,u,r.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!x.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:$.SELECTION.DISREGARD_SELECTION,options:function(r){return re(r,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,r){return r.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===$.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===$.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:$.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return te(r,n,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,r){return(Z(t,e).dimensionalScope||0)===$.DIMENSION.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se};function ce(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},r=o.getValue(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o.getValue(e,r)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(n[t]){var i=u(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,r=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},r.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}var pe={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"),r=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},fe=de;function me(e){return(me="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}var he={accumulation:H,movingAverage:U,difference:X,normalization:le},ge=(t.default={modifiers:he,apply:ye,applyModifiers:be,cleanUpMeasure:ve,destroy:function(e){e&&ge[e.id]&&ge[e.id].masterItemSubscriber&&(ge[e.id].masterItemSubscriber&&ge[e.id].masterItemSubscriber.unsubscribe(),delete ge[e.id])},hasActiveModifiers:qe,getActiveModifier:xe,initBase:fe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return he[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return he[e]&&he[e].isApplicable({properties:r,layout:n})}))},measureBase:pe,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ce(e);Te({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Pe({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:De},{});function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,a=void 0!==n&&n,s=e.masterItem;ge[t.id]=ge[t.id]||{isFirstTime:!0};var u=ge[t.id].isFirstTime;if(ge[t.id].isFirstTime=!1,r&&"object"===me(r))return be({model:t,properties:r});var l=t?t.layout:void 0,c=o.getValue(l,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var p=o.getValue(l,"qHyperCube.qMeasureInfo"),d=ge[t.id].lastReloadTime;if(ge[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),qe({measures:p,layout:l})){var f=function(e){var t=e.measures,r=e.layout,n=e.model,i=e.lastReloadTime;return o.getValue(n,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Oe({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:l,model:t,lastReloadTime:d});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Te({modifiers:Ce(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:l,masterItem:s,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Me(r);var n=Re(r);return ke({model:t}).then((function(i){return Le({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;Se(t).forEach((function(e){return function(e){var t=e.measure,r=e.properties;if(Oe({measure:t,properties:r})){var n=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===me(e)&&!e.disabled){if(n++,"object"!==me(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=he[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ae(t)&&x.simplifyExpression(t.qDef.base.qDef)!==x.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),be({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===me(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Re(r);return Ne({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return Se(r).forEach((function(e){return ve(e)})),_e({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function be(e){var t=e.model,r=e.oldProperties,n=e.properties,a=e.measures,s=e.runUpdateIfChange,u=void 0!==s&&s,l=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=u?i()(!0,{},n):n),Me(n);var d=Re(n);return Ne({model:t,libraryIds:d,masterItem:l}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=Se(r)),!t.length)return Promise.resolve();if(!qe({measures:t,properties:r}))return t.forEach((function(e){return ve(e)})),Promise.resolve();var u=a?void 0:Re(r);return ke({model:n,dimensionAndFieldList:s}).then((function(e){return Le({libraryIds:u,model:n,libraryItemsProps:a}).then((function(n){t.forEach((function(t){Te({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;fe.isValid(t)||fe.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===me(e)&&!e.disabled){if(s++,"object"!==me(he[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)");he[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,r=e.modifier,n=e.libraryId,o=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,u=a[n],l=u.qMeasure.qDef,c=he[r.type].generateExpression({expression:l,modifier:r,properties:o,dimensionAndFieldList:s});r.outputExpression=c,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||u.qMeasure.qLabel)&&(t.qDef.qLabel=u.qMeasure.qLabel),(t.qDef.qLabelExpression||u.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=u.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&u.qMeasure.qNumFormat&&(t.qDef.qNumFormat=u.qMeasure.qNumFormat,t.qDef.isCustomFormatted=u.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=u.qMeasure.coloring,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:r,libraryItemsProps:n,dimensionAndFieldList:a}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof he[r.type].updateModifier&&he[r.type].updateModifier(r,n.qHyperCubeDef);var a=pe.getExpression(t),s=he[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||De(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&De(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:r,libraryItemsProps:n,dimensionAndFieldList:e}),Ie(t)):ve(t)}))}))}))}({measures:a,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return u?_e({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ve(e){!function(e){var t=Ce(e);return Array.isArray(t)&&t.some((function(e){return"object"===me(e)&&!e.disabled&&!he[e.type]}))}(e)?fe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ie(e)}function qe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({modifiers:Ce(e),properties:r,layout:n})}))}function xe(e){var t=Ce(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(he[n.type]&&!n.disabled)return n}}function De(e){var t=xe(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 Ce(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ee(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function Me(e){Se(e).forEach((function(e){return function(e){var t=xe(e);t&&(void 0!==t.outputExpression&&Ee(t)!==e.qDef.qDef?delete e.qDef.base:!fe.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Ie(e){var t=Ce(e);Array.isArray(t)&&t.forEach((function(t){"object"===me(t)&&(t.disabled||!he[t.type]&&Ee(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ae(e){return e.base||e.qDef&&e.qDef.base}function we(e){var t=Ae(e);return e.qLibraryId||t&&t.qLibraryId}function Oe(e){var t=e.measure,r=e.properties,n=e.layout;return!we(t)&&Te({modifiers:Ce(t),properties:r,layout:n})}function Te(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})),i[e.type])}))}function ke(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));n.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return i}))}function Le(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=r.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 je(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function _e(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),je)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qMeasures"),je)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),je)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),je);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):j.saveSoftProperties(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})}))}function Re(e){var t=Se(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=Ce(t);if(Te({modifiers:n,properties:e})){var o=we(t);o&&r.push(o),i=i||Pe({modifiers:n,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Ne(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ge[t.id].masterItemSubscriber=ge[t.id].masterItemSubscriber||ce({model:t,callback:function(e){return ye({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ge[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
20
- /*!***********************************************!*\
21
- !*** ./axis-chart/export-properties/index.js ***!
22
- \***********************************************/
23
- /*! exports provided: default */
24
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
25
- /*! ../../quarantine/quarantine-property */
26
- "./quarantine/quarantine-property.js"),i=r(
27
- /*! ../../color-chart */
28
- "./color-chart/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,u=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),l=u.properties;return s?(Object(n.default)(l,"measureAxis.min","supportedAutoMinMax"),Object(n.default)(l,"measureAxis.max","supportedAutoMinMax")):(Object(n.default)(l,"measureAxis.min","unsupportedAutoMinMax"),Object(n.default)(l,"measureAxis.max","unsupportedAutoMinMax")),u}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
29
- /*!***********************************************************************!*\
30
- !*** ./axis-chart/import-properties/helpers/get-measures-per-axis.js ***!
31
- \***********************************************************************/
32
- /*! exports provided: default */
33
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=["bar","marker","line"];function i(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,i=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),n.includes(i)&&t[o].type[i]++,t[o].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
34
- /*!*********************************************************************!*\
35
- !*** ./axis-chart/import-properties/helpers/handle-auto-min-max.js ***!
36
- \*********************************************************************/
37
- /*! exports provided: default */
38
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
39
- /*! extend */
40
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
41
- /*! ../../../quarantine/unquarantine-property */
42
- "./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(o.default)(r,"unsupportedAutoMinMax")||i()(r.measureAxis,t.measureAxis):Object(o.default)(r,"supportedAutoMinMax")||i()(r.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
43
- /*!**********************************************************************!*\
44
- !*** ./axis-chart/import-properties/helpers/handle-measures-axis.js ***!
45
- \**********************************************************************/
46
- /*! exports provided: default */
47
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
48
- /*! extend */
49
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
50
- /*! ./should-update-measure-axis */
51
- "./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=r(
52
- /*! ./get-measures-per-axis */
53
- "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,r=e.exportFormat,n=e.initialProperties,s=e.properties,u=e.measureType,l=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:r,initialProperties:n})){var p=Object(a.default)(l);p.length?(u&&(t=p.filter((function(e){return e.type[u]>0})).sort((function(e,t){return t.type[u]-e.type[u]}))),t&&t.length||(t=p.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,r.properties.measureAxes[t[0].axis])):i()(c,r.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
54
- /*!*******************************************************!*\
55
- !*** ./axis-chart/import-properties/helpers/index.js ***!
56
- \*******************************************************/
57
- /*! exports provided: default */
58
- function(e,t,r){r.r(t);var n=r(
59
- /*! ./handle-auto-min-max */
60
- "./axis-chart/import-properties/helpers/handle-auto-min-max.js"),i=r(
61
- /*! ./handle-measures-axis */
62
- "./axis-chart/import-properties/helpers/handle-measures-axis.js"),o=r(
63
- /*! ./set-inter-column-sort-order */
64
- "./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:n.default,handleMeasuresAxis:i.default,setInterColumnSortOrder:o.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
65
- /*!*****************************************************************************!*\
66
- !*** ./axis-chart/import-properties/helpers/set-inter-column-sort-order.js ***!
67
- \*****************************************************************************/
68
- /*! exports provided: default */
69
- function(e,t,r){function n(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}}r.r(t),r.d(t,"default",(function(){return n}))},"./axis-chart/import-properties/helpers/should-update-measure-axis.js":
70
- /*!****************************************************************************!*\
71
- !*** ./axis-chart/import-properties/helpers/should-update-measure-axis.js ***!
72
- \****************************************************************************/
73
- /*! exports provided: default */
74
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}r.r(t),r.d(t,"default",(function(){return n}))},"./axis-chart/import-properties/index.js":
75
- /*!***********************************************!*\
76
- !*** ./axis-chart/import-properties/index.js ***!
77
- \***********************************************/
78
- /*! exports provided: default */
79
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
80
- /*! ./helpers */
81
- "./axis-chart/import-properties/helpers/index.js"),i=r(
82
- /*! ../../color-chart */
83
- "./color-chart/index.js");function o(e){var t=e.exportFormat,r=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,u=e.measureType,l=e.extension,c=e.supportedFilters,p=i.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s,extension:l,supportedFilters:c}),d=p.qProperty;return n.default.handleAutoMinMax({initialProperties:r,properties:d}),n.default.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:d,measureType:u}),n.default.setInterColumnSortOrder(d.qHyperCubeDef),p}},"./axis-chart/index.js":
84
- /*!*****************************!*\
85
- !*** ./axis-chart/index.js ***!
86
- \*****************************/
87
- /*! exports provided: default */
88
- function(e,t,r){r.r(t);var n=r(
89
- /*! ./export-properties */
90
- "./axis-chart/export-properties/index.js"),i=r(
91
- /*! ./import-properties */
92
- "./axis-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./color-chart/export-properties/index.js":
93
- /*!************************************************!*\
94
- !*** ./color-chart/export-properties/index.js ***!
95
- \************************************************/
96
- /*! exports provided: default */
97
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
98
- /*! ../../utils/attribute-expression-util */
99
- "./utils/attribute-expression-util/index.js"),i=r(
100
- /*! ../../hypercube */
101
- "./hypercube/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),s=a.data[0],u=s.dimensions.concat(s.excludedDimensions),l=s.measures.concat(s.excludedMeasures),c=n.default.IDMAP,p=c.COLOR_BY_ALTERNATIVE,d=c.COLOR_BY_EXPRESSION;return n.default.moveByIdFromGroup(u,[],"qAttributeDimensions",p),n.default.moveByIdFromGroup(u,[],"qAttributeExpressions",p),n.default.moveByIdFromGroup(l,[],"qAttributeExpressions",d),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
102
- /*!**************************************************************************!*\
103
- !*** ./color-chart/import-properties/helpers/add-color-by-expression.js ***!
104
- \**************************************************************************/
105
- /*! exports provided: default */
106
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
107
- /*! ../../../utils */
108
- "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=n.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),n.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
109
- /*!******************************************************************!*\
110
- !*** ./color-chart/import-properties/helpers/change-property.js ***!
111
- \******************************************************************/
112
- /*! exports provided: default */
113
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
114
- /*! ../../../utils */
115
- "./utils/index.js"),i=r(
116
- /*! ./update-layout-exclude */
117
- "./color-chart/import-properties/helpers/update-layout-exclude.js");function o(e,t,r){n.default.setValue(e,t,r),n.default.isAtomicValue(r)&&Object(i.default)(e,t,r)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
118
- /*!**************************************************************************!*\
119
- !*** ./color-chart/import-properties/helpers/clear-attribute-by-type.js ***!
120
- \**************************************************************************/
121
- /*! exports provided: default */
122
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
123
- /*! ../../../utils/array-util */
124
- "./utils/array-util.js");function i(e,t,r){if(Array.isArray(e[t])){var i=n.default.findIndexByPropertyValue(e[t],"id",r);i>=0&&e[t].splice(i,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
125
- /*!**********************************************************************!*\
126
- !*** ./color-chart/import-properties/helpers/clear-color-by-item.js ***!
127
- \**********************************************************************/
128
- /*! exports provided: default */
129
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
130
- /*! ../../../utils/attribute-expression-util */
131
- "./utils/attribute-expression-util/index.js"),i=r(
132
- /*! ./clear-attribute-by-type */
133
- "./color-chart/import-properties/helpers/clear-attribute-by-type.js");function o(e,t){var r=n.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)})),t.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
134
- /*!********************************************************************!*\
135
- !*** ./color-chart/import-properties/helpers/delete-total-mode.js ***!
136
- \********************************************************************/
137
- /*! exports provided: default */
138
- function(e,t,r){function n(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-can-color-by.js":
139
- /*!*******************************************************************!*\
140
- !*** ./color-chart/import-properties/helpers/get-can-color-by.js ***!
141
- \*******************************************************************/
142
- /*! exports provided: default */
143
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
144
- /*! ./get-color-options */
145
- "./color-chart/import-properties/helpers/get-color-options.js");function i(e,t){var r={primary:!0};if(e){var i=Object(n.default)(t);r.byDimension=i.dimension(e),r.byMeasure=i.measure(e),r.byMultiple=i.multiColor(e),r.byExpression=i.expression(e)}return r}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
146
- /*!**************************************************************************!*\
147
- !*** ./color-chart/import-properties/helpers/get-color-by-definition.js ***!
148
- \**************************************************************************/
149
- /*! exports provided: default */
150
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
151
- /*! ./get-expression */
152
- "./color-chart/import-properties/helpers/get-expression.js"),i=r(
153
- /*! ./get-dimension-label */
154
- "./color-chart/import-properties/helpers/get-dimension-label.js"),o=r(
155
- /*! ./get-measure-label */
156
- "./color-chart/import-properties/helpers/get-measure-label.js"),a=r(
157
- /*! ./get-measure-library-id */
158
- "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,r,s){var u,l,c={};switch(e){case"dimension":r.qLibraryId?(c.type="dimension",c.name=r.qLibraryId,c.id=r.qLibraryId):(c.type="field",t?(c.name=r.label||r.qDef,c.id=r.qDef):(c.name=r.qDef.qFieldDefs[0],c.label=Object(i.default)(r)));break;case"measure":(u=Object(a.default)(r,t))?(c.type="measure",c.name=u,c.id=u,(l=Object(n.default)(r,s))&&(c.expression=l)):(c.type="expression",t?(c.name=r.label||r.qExpression,c.id=r.qExpression):(c.name=r.qDef.qDef,c.label=Object(o.default)(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
159
- /*!********************************************************************!*\
160
- !*** ./color-chart/import-properties/helpers/get-color-options.js ***!
161
- \********************************************************************/
162
- /*! exports provided: default */
163
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
164
- /*! ./patches/default */
165
- "./color-chart/import-properties/helpers/patches/default.js"),i=r(
166
- /*! ./patches/scatter-plot */
167
- "./color-chart/import-properties/helpers/patches/scatter-plot.js"),o=r(
168
- /*! ./patches/pie-chart */
169
- "./color-chart/import-properties/helpers/patches/pie-chart.js"),a=r(
170
- /*! ./patches/line-chart */
171
- "./color-chart/import-properties/helpers/patches/line-chart.js"),s=r(
172
- /*! ./patches/map */
173
- "./color-chart/import-properties/helpers/patches/map.js"),u=r(
174
- /*! ./patches/distribution-plot */
175
- "./color-chart/import-properties/helpers/patches/distribution-plot.js"),l={scatterplot:i.default,"sn-scatter-plot":i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:u.default};function c(e){return(l[e]||n.default).colorModeOptions||n.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
176
- /*!**********************************************************************!*\
177
- !*** ./color-chart/import-properties/helpers/get-dimension-label.js ***!
178
- \**********************************************************************/
179
- /*! exports provided: default */
180
- function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qFieldLabels&&t.qFieldLabels[0]?t.qFieldLabels[0]:t.qFieldDefs[0]}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-expression.js":
181
- /*!*****************************************************************!*\
182
- !*** ./color-chart/import-properties/helpers/get-expression.js ***!
183
- \*****************************************************************/
184
- /*! exports provided: default */
185
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
186
- /*! qlik-modifiers */
187
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return i.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
188
- /*!********************************************************************!*\
189
- !*** ./color-chart/import-properties/helpers/get-measure-label.js ***!
190
- \********************************************************************/
191
- /*! exports provided: default */
192
- function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/get-measure-library-id.js":
193
- /*!*************************************************************************!*\
194
- !*** ./color-chart/import-properties/helpers/get-measure-library-id.js ***!
195
- \*************************************************************************/
196
- /*! exports provided: default */
197
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
198
- /*! qlik-modifiers */
199
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return t?e.qLibraryId:i.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
200
- /*!********************************************************!*\
201
- !*** ./color-chart/import-properties/helpers/index.js ***!
202
- \********************************************************/
203
- /*! exports provided: default */
204
- function(e,t,r){r.r(t);var n=r(
205
- /*! ./change-property */
206
- "./color-chart/import-properties/helpers/change-property.js"),i=r(
207
- /*! ./get-can-color-by */
208
- "./color-chart/import-properties/helpers/get-can-color-by.js"),o=r(
209
- /*! ./should-update-color-by */
210
- "./color-chart/import-properties/helpers/should-update-color-by.js"),a=r(
211
- /*! ./update-color-by */
212
- "./color-chart/import-properties/helpers/update-color-by.js"),s=r(
213
- /*! ./delete-total-mode */
214
- "./color-chart/import-properties/helpers/delete-total-mode.js"),u=r(
215
- /*! ./should-add-color-by-expression */
216
- "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),l=r(
217
- /*! ./add-color-by-expression */
218
- "./color-chart/import-properties/helpers/add-color-by-expression.js"),c=r(
219
- /*! ./switch-to-auto-color */
220
- "./color-chart/import-properties/helpers/switch-to-auto-color.js"),p=r(
221
- /*! ./should-switch-to-color-persistent */
222
- "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:n.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:u.default,addColorByExpression:l.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:p.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
223
- /*!*********************************************************************!*\
224
- !*** ./color-chart/import-properties/helpers/is-map-point-layer.js ***!
225
- \*********************************************************************/
226
- /*! exports provided: default */
227
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
228
- /*! ../../../utils */
229
- "./utils/index.js");function i(e,t,r){var i=n.default.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=n.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
230
- /*!******************************************************************!*\
231
- !*** ./color-chart/import-properties/helpers/patches/default.js ***!
232
- \******************************************************************/
233
- /*! exports provided: default */
234
- function(e,t,r){r.r(t);var n=r(
235
- /*! ../../../../utils/hypercube-util */
236
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>0&&n.default.getNumMeasures(e)<=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
237
- /*!****************************************************************************!*\
238
- !*** ./color-chart/import-properties/helpers/patches/distribution-plot.js ***!
239
- \****************************************************************************/
240
- /*! exports provided: default */
241
- function(e,t,r){r.r(t);var n=r(
242
- /*! ../../../../utils/hypercube-util */
243
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/line-chart.js":
244
- /*!*********************************************************************!*\
245
- !*** ./color-chart/import-properties/helpers/patches/line-chart.js ***!
246
- \*********************************************************************/
247
- /*! exports provided: default */
248
- function(e,t,r){r.r(t);var n=r(
249
- /*! ../../../../utils/hypercube-util */
250
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)<=1},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/map.js":
251
- /*!**************************************************************!*\
252
- !*** ./color-chart/import-properties/helpers/patches/map.js ***!
253
- \**************************************************************/
254
- /*! exports provided: default */
255
- function(e,t,r){r.r(t);var n=r(
256
- /*! ../../../../utils/hypercube-util */
257
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>=1},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
258
- /*!********************************************************************!*\
259
- !*** ./color-chart/import-properties/helpers/patches/pie-chart.js ***!
260
- \********************************************************************/
261
- /*! exports provided: default */
262
- function(e,t,r){r.r(t);var n=r(
263
- /*! ../../../../utils/hypercube-util */
264
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
265
- /*!***********************************************************************!*\
266
- !*** ./color-chart/import-properties/helpers/patches/scatter-plot.js ***!
267
- \***********************************************************************/
268
- /*! exports provided: default */
269
- function(e,t,r){r.r(t);var n=r(
270
- /*! ../../../../utils/hypercube-util */
271
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
272
- /*!********************************************************************************!*\
273
- !*** ./color-chart/import-properties/helpers/resolve-color-by-property-def.js ***!
274
- \********************************************************************************/
275
- /*! exports provided: default */
276
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
277
- /*! ../../../utils */
278
- "./utils/index.js"),i=r(
279
- /*! ../../../utils/attribute-expression-util */
280
- "./utils/attribute-expression-util/index.js"),o=r(
281
- /*! ./clear-color-by-item */
282
- "./color-chart/import-properties/helpers/clear-color-by-item.js"),a=r(
283
- /*! ./set-attribute-by-expression */
284
- "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=r(
285
- /*! ./set-attribute-by-library */
286
- "./color-chart/import-properties/helpers/set-attribute-by-library.js");function u(e){var t=e.properties,r=e.isDimension,u=e.dimensions,l=e.excludedDimensions,c=e.measures,p=e.label;Object(o.default)(u,l);var d=u[u.length-1];if(d){var f=r?n.default.getValue(t,"color.byDimDef"):n.default.getValue(t,"color.byMeasureDef"),m=n.default.getValue(t,"color.formatting.qNumFormat"),h=n.default.getValue(t,"color.formatting.isCustomFormatted");if(f){var g=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(f.type){case"expression":Object(a.default)({attributeExpression:g,label:p,item:f,isDimension:r,qNumFormat:m,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:g,measures:c,item:f,isDimension:r,qNumFormat:m,isCustomFormatted:h})}r?(g.qSortBy={qSortByAscii:1},d.qAttributeDimensions.push(g)):d.qAttributeExpressions.push(g)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
287
- /*!****************************************************************!*\
288
- !*** ./color-chart/import-properties/helpers/set-alt-label.js ***!
289
- \****************************************************************/
290
- /*! exports provided: default */
291
- function(e,t,r){function n(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-expression.js":
292
- /*!******************************************************************************!*\
293
- !*** ./color-chart/import-properties/helpers/set-attribute-by-expression.js ***!
294
- \******************************************************************************/
295
- /*! exports provided: default */
296
- function(e,t,r){function n(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
297
- /*!***************************************************************************!*\
298
- !*** ./color-chart/import-properties/helpers/set-attribute-by-library.js ***!
299
- \***************************************************************************/
300
- /*! exports provided: default */
301
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
302
- /*! ../../../utils/array-util */
303
- "./utils/array-util.js");function i(e){var t=e.attributeExpression,r=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=n.default.findIndexByPropertyValue(r,"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
- /*!***************************************************************************!*\
305
- !*** ./color-chart/import-properties/helpers/set-color-by-dimension-1.js ***!
306
- \***************************************************************************/
307
- /*! exports provided: default */
308
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
309
- /*! ../../../utils */
310
- "./utils/index.js"),i=r(
311
- /*! ./get-color-by-definition */
312
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
313
- /*! ./set-color-by-property-def */
314
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,r.length-1);var s=r[a.activeDimensionIndex],u=Object(i.default)("dimension",!1,s);u.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,u)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
315
- /*!***************************************************************************!*\
316
- !*** ./color-chart/import-properties/helpers/set-color-by-dimension-2.js ***!
317
- \***************************************************************************/
318
- /*! exports provided: default */
319
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
320
- /*! ../../../utils */
321
- "./utils/index.js"),i=r(
322
- /*! ../../../utils/array-util */
323
- "./utils/array-util.js"),o=r(
324
- /*! ../../../utils/attribute-expression-util */
325
- "./utils/attribute-expression-util/index.js"),a=r(
326
- /*! ./get-color-by-definition */
327
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
328
- /*! ./set-color-by-property-def */
329
- "./color-chart/import-properties/helpers/set-color-by-property-def.js"),u=r(
330
- /*! ./is-map-point-layer */
331
- "./color-chart/import-properties/helpers/is-map-point-layer.js");function l(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),l=r[Object(u.default)(r,e,t)?0:r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,p=i.default.findItemByPropertyValue(l.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!p,p||l)),!!p}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
332
- /*!*************************************************************************!*\
333
- !*** ./color-chart/import-properties/helpers/set-color-by-measure-1.js ***!
334
- \*************************************************************************/
335
- /*! exports provided: default */
336
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
337
- /*! ../../../utils */
338
- "./utils/index.js"),i=r(
339
- /*! ./get-color-by-definition */
340
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
341
- /*! ./set-color-by-property-def */
342
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qMeasures"),[]),a=n.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,r.length-1),a.activeMeasureIndex>-1){var s=r[a.activeMeasureIndex],u=Object(i.default)("measure",!1,s,!0);u.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,u)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
343
- /*!*************************************************************************!*\
344
- !*** ./color-chart/import-properties/helpers/set-color-by-measure-2.js ***!
345
- \*************************************************************************/
346
- /*! exports provided: default */
347
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
348
- /*! ../../../utils */
349
- "./utils/index.js"),i=r(
350
- /*! ../../../utils/array-util */
351
- "./utils/array-util.js"),o=r(
352
- /*! ../../../utils/attribute-expression-util */
353
- "./utils/attribute-expression-util/index.js"),a=r(
354
- /*! ./get-color-by-definition */
355
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
356
- /*! ./set-color-by-property-def */
357
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function u(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),u=n.default.getValue(e,"".concat(t,"qMeasures"),[]),l=r[r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,p=i.default.findItemByPropertyValue(l.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!p,p||u[0])),!!p}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
358
- /*!****************************************************************************!*\
359
- !*** ./color-chart/import-properties/helpers/set-color-by-property-def.js ***!
360
- \****************************************************************************/
361
- /*! exports provided: default */
362
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
363
- /*! ../../../utils/hypercube-util */
364
- "./utils/hypercube-util.js"),i=r(
365
- /*! ../../../utils/number-format-util */
366
- "./utils/number-format-util.js"),o=r(
367
- /*! ./set-alt-label */
368
- "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,r,a){var s=r?"expression":t.type,u=e.color,l=u.mode,c=n.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":l="byDimension",u.byDimDef={label:t.label||n.default.wrapFieldName(t.name),key:n.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":l="byMeasure",u.byMeasureDef={label:r||c,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":l="byDimension",u.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":l="byMeasure",u.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},u.formatting&&i.default.useMasterNumberFormat(u.formatting)}a||(u.auto=!1,u.mode=l)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
369
- /*!*********************************************************************************!*\
370
- !*** ./color-chart/import-properties/helpers/should-add-color-by-expression.js ***!
371
- \*********************************************************************************/
372
- /*! exports provided: default */
373
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
374
- /*! ../../../utils */
375
- "./utils/index.js");function i(e){var t=e.shouldUpdateColorBy,r=e.properties,i=n.default.getValue(r,"qHyperCubeDef.qMeasures",[]),o=n.default.getValue(r,"color.mode","");return!t&&"byExpression"===o&&i.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
376
- /*!**********************************************************************************!*\
377
- !*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js ***!
378
- \**********************************************************************************/
379
- /*! exports provided: default */
380
- function(e,t,r){function n(e){return!!(e&&e.activeDimensionIndex>-1)}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js":
381
- /*!**********************************************************************************!*\
382
- !*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js ***!
383
- \**********************************************************************************/
384
- /*! exports provided: default */
385
- function(e,t,r){function n(e){return!e||!e.key}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-1.js":
386
- /*!********************************************************************************!*\
387
- !*** ./color-chart/import-properties/helpers/should-set-color-by-measure-1.js ***!
388
- \********************************************************************************/
389
- /*! exports provided: default */
390
- function(e,t,r){function n(e){return!!(e&&e.activeMeasureIndex>-1)}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-set-color-by-measure-2.js":
391
- /*!********************************************************************************!*\
392
- !*** ./color-chart/import-properties/helpers/should-set-color-by-measure-2.js ***!
393
- \********************************************************************************/
394
- /*! exports provided: default */
395
- function(e,t,r){function n(e,t){return(!e||!e.key)&&t.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-switch-to-color-persistent.js":
396
- /*!************************************************************************************!*\
397
- !*** ./color-chart/import-properties/helpers/should-switch-to-color-persistent.js ***!
398
- \************************************************************************************/
399
- /*! exports provided: default */
400
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
401
- /*! ../../../utils */
402
- "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qDimensions",[]),r=n.default.getValue(e,"color.persistent",!1);return t.length>1&&!r}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
403
- /*!***********************************************************************************!*\
404
- !*** ./color-chart/import-properties/helpers/should-update-color-by-dimension.js ***!
405
- \***********************************************************************************/
406
- /*! exports provided: default */
407
- function(e,t,r){function n(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/should-update-color-by-measure.js":
408
- /*!*********************************************************************************!*\
409
- !*** ./color-chart/import-properties/helpers/should-update-color-by-measure.js ***!
410
- \*********************************************************************************/
411
- /*! exports provided: default */
412
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
413
- /*! ../../../utils */
414
- "./utils/index.js");function i(e){var t=e.auto,r=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=n.default.getValue(a,"visualization");return!(t||"byMeasure"!==r||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
415
- /*!*************************************************************************!*\
416
- !*** ./color-chart/import-properties/helpers/should-update-color-by.js ***!
417
- \*************************************************************************/
418
- /*! exports provided: default */
419
- function(e,t,r){function n(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
420
- /*!***********************************************************************!*\
421
- !*** ./color-chart/import-properties/helpers/switch-to-auto-color.js ***!
422
- \***********************************************************************/
423
- /*! exports provided: default */
424
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
425
- /*! ../../../utils */
426
- "./utils/index.js");function i(e){n.default.setValue(e,"color.mode","primary"),n.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
427
- /*!****************************************************************************!*\
428
- !*** ./color-chart/import-properties/helpers/update-color-by-dimension.js ***!
429
- \****************************************************************************/
430
- /*! exports provided: default */
431
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
432
- /*! ../../../utils */
433
- "./utils/index.js"),i=r(
434
- /*! ./set-alt-label */
435
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
436
- /*! ./resolve-color-by-property-def */
437
- "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
438
- /*! ./should-set-color-by-dimension-1 */
439
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=r(
440
- /*! ./should-set-color-by-dimension-2 */
441
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),u=r(
442
- /*! ./set-color-by-dimension-1 */
443
- "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),l=r(
444
- /*! ./set-color-by-dimension-2 */
445
- "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=n.default.getValue(e,"color.byDimDef");if(d&&Object(i.default)(e,d.label),Object(a.default)(d))Object(u.default)(e,t);else if(Object(s.default)(d)&&Object(l.default)(e,t))return;var f=n.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:r,excludedDimensions:p,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
446
- /*!**************************************************************************!*\
447
- !*** ./color-chart/import-properties/helpers/update-color-by-measure.js ***!
448
- \**************************************************************************/
449
- /*! exports provided: default */
450
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
451
- /*! ../../../utils */
452
- "./utils/index.js"),i=r(
453
- /*! ./set-alt-label */
454
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
455
- /*! ./resolve-color-by-property-def */
456
- "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
457
- /*! ./set-color-by-measure-1 */
458
- "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=r(
459
- /*! ./set-color-by-measure-2 */
460
- "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),u=r(
461
- /*! ./should-set-color-by-measure-1 */
462
- "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),l=r(
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 r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=n.default.getValue(e,"color.byMeasureDef");if(d&&Object(i.default)(e,d.label),Object(u.default)(d))Object(a.default)(e,t);else if(Object(l.default)(d,c)&&Object(s.default)(e,t))return;var f=n.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:r,excludedDimensions:p,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
465
- /*!************************************************************************!*\
466
- !*** ./color-chart/import-properties/helpers/update-color-by-other.js ***!
467
- \************************************************************************/
468
- /*! exports provided: default */
469
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
470
- /*! ../../../utils */
471
- "./utils/index.js"),i=r(
472
- /*! ./clear-color-by-item */
473
- "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var r=n.default.getValue(e,"color.mode"),o=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"".concat(t,"qMeasures"),[]),s=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&a.length<2&&n.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
474
- /*!******************************************************************!*\
475
- !*** ./color-chart/import-properties/helpers/update-color-by.js ***!
476
- \******************************************************************/
477
- /*! exports provided: default */
478
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
479
- /*! ../../../utils */
480
- "./utils/index.js"),i=r(
481
- /*! ./clear-color-by-item */
482
- "./color-chart/import-properties/helpers/clear-color-by-item.js"),o=r(
483
- /*! ./should-update-color-by-dimension */
484
- "./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=r(
485
- /*! ./should-update-color-by-measure */
486
- "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=r(
487
- /*! ./update-color-by-dimension */
488
- "./color-chart/import-properties/helpers/update-color-by-dimension.js"),u=r(
489
- /*! ./update-color-by-measure */
490
- "./color-chart/import-properties/helpers/update-color-by-measure.js"),l=r(
491
- /*! ./update-color-by-other */
492
- "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var r=n.default.getValue(e,"color.mode"),c=n.default.getValue(e,"color.auto"),p=n.default.getValue(e,"".concat(t,"qDimensions"),[]),d=n.default.getValue(e,"".concat(t,"qMeasures"),[]),f=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(p,f):Object(o.default)({auto:c,colorMode:r,dimensions:p})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:r,dimensions:p,measures:d,properties:e})?Object(u.default)(e,t):Object(l.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
493
- /*!************************************************************************!*\
494
- !*** ./color-chart/import-properties/helpers/update-layout-exclude.js ***!
495
- \************************************************************************/
496
- /*! exports provided: default */
497
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
498
- /*! ../../../utils */
499
- "./utils/index.js");function i(e,t,r){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:n.default.getValue(e,t),to:r})}},"./color-chart/import-properties/index.js":
500
- /*!************************************************!*\
501
- !*** ./color-chart/import-properties/index.js ***!
502
- \************************************************/
503
- /*! exports provided: default */
504
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
505
- /*! ../../utils */
506
- "./utils/index.js"),i=r(
507
- /*! ./helpers */
508
- "./color-chart/import-properties/helpers/index.js"),o=r(
509
- /*! ../../hypercube */
510
- "./hypercube/index.js");function a(e){var t=e.exportFormat,r=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,u=e.hypercubePath,l=e.extension,c=e.supportedFilters,p=o.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:a,defaultPropertyValues:s,hypercubePath:u,extension:l,supportedFilters:c}),d=p.qProperty,f=n.default.getValue(d,"visualization"),m=n.default.getValue(d,"qHyperCubeDef.qDimensions",[]),h=n.default.getValue(d,"color.mode",""),g=n.default.getValue(d,"color.auto",""),y=i.default.getCanColorBy(d,f),b=i.default.shouldUpdateColorBy({canColorBy:y,autoColor:g,colorMode:h,dimensions:m});return y[h]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:b,properties:d})&&i.default.addColorByExpression(d):i.default.switchToAutoColor(d),b&&i.default.updateColorBy(d,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(d)&&i.default.changeProperty(d,"color.persistent",!0),i.default.deleteTotalMode(m),p}},"./color-chart/index.js":
511
- /*!******************************!*\
512
- !*** ./color-chart/index.js ***!
513
- \******************************/
514
- /*! exports provided: default */
515
- function(e,t,r){r.r(t);var n=r(
516
- /*! ./export-properties */
517
- "./color-chart/export-properties/index.js"),i=r(
518
- /*! ./import-properties */
519
- "./color-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./conditional-coloring.js":
520
- /*!*********************************!*\
521
- !*** ./conditional-coloring.js ***!
522
- \*********************************/
523
- /*! exports provided: default */
524
- function(e,t,r){r.r(t);var n=r(
525
- /*! ./quarantine/quarantine-array-prop */
526
- "./quarantine/quarantine-array-prop.js"),i=r(
527
- /*! ./quarantine/unquarantine-array-prop */
528
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",u="qDef.conditionalColoring";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:u,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
529
- /*!*****************************!*\
530
- !*** ./conditional-show.js ***!
531
- \*****************************/
532
- /*! exports provided: default */
533
- function(e,t,r){r.r(t);var n=r(
534
- /*! ./quarantine/quarantine-array-prop */
535
- "./quarantine/quarantine-array-prop.js"),i=r(
536
- /*! ./quarantine/unquarantine-array-prop */
537
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",u="dimensions",l="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(n.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})}}},"./export-format.js":
538
- /*!**************************!*\
539
- !*** ./export-format.js ***!
540
- \**************************/
541
- /*! exports provided: default */
542
- function(e,t,r){function n(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/export-properties/helpers/add-dimensions.js":
543
- /*!***************************************************************!*\
544
- !*** ./hypercube/export-properties/helpers/add-dimensions.js ***!
545
- \***************************************************************/
546
- /*! exports provided: default */
547
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,u=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(s=a.excludedDimensions).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/add-measures.js":
550
- /*!*************************************************************!*\
551
- !*** ./hypercube/export-properties/helpers/add-measures.js ***!
552
- \*************************************************************/
553
- /*! exports provided: default */
554
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,u=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");u&&(s=a.excludedMeasures).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/copy-properties.js":
557
- /*!****************************************************************!*\
558
- !*** ./hypercube/export-properties/helpers/copy-properties.js ***!
559
- \****************************************************************/
560
- /*! exports provided: default */
561
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/export-properties/helpers/index.js":
562
- /*!******************************************************!*\
563
- !*** ./hypercube/export-properties/helpers/index.js ***!
564
- \******************************************************/
565
- /*! exports provided: default */
566
- function(e,t,r){r.r(t);var n=r(
567
- /*! ./add-dimensions */
568
- "./hypercube/export-properties/helpers/add-dimensions.js"),i=r(
569
- /*! ./add-measures */
570
- "./hypercube/export-properties/helpers/add-measures.js"),o=r(
571
- /*! ./set-inter-column-sort-order */
572
- "./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=r(
573
- /*! ./copy-properties */
574
- "./hypercube/export-properties/helpers/copy-properties.js"),s=r(
575
- /*! ./update-layout-exclude */
576
- "./hypercube/export-properties/helpers/update-layout-exclude.js"),u=r(
577
- /*! ./store-measures-modifiers */
578
- "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:n.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:u.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
579
- /*!***************************************************************************!*\
580
- !*** ./hypercube/export-properties/helpers/restore-changed-properties.js ***!
581
- \***************************************************************************/
582
- /*! exports provided: default */
583
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
584
- /*! ../../../utils */
585
- "./utils/index.js");function i(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===n.default.getValue(e,t)&&n.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
586
- /*!****************************************************************************!*\
587
- !*** ./hypercube/export-properties/helpers/set-inter-column-sort-order.js ***!
588
- \****************************************************************************/
589
- /*! exports provided: default */
590
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
591
- /*! ../../../utils */
592
- "./utils/index.js"),i=r(
593
- /*! ../../../utils/array-util */
594
- "./utils/array-util.js");function o(e){var t=e.exportFormat,r=e.qHyperCubeDef,o=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),o.interColumnSortOrder=r.qInterColumnSortOrder.concat();var a=n.default.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&i.default.isOrderedSubset(a,o.interColumnSortOrder)&&(o.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
595
- /*!*************************************************************************!*\
596
- !*** ./hypercube/export-properties/helpers/store-measures-modifiers.js ***!
597
- \*************************************************************************/
598
- /*! exports provided: default */
599
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
600
- /*! qlik-modifiers */
601
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e){e.forEach((function(e){i.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
602
- /*!**********************************************************************!*\
603
- !*** ./hypercube/export-properties/helpers/update-layout-exclude.js ***!
604
- \**********************************************************************/
605
- /*! exports provided: default */
606
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
607
- /*! ../../../utils */
608
- "./utils/index.js"),i=r(
609
- /*! ./restore-changed-properties */
610
- "./hypercube/export-properties/helpers/restore-changed-properties.js");function o(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(Object(i.default)(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!n.default.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude}},"./hypercube/export-properties/index.js":
611
- /*!**********************************************!*\
612
- !*** ./hypercube/export-properties/index.js ***!
613
- \**********************************************/
614
- /*! exports provided: default */
615
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
616
- /*! ../../export-format */
617
- "./export-format.js"),i=r(
618
- /*! ../../utils */
619
- "./utils/index.js"),o=r(
620
- /*! ./helpers */
621
- "./hypercube/export-properties/helpers/index.js"),a=r(
622
- /*! ../../quarantine/quarantine-property */
623
- "./quarantine/quarantine-property.js");function s(e){var t=e.propertyTree,r=e.hypercubePath,s=e.viewDataMode,u=Object(n.default)(),l=t.qProperty,c=i.default.getValue(l,r||""),p=c.qHyperCubeDef;return p.qInterColumnSortOrder||(p.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:u,qHyperCubeDef:p}),o.default.addMeasures({exportFormat:u,qHyperCubeDef:p}),o.default.setInterColumnSortOrder({exportFormat:u,qHyperCubeDef:p}),delete p.qLayoutExclude,o.default.copyProperties({exportFormat:u,properties:l}),r&&(u.properties.qHyperCubeDef=p,delete c.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:u,properties:l}),s||o.default.storeMeasuresModifiers(u.properties.qHyperCubeDef.qMeasures),Array.isArray(u.properties.filters)&&(Object(a.default)(u.properties,"filters","storedFilters"),delete u.properties.filters),u.properties.qHyperCubeDef.qContextSetExpression&&(Object(a.default)(u.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),u.properties.qHyperCubeDef.qContextSetExpression=""),u}},"./hypercube/import-properties/helpers/add-dimensions.js":
624
- /*!***************************************************************!*\
625
- !*** ./hypercube/import-properties/helpers/add-dimensions.js ***!
626
- \***************************************************************/
627
- /*! exports provided: default */
628
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
629
- /*! ./create-dimension */
630
- "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,r=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,u=r.data[0];for(t=0;t<u.dimensions.length;++t){var l=Object(n.default)(u.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(l):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<u.excludedDimensions.length;++t){var c=Object(n.default)(u.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
631
- /*!*************************************************************!*\
632
- !*** ./hypercube/import-properties/helpers/add-measures.js ***!
633
- \*************************************************************/
634
- /*! exports provided: default */
635
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
636
- /*! ./create-measure */
637
- "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,r=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,u=r.data[0];for(t=0;t<u.measures.length;++t){var l=Object(n.default)(u.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(l):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<u.excludedMeasures.length;++t){var c=Object(n.default)(u.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":
638
- /*!***********************************************************************!*\
639
- !*** ./hypercube/import-properties/helpers/copy-property-if-exist.js ***!
640
- \***********************************************************************/
641
- /*! exports provided: default */
642
- function(e,t,r){function n(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/copy-property-or-set-default.js":
643
- /*!*****************************************************************************!*\
644
- !*** ./hypercube/import-properties/helpers/copy-property-or-set-default.js ***!
645
- \*****************************************************************************/
646
- /*! exports provided: default */
647
- function(e,t,r){function n(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/create-dimension.js":
648
- /*!*****************************************************************!*\
649
- !*** ./hypercube/import-properties/helpers/create-dimension.js ***!
650
- \*****************************************************************/
651
- /*! exports provided: default */
652
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
653
- /*! extend */
654
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
655
- /*! ../../../utils */
656
- "./utils/index.js"),a=r(
657
- /*! ./get-others-label */
658
- "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var r=i()(!0,{},t,e);return o.default.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel=Object(a.default)()),r}},"./hypercube/import-properties/helpers/create-measure.js":
659
- /*!***************************************************************!*\
660
- !*** ./hypercube/import-properties/helpers/create-measure.js ***!
661
- \***************************************************************/
662
- /*! exports provided: default */
663
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
664
- /*! extend */
665
- "../node_modules/extend/index.js"),i=r.n(n);function o(e,t){return i()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
666
- /*!**********************************************************************!*\
667
- !*** ./hypercube/import-properties/helpers/create-new-properties.js ***!
668
- \**********************************************************************/
669
- /*! exports provided: default */
670
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
671
- /*! extend */
672
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
673
- /*! ../../../utils */
674
- "./utils/index.js"),a=r(
675
- /*! ./is-master-item-property */
676
- "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,r=e.initialProperties,n=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&&n?o.default.setValue(s,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},r,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
677
- /*!**********************************************************************!*\
678
- !*** ./hypercube/import-properties/helpers/get-default-dimension.js ***!
679
- \**********************************************************************/
680
- /*! exports provided: default */
681
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
682
- /*! ./get-others-label */
683
- "./hypercube/import-properties/helpers/get-others-label.js");function i(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(n.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
684
- /*!********************************************************************!*\
685
- !*** ./hypercube/import-properties/helpers/get-default-measure.js ***!
686
- \********************************************************************/
687
- /*! exports provided: default */
688
- function(e,t,r){function n(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/get-max-min-dimension-measure.js":
689
- /*!******************************************************************************!*\
690
- !*** ./hypercube/import-properties/helpers/get-max-min-dimension-measure.js ***!
691
- \******************************************************************************/
692
- /*! exports provided: default */
693
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
694
- /*! ./resolve-value */
695
- "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,r=e.dataDefinition,o=void 0===r?{}:r,a=t.data[0],s=o.dimensions||{max:0},u=o.measures||{max:0},l=Object(n.default)(u.max,a.dimensions.length,i),c=Object(n.default)(u.min,a.dimensions.length,0);return{maxDimensions:Object(n.default)(s.max,l,i),minDimensions:Object(n.default)(s.min,c,0),maxMeasures:l,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
696
- /*!*****************************************************************!*\
697
- !*** ./hypercube/import-properties/helpers/get-others-label.js ***!
698
- \*****************************************************************/
699
- /*! exports provided: default */
700
- function(e,t,r){function n(){return"Others"}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/import-common-properties.js":
701
- /*!*************************************************************************!*\
702
- !*** ./hypercube/import-properties/helpers/import-common-properties.js ***!
703
- \*************************************************************************/
704
- /*! exports provided: default */
705
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
706
- /*! ../../../utils */
707
- "./utils/index.js");function i(e,t,r){var i="masterobject"===n.default.getValue(t,"properties.qInfo.qType")?"masterobject":n.default.getValue(r,"qInfo.qType");n.default.setValue(e,"qInfo.qType",i),e.visualization=r.visualization}},"./hypercube/import-properties/helpers/index.js":
708
- /*!******************************************************!*\
709
- !*** ./hypercube/import-properties/helpers/index.js ***!
710
- \******************************************************/
711
- /*! exports provided: default */
712
- function(e,t,r){r.r(t);var n=r(
713
- /*! ./import-common-properties */
714
- "./hypercube/import-properties/helpers/import-common-properties.js"),i=r(
715
- /*! ./copy-property-if-exist */
716
- "./hypercube/import-properties/helpers/copy-property-if-exist.js"),o=r(
717
- /*! ./copy-property-or-set-default */
718
- "./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=r(
719
- /*! ./get-default-dimension */
720
- "./hypercube/import-properties/helpers/get-default-dimension.js"),s=r(
721
- /*! ./get-default-measure */
722
- "./hypercube/import-properties/helpers/get-default-measure.js"),u=r(
723
- /*! ./add-dimensions */
724
- "./hypercube/import-properties/helpers/add-dimensions.js"),l=r(
725
- /*! ./add-measures */
726
- "./hypercube/import-properties/helpers/add-measures.js"),c=r(
727
- /*! ./get-max-min-dimension-measure */
728
- "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),p=r(
729
- /*! ./set-inter-column-sort-order */
730
- "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),d=r(
731
- /*! ./create-new-properties */
732
- "./hypercube/import-properties/helpers/create-new-properties.js"),f=r(
733
- /*! ./should-init-layout-exclude */
734
- "./hypercube/import-properties/helpers/should-init-layout-exclude.js"),m=r(
735
- /*! ./init-layout-exclude */
736
- "./hypercube/import-properties/helpers/init-layout-exclude.js"),h=r(
737
- /*! ./update-dimensions-on-added */
738
- "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),g=r(
739
- /*! ./update-measures-on-added */
740
- "./hypercube/import-properties/helpers/update-measures-on-added.js"),y=r(
741
- /*! ./restore-measures-modifiers */
742
- "./hypercube/import-properties/helpers/restore-measures-modifiers.js");t.default={importCommonProperties:n.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:u.default,addMeasures:l.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:p.default,createNewProperties:d.default,shouldInitLayoutExclude:f.default,initLayoutExclude:m.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:g.default,restoreMeasuresModifiers:y.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
743
- /*!********************************************************************!*\
744
- !*** ./hypercube/import-properties/helpers/init-layout-exclude.js ***!
745
- \********************************************************************/
746
- /*! exports provided: default */
747
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=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>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(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=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
748
- /*!************************************************************************!*\
749
- !*** ./hypercube/import-properties/helpers/is-master-item-property.js ***!
750
- \************************************************************************/
751
- /*! exports provided: default */
752
- function(e,t,r){function n(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/resolve-value.js":
753
- /*!**************************************************************!*\
754
- !*** ./hypercube/import-properties/helpers/resolve-value.js ***!
755
- \**************************************************************/
756
- /*! exports provided: default */
757
- function(e,t,r){function n(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/restore-measures-modifiers.js":
758
- /*!***************************************************************************!*\
759
- !*** ./hypercube/import-properties/helpers/restore-measures-modifiers.js ***!
760
- \***************************************************************************/
761
- /*! exports provided: default */
762
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
763
- /*! qlik-modifiers */
764
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e){var t=e.measures,r=e.modifierTypes;t&&r&&i.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}},"./hypercube/import-properties/helpers/set-inter-column-sort-order.js":
765
- /*!****************************************************************************!*\
766
- !*** ./hypercube/import-properties/helpers/set-inter-column-sort-order.js ***!
767
- \****************************************************************************/
768
- /*! exports provided: default */
769
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
770
- /*! ../../../utils/array-util */
771
- "./utils/array-util.js");function i(e){var t=e.exportFormat,r=e.newHyperCubeDef,i=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=i.interColumnSortOrder.concat();var a=r.qInterColumnSortOrder.length;if(a!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());a!==o;)a<o?(n.default.indexAdded(r.qInterColumnSortOrder,a),++a):(--a,n.default.indexRemoved(r.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
772
- /*!***************************************************************************!*\
773
- !*** ./hypercube/import-properties/helpers/should-init-layout-exclude.js ***!
774
- \***************************************************************************/
775
- /*! exports provided: default */
776
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
777
- /*!***************************************************************************!*\
778
- !*** ./hypercube/import-properties/helpers/update-dimensions-on-added.js ***!
779
- \***************************************************************************/
780
- /*! exports provided: default */
781
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
782
- /*! ../../../utils */
783
- "./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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
784
- /*!*************************************************************************!*\
785
- !*** ./hypercube/import-properties/helpers/update-measures-on-added.js ***!
786
- \*************************************************************************/
787
- /*! exports provided: default */
788
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
789
- /*! ../../../utils */
790
- "./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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
791
- /*!**********************************************!*\
792
- !*** ./hypercube/import-properties/index.js ***!
793
- \**********************************************/
794
- /*! exports provided: default */
795
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
796
- /*! ../../utils */
797
- "./utils/index.js"),i=r(
798
- /*! ./helpers */
799
- "./hypercube/import-properties/helpers/index.js"),o=r(
800
- /*! ../../quarantine/unquarantine-property */
801
- "./quarantine/unquarantine-property.js");function a(e){var t=e.exportFormat,r=e.initialProperties,a=void 0===r?{}:r,s=e.dataDefinition,u=void 0===s?{}:s,l=e.defaultPropertyValues,c=void 0===l?{}:l,p=e.hypercubePath,d=e.extension,f=e.supportedFilters,m=void 0===f||f,h={qChildren:[]},g=i.default.createNewProperties({exportFormat:t,initialProperties:a,hypercubePath:p}),y=n.default.getValue(a,p||"").qHyperCubeDef,b=n.default.getValue(g,p||"").qHyperCubeDef,v=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:u}),q=v.maxDimensions,x=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,C=c.defaultDimension,E=void 0===C?i.default.getDefaultDimension():C,M=c.defaultMeasure,I=void 0===M?i.default.getDefaultMeasure():M;b.qDimensions.length=0,b.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:q,minDimensions:x,maxMeasures:D,minMeasures:S})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:q,minDimensions:x,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),i.default.addDimensions({exportFormat:t,maxDimensions:q,minDimensions:x,newHyperCubeDef:b,defaultDimension:E}),i.default.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:I}),i.default.updateDimensionsOnAdded({newProperties:g,dataDefinition:u,hypercubePath:p}),i.default.updateMeasuresOnAdded({newProperties:g,dataDefinition:u,hypercubePath:p}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),i.default.copyPropertyIfExist("qMaxStackedCells",y,b),i.default.copyPropertyIfExist("qNoOfLeftDims",y,b),i.default.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",y,b,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",y,b),i.default.copyPropertyOrSetDefault("qIndentMode",y,b),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),i.default.importCommonProperties(g,t,a),h.qProperty=g;var A=n.default.getValue(d||{},"support.modifiers");return i.default.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:A}),m&&Object(o.default)(h.qProperty,"storedFilters"),h}},"./hypercube/index.js":
802
- /*!****************************!*\
803
- !*** ./hypercube/index.js ***!
804
- \****************************/
805
- /*! exports provided: default */
806
- function(e,t,r){r.r(t);var n=r(
807
- /*! ./export-properties */
808
- "./hypercube/export-properties/index.js"),i=r(
809
- /*! ./import-properties */
810
- "./hypercube/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./index.js":
811
- /*!******************!*\
812
- !*** ./index.js ***!
813
- \******************/
814
- /*! exports provided: default */
815
- function(e,t,r){r.r(t);var n=r(
816
- /*! ./hypercube */
817
- "./hypercube/index.js"),i=r(
818
- /*! ./color-chart */
819
- "./color-chart/index.js"),o=r(
820
- /*! ./axis-chart */
821
- "./axis-chart/index.js"),a=r(
822
- /*! ./quarantine/quarantine-property */
823
- "./quarantine/quarantine-property.js"),s=r(
824
- /*! ./quarantine/unquarantine-property */
825
- "./quarantine/unquarantine-property.js"),u=r(
826
- /*! ./quarantine/quarantine-array-prop */
827
- "./quarantine/quarantine-array-prop.js"),l=r(
828
- /*! ./quarantine/unquarantine-array-prop */
829
- "./quarantine/unquarantine-array-prop.js"),c=r(
830
- /*! ./conditional-coloring */
831
- "./conditional-coloring.js"),p=r(
832
- /*! ./conditional-show */
833
- "./conditional-show.js");t.default={hypercube:n.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:u.default,unquarantineArrayProp:l.default,conditionalColoring:c.default,conditionalShow:p.default}},"./quarantine/get-quarantine-path.js":
834
- /*!*******************************************!*\
835
- !*** ./quarantine/get-quarantine-path.js ***!
836
- \*******************************************/
837
- /*! exports provided: default */
838
- function(e,t,r){function n(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}r.r(t),r.d(t,"default",(function(){return n}))},"./quarantine/quarantine-array-item.js":
839
- /*!*********************************************!*\
840
- !*** ./quarantine/quarantine-array-item.js ***!
841
- \*********************************************/
842
- /*! exports provided: default */
843
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
844
- /*! ../utils */
845
- "./utils/index.js"),i=r(
846
- /*! ./get-quarantine-path */
847
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=n.default.getValue(a,s);if(void 0!==u){var l=n.default.getValue(a,"qDef.cId");l||(l=n.default.generateId(),n.default.setValue(a,"qDef.cId",l));var c=Object(i.default)(r,o,l);n.default.setValue(t,c,u),n.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
848
- /*!*********************************************!*\
849
- !*** ./quarantine/quarantine-array-prop.js ***!
850
- \*********************************************/
851
- /*! exports provided: default */
852
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
853
- /*! ../utils */
854
- "./utils/index.js"),i=r(
855
- /*! ./quarantine-array-item */
856
- "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
857
- /*!*******************************************!*\
858
- !*** ./quarantine/quarantine-property.js ***!
859
- \*******************************************/
860
- /*! exports provided: default */
861
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
862
- /*! ../utils */
863
- "./utils/index.js");function i(e,t,r){var i,o,a=n.default.getValue(e,t);if(!n.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}n.default.getValue(e,"qLayoutExclude.quarantine")||n.default.setValue(e,"qLayoutExclude.quarantine",{});var s=n.default.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}},"./quarantine/unquarantine-array-item.js":
864
- /*!***********************************************!*\
865
- !*** ./quarantine/unquarantine-array-item.js ***!
866
- \***********************************************/
867
- /*! exports provided: default */
868
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
869
- /*! ../utils */
870
- "./utils/index.js"),i=r(
871
- /*! ./get-quarantine-path */
872
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=n.default.getValue(a,"qDef.cId");if(u){var l=Object(i.default)(r,o,u),c=n.default.getValue(t,l);void 0!==c&&(n.default.setValue(a,s,c),n.default.setValue(t,l,void 0))}}},"./quarantine/unquarantine-array-prop.js":
873
- /*!***********************************************!*\
874
- !*** ./quarantine/unquarantine-array-prop.js ***!
875
- \***********************************************/
876
- /*! exports provided: default */
877
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
878
- /*! ../utils */
879
- "./utils/index.js"),i=r(
880
- /*! ./unquarantine-array-item */
881
- "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
882
- /*!*********************************************!*\
883
- !*** ./quarantine/unquarantine-property.js ***!
884
- \*********************************************/
885
- /*! exports provided: default */
886
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
887
- /*! ../utils */
888
- "./utils/index.js");function i(e,t){var r=n.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){n.default.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
889
- /*!*****************************!*\
890
- !*** ./utils/array-util.js ***!
891
- \*****************************/
892
- /*! exports provided: default */
893
- function(e,t,r){r.r(t);var n=r(
894
- /*! ./find-item-by-property-value */
895
- "./utils/find-item-by-property-value.js"),i=r(
896
- /*! ./find-index-by-property-value */
897
- "./utils/find-index-by-property-value.js");t.default={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:n.default,findIndexByPropertyValue:i.default}},"./utils/attribute-expression-util/create.js":
898
- /*!***************************************************!*\
899
- !*** ./utils/attribute-expression-util/create.js ***!
900
- \***************************************************/
901
- /*! exports provided: default */
902
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function i(e,t){if(!e||!n[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r}},"./utils/attribute-expression-util/index.js":
903
- /*!**************************************************!*\
904
- !*** ./utils/attribute-expression-util/index.js ***!
905
- \**************************************************/
906
- /*! exports provided: default */
907
- function(e,t,r){r.r(t);var n=r(
908
- /*! ./create */
909
- "./utils/attribute-expression-util/create.js"),i=r(
910
- /*! ./move-by-id-from-group */
911
- "./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:n.default,moveByIdFromGroup:i.default,IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}}},"./utils/attribute-expression-util/is-size-changed.js":
912
- /*!************************************************************!*\
913
- !*** ./utils/attribute-expression-util/is-size-changed.js ***!
914
- \************************************************************/
915
- /*! exports provided: default */
916
- function(e,t,r){function n(e,t){return e.length!==t}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/attribute-expression-util/move-by-id-from-group.js":
917
- /*!******************************************************************!*\
918
- !*** ./utils/attribute-expression-util/move-by-id-from-group.js ***!
919
- \******************************************************************/
920
- /*! exports provided: default */
921
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
922
- /*! ./move-by-id */
923
- "./utils/attribute-expression-util/move-by-id.js"),i=r(
924
- /*! ./is-size-changed */
925
- "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,r,o,a){r=r||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var u=e[s][r],l=t.length;if(Object(n.default)(u,t,o,a),Object(i.default)(t,l))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
926
- /*!*******************************************************!*\
927
- !*** ./utils/attribute-expression-util/move-by-id.js ***!
928
- \*******************************************************/
929
- /*! exports provided: default */
930
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
931
- /*! ../find-index-by-property-value */
932
- "./utils/find-index-by-property-value.js");function i(e,t,r,i){t=t||[];var o=Object(n.default)(e,i,r),a=Object(n.default)(t,i,r);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
933
- /*!***********************************************!*\
934
- !*** ./utils/find-index-by-property-value.js ***!
935
- \***********************************************/
936
- /*! exports provided: default */
937
- function(e,t,r){function n(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/find-item-by-property-value.js":
938
- /*!**********************************************!*\
939
- !*** ./utils/find-item-by-property-value.js ***!
940
- \**********************************************/
941
- /*! exports provided: default */
942
- function(e,t,r){function n(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/generate-id.js":
943
- /*!******************************!*\
944
- !*** ./utils/generate-id.js ***!
945
- \******************************/
946
- /*! exports provided: default */
947
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
948
- /*! ./get-base62 */
949
- "./utils/get-base62.js");function i(){return Object(n.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
950
- /*!*****************************!*\
951
- !*** ./utils/get-base62.js ***!
952
- \*****************************/
953
- /*! exports provided: default */
954
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
955
- /*! ./get-char */
956
- "./utils/get-char.js");function i(e){var t=Object(n.default)(e%62),r=Math.floor(e/62);return r>0?i(r)+t:t}},"./utils/get-char.js":
957
- /*!***************************!*\
958
- !*** ./utils/get-char.js ***!
959
- \***************************/
960
- /*! exports provided: default */
961
- function(e,t,r){function n(e){var t,r=e;return r>9?(t=65+r-10)>90&&(t+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?n(r+1):String.fromCharCode(t)}r.r(t),r.d(t,"default",(function(){return n}))},"./utils/hypercube-util.js":
962
- /*!*********************************!*\
963
- !*** ./utils/hypercube-util.js ***!
964
- \*********************************/
965
- /*! exports provided: default */
966
- function(e,t,r){r.r(t);var n=r(
967
- /*! . */
968
- "./utils/index.js"),i=r(
969
- /*! ./wrap-file-name */
970
- "./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return n.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return n.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:i.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
971
- /*!************************!*\
972
- !*** ./utils/index.js ***!
973
- \************************/
974
- /*! exports provided: default */
975
- function(e,t,r){r.r(t);var n=r(
976
- /*! ./generate-id */
977
- "./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,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r: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:n.default}},"./utils/number-format-util.js":
978
- /*!*************************************!*\
979
- !*** ./utils/number-format-util.js ***!
980
- \*************************************/
981
- /*! exports provided: default */
982
- function(e,t,r){r.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}}},"./utils/wrap-file-name.js":
983
- /*!*********************************!*\
984
- !*** ./utils/wrap-file-name.js ***!
985
- \*********************************/
986
- /*! exports provided: default */
987
- function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}})),gr=["altLabel","auto","autoMinMax","byDimDef","byMeasureDef","dimensionScheme","expressionIsColor","expressionLabel","measureMax","measureMin","measureScheme","mode","paletteColor","persistent","reverseScheme","useBaseColors","useDimColVal"];function yr(e,t,r){for(var n=0;n<r.length;++n){var i=r[n];void 0!==e[i]&&(t[i]=e[i],delete e[i])}}var br={importColors:function(e){e.color.point=e.color.point||{},yr(e.color,e.color.point,gr),e.color.colorExpression&&(e.color.point.expression={qValueExpression:{qExpr:e.color.colorExpression}},delete e.color.colorExpression),e.color.point.expressionIsColor=!0},exportColors:function(e){yr(e.color.point,e.color,gr),e.color.colorExpression=vt(e,"color.point.expression.qValueExpression.qExpr",""),delete e.color.point.expression}};function vr(e){var t=e.dataDefinition,r=e.defaultPropertyValues,n=e.exportFormat,i=e.initialProperties,o=hr.axisChart.importProperties({exportFormat:n,initialProperties:i,dataDefinition:t,defaultPropertyValues:r}),a=o.qProperty;return 3===a.qHyperCubeDef.qInterColumnSortOrder.length&&(a.qHyperCubeDef.qInterColumnSortOrder=[1,2,0]),br.importColors(a),a.qHyperCubeDef.qAlwaysFullyExpanded=!0,o}function qr(e){var t=e.propertyTree,r=e.viewDataMode,n=hr.axisChart.exportProperties({propertyTree:t,viewDataMode:r});return br.exportColors(t.qProperty),n}var xr=function(e){var t=pr(e);return{properties:ur,data:{targets:[t]},importProperties:function(e){var r=e.exportFormat,n=e.initialProperties;return vr({dataDefinition:t,exportFormat:r,initialProperties:n})},exportProperties:qr}},Dr={wrapExpression:function(e){var t=e.replace(/\]/g,"]]");return t?"[".concat(t,"]"):""}};var Sr={replaceExpressionTokens:function(e,t,r){var n,i,o={start:r&&r.start||"{{",end:r&&r.end||"}}"},a=e;for(var s in t)n=t[s],i=o.start+s+o.end,a=a.replace(Cr(i,!0),n);return a},createRegExp:Cr};function Cr(e,t,r){var n=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),i=r?"(".concat(n,")"):n;return t?new RegExp(i,"g"):new RegExp(i)}var Er={generateExpression:function(e,t){var r={};if(t){var n=function(e){var n=t[e],i=n.wrap?Dr.wrapExpression(n.value):n.value;r[e]=i,(n.variations||[]).forEach((function(t){var n=function(e,t,r){if(""===t)return"";var n=Sr.createRegExp(r,!0,!0),i=e.split(n),o="";return i.forEach((function(e){o+=e!==r?e:t})),o}(t,i,e);r[t]=n}))};for(var i in t)n(i)}return Sr.replaceExpressionTokens(e,r)}};var Mr={generateHyperCubeDef:function(e,t,r,n,i){return function(e,t,r,n){var i,o={},a=[];e.forEach((function(e){kr(e.match(Tr("Dim"))).forEach((function(e){a.push(Ar(t.qDimensions[e],n,e,r).then((function(t){o["Dim[".concat(e,"]")]={value:t,wrap:!0}})))})),kr(e.match(Tr("Mea"))).forEach((function(e){a.push(wr(t.qMeasures[e],n).then((function(t){o["Mea[".concat(e,"]")]={value:t}})))}))})),i=a.length?Promise.all(a).then((function(){return Promise.resolve(o)})):Promise.resolve(o);return i}(e.dimensions.concat(e.measures),t,r,n).then((function(r){var n=M({},r,i),o=M(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((function(e){o.qDimensions.push({qDef:{qFieldDefs:["=".concat(Er.generateExpression(e,n))]}})})),e.measures.forEach((function(e){o.qMeasures.push({qDef:{qDef:Er.generateExpression(e,n)}})})),o}))},getAllHyperCubeExpressions:function(e,t,r){return Ir.apply(this,arguments)}};function Ir(){return(Ir=T(regeneratorRuntime.mark((function e(t,r,n){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.qDimensions.map((function(e,t){return Ar(e,n,t,r)})),o=t.qMeasures.map((function(e){return wr(e,n)})),e.next=4,Promise.all(i);case 4:return e.t0=e.sent,e.next=7,Promise.all(o);case 7:return e.t1=e.sent,e.abrupt("return",{dimensions:e.t0,measures:e.t1});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ar(e,t,r,n){if(e.qLibraryId)return Or(e.qLibraryId,"dimension",t,r,n);var i=n.qDimensionInfo[r].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function wr(e,t){return e.qLibraryId?Or(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function Or(e,t,r,n,i){return r?r["dimension"===t?"getDimension":"getMeasure"](e).then((function(e){return e.getProperties().then((function(e){return"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[n].qGroupPos]:e.qMeasure.qDef}))})):(console.warn("No app provided, returning library id"),e)}function Tr(e){return new RegExp("\\{\\{".concat(e,"\\[\\d\\]\\}\\}"),"g")}function kr(e){return e?e.map((function(e){return e.substr(6,1)})):[]}function Lr(e){return e=e||function(){return!1},{get:function(t){var r=e()?-1:1;switch(t("integer")*r){case-1:return"descending";case 1:return"ascending";default:return"disabled"}},set:function(t,r){var n=e();switch(t){case"descending":r("integer",n?1:-1);break;case"ascending":r("integer",n?-1:1);break;case"disabled":r("integer",0);break;default:r("integer",void 0)}}}}var jr={booleanConvertFunctions:function(e,t){return e=e||function(){return!1},t=t||1,{get:function(e){return!!e("integer")},set:function(r,n){if(r){var i=e()?-1:1;n("integer",i*=t)}else n("integer",0)}}},enumConvertFunctions:Lr,invertedEnumConvertFunctions:function(e){return Lr((function(){return!e||!e()}))}},_r=[{value:"ascending",translation:"properties.sorting.ascending"},{value:"descending",translation:"properties.sorting.descending"}];function Pr(e,t,r){return{type:"items",items:{toggled:{type:"boolean",ref:e,translation:t,convertFunctions:r.toggled},order:{type:"string",component:"dropdown",ref:e,options:_r,convertFunctions:r.sorting,show:function(t){return 0!==vt(t,e,0)}}}}}var Rr={state:function(e,t){return Pr(e=e||"qSortByState","properties.sorting.sortByState",{toggled:jr.booleanConvertFunctions(t),sorting:jr.invertedEnumConvertFunctions(t)})},ascii:function(e,t){return Pr(e=e||"qSortByAscii","properties.sorting.sortByAlphabetic",{toggled:jr.booleanConvertFunctions(t),sorting:jr.enumConvertFunctions(t)})},numeric:function(e,t){return Pr(e=e||"qSortByNumeric","properties.sorting.sortByNumeric",{toggled:jr.booleanConvertFunctions(t,-1),sorting:jr.enumConvertFunctions(t)})},expression:function(e,t){e=e||"qSortByExpression";var r={toggled:jr.booleanConvertFunctions(t),sorting:jr.enumConvertFunctions(t)},n=Pr(e,"properties.sorting.sortByExpression",r);return n.items.expression={type:"number",component:"expression",expressionType:"ValueExpr",ref:"qExpression",translation:"Common.Expression",defaultValue:"",show:function(t){return 0!==vt(t,e,0)}},n},frequency:function(e,t){return Pr(e=e||"qSortByFrequency","properties.sorting.sortByFrequency",{toggled:jr.booleanConvertFunctions(t),sorting:jr.invertedEnumConvertFunctions(t)})}},Nr={DATA_PATH:"qUndoExclude",HYPERCUBE_DEF_PATH:"qHyperCubeDef",HYPERCUBE_PATH:"qHyperCube",CHART_ID:"object.distributionPlot",AUTO_SORT:"sorting.autoSort",SORT_CRITERIA:"sorting.sortCriteria",SORTING_ELEMENT_ID:"sorting.elementId",SORTING_ELEMENT_MIN_ID:"distplot-exp-min",SORTING_ELEMENT_MAX_ID:"distplot-exp-max",SORTING_EXPRESSION:"sorting.expression",MAX_GLYPH_COUNT:20,MAX_STACKED_VALUES:3e3,HORIZONTAL:"horizontal",BOX_PADDING:2,POINT_BANDWIDTH_BASE_RATIO:.35,MAX_POINT_BASE_SIZE_PX:34,MIN_POINT_PIXELS:5,JITTER_PARAMETER:3,BUBBLE_SCALES_MAX:100};function Hr(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qDimensions.length>1||e.qHyperCube&&e.qHyperCube.qDimensionInfo&&e.qHyperCube.qDimensionInfo.length>1}Object.freeze(Nr);var Fr={hasMultipleDimensions:Hr,getOuterDimensionCardinality:function(e){var t=vt(e,Nr.HYPERCUBE_PATH);return Hr(e)?t&&t.qDimensionInfo[1].qCardinal:1},isAutoSort:function(e){return vt(e,Nr.AUTO_SORT,!1)},isSortByExpression:function(e){return 0!==vt(e,"".concat(Nr.SORT_CRITERIA,".sortByExpression"),0)},isSortByNumeric:function(e){return 0!==vt(e,"".concat(Nr.SORT_CRITERIA,".sortByNumeric"),0)},isSortByAscii:function(e){return 0!==vt(e,"".concat(Nr.SORT_CRITERIA,".sortByAscii"),0)}},Br={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0},Vr=function(e,t){if(!e||!Br[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},zr=function(e,t,r){return!!e&&(r=r||"id",e.filter((function(e){return e[r]===t}))[0])},Ur=function(e,t,r){var n=-1;return e&&(r=r||"id",e.forEach((function(e,i){e[r]===t&&(n=i)}))),n},Wr={CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"};var Kr={getColorByDefinition:function(e,t,r){var n,i,o,a={};switch(e){case"dimension":r.qLibraryId?(a.type="dimension",a.name=r.qLibraryId,a.id=r.qLibraryId):(a.type="field",t?(a.name=r.label||r.qDef,a.id=r.qDef):(i=!!(n=r.qDef).qLabelExpression,o=n.qFieldLabels&&n.qFieldLabels[0],a.name=n.qFieldDefs[0],a.label=i?n.qLabelExpression:o?n.qFieldLabels[0]:n.qFieldDefs[0]));break;default:throw new Error("Default-property-logic.js: getColorByDefinition: Illegal input")}return a}};var Yr={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0},useLocalFormat:function(e){var t,r;e.qNumFormat=(null===(t=e.quarantine)||void 0===t?void 0:t.qNumFormat)||{},e.isCustomFormatted=(null===(r=e.quarantine)||void 0===r?void 0:r.isCustomFormatted)||!1,e.quarantine=void 0},isUsingMasterNumberFormat:function(e){var t,r;return null!==(t=!(null==e||null===(r=e.quarantine)||void 0===r||!r.qNumFormat))&&void 0!==t&&t}},Gr=function(e,t,r){var n,i,o,a,s=vt(r,"mode"),u=vt(r,"auto"),l=vt(e,"".concat(t,"qDimensions"),[]),c=vt(e,"".concat(t,"qMeasures"),[]);if(!u&&"byDimension"===s&&l.length)(n=vt(r,"byDimDef"))&&tn(r,n.label),n&&n.activeDimensionIndex>-1?(n.activeDimensionIndex=Math.min(n.activeDimensionIndex,l.length-1),i=l[n.activeDimensionIndex],(a=Kr.getColorByDefinition("dimension",!1,i)).activeDimensionIndex=n.activeDimensionIndex,Qr(r,a)):n&&n.key||(i=l[l.length-1],o=zr(i.qAttributeDimensions,Wr.COLOR_BY_ALTERNATIVE),Qr(r,Kr.getColorByDefinition("dimension",!!o,o||i)));else{if(!u&&"byMeasure"===s&&l.length)throw new Error("not suported in any 444-chart");"byMultiple"===s&&c.length<2&&qt(r,"mode","primary")}},Xr=function(e,t,r){var n=vt(r,"mode"),i=vt(r,"auto"),o=vt(e,"".concat(t,"qDimensions"),[]),a=vt(e,"".concat(t,"qMeasures"),[]),s=vt(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);!i&&"byDimension"===n&&o.length?en(r,!0,o,s,a,vt(r,"byDimDef.label")):!i&&"byMeasure"===n&&o.length?en(r,!1,o,s,a,vt(r,"byMeasureDef.label")):$r(o,s)};function $r(e,t){e.forEach((function(e){Jr(e,Wr.COLOR_BY_ALTERNATIVE,"qAttributeDimensions"),Jr(e,Wr.COLOR_BY_ALTERNATIVE,"qAttributeExpressions")})),t.forEach((function(e){Jr(e,Wr.COLOR_BY_ALTERNATIVE,"qAttributeDimensions"),Jr(e,Wr.COLOR_BY_ALTERNATIVE,"qAttributeExpressions")}))}function Jr(e,t,r){if(e[r]){var n=Ur(e[r],t);n>=0&&e[r].splice(n,1)}else e[r]=[]}function Zr(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}function Qr(e,t,r,n){var i=r?"expression":t.type,o=e.mode;switch(tn(e,t.label||t.name||""),i){case"field":o="byDimension",e.byDimDef={label:t.label||Zr(t.name),key:Zr(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":o="byMeasure",e.byMeasureDef={label:r||t.label||t.name,key:r||t.name,type:"expression"};break;case"dimension":o="byDimension",e.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":o="byMeasure",e.byMeasureDef={label:t.name,key:t.id,type:"libraryItem"},e.formatting&&Yr.useMasterNumberFormat(e.formatting)}n||(e.auto=!1,e.mode=o)}function en(e,t,r,n,i,o){$r(r,n);var a=r[r.length-1];if(a){var s=vt(e,t?"byDimDef":"byMeasureDef"),u=vt(e,"formatting.qNumFormat"),l=vt(e,"formatting.isCustomFormatted");if(s){var c=Vr(Wr.COLOR_BY_ALTERNATIVE);switch(s.type){case"expression":c.label=o||s.label,t?c.qDef=s.key:(c.qExpression=s.key,u&&(c.qNumFormat=u,c.isCustomFormatted=l));break;case"libraryItem":if(!t){var p=-1;i.forEach((function(e,t){s.key===e.qLibraryId&&(p=t)})),c.matchMeasure=p,u&&(c.qNumFormat=u,c.isCustomFormatted=l)}c.qLibraryId=s.key,c.colorMapRef=s.key}t?(c.qSortBy={qSortByAscii:1},a.qAttributeDimensions.push(c)):a.qAttributeExpressions.push(c)}}}function tn(e,t){if(t){var r="="===t.charAt(0);e.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function rn(e){return!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor)}function nn(e){return"libraryItem"===vt(e,"color.point.byDimDef.type")}function on(e){return"libraryItem"===vt(e,"color.point.byMeasureDef.type")}function an(e){return!0===vt(e,"color.point.auto")}function sn(e){return!an(e)&&"byDimension"===vt(e,"color.point.mode")}function un(e){return!an(e)&&"byMeasure"===vt(e,"color.point.mode")}var ln={measuresHasBaseColors:function(e){return vt(e,"layout.qHyperCube.qMeasureInfo",[]).filter((function(e){return!!rn(e)})).length>0},dimensionsHasBaseColors:function(e){return vt(e,"layout.qHyperCube.qDimensionInfo",[]).filter((function(e){return!!rn(e)})).length>0},onGlobalChangeColors:function(e){Gr(e,"qHyperCubeDef.",e.color.point)},onChangeCalcCond:function(e){var t,r=null==e?void 0:e.qHyperCubeDef,n=null==e||null===(t=e.qUndoExclude)||void 0===t?void 0:t.qHyperCubeDef;r&&n&&(n.qCalcCond=r.qCalcCond,n.qCalcCondition=r.qCalcCondition)},isColorByDimension:sn,isColorByMeasure:un,isColorAuto:an,isColorByExpression:function(e){return!an(e)&&"byExpression"===vt(e,"color.point.mode")},isColorBySingle:function(e){return!an(e)&&"primary"===vt(e,"color.point.mode","primary")},isDimensionLibraryItem:nn,isMeasureLibraryItem:on,showLegend:function(e){var t=vt(e,"color.point.mode","primary");return"primary"!==t&&"byExpression"!==t&&!1===an(e)},showColorByLabel:function(e){var t=sn(e)&&!1===nn(e),r=un(e)&&!1===on(e),n=vt(e,"color.point.byDimDef.activeDimensionIndex")>-1;return t&&!n||r}};function cn(e,t){this.getSettings=e,this.getElements=t}function pn(e){var t=e.qDef.qSortCriterias;t[0]||t.push({});var r=t[0],n=this.getSettings();qt(r,"qSortByExpression",n.SORT_BY_EXPRESSION),qt(r,"qSortByAscii",n.SORT_BY_ASCII),qt(r,"qSortByNumeric",n.SORT_BY_NUMERIC),qt(r,"qSortByLoadOrder",n.SORT_BY_LOAD_ORDER),r.qExpression||(r.qExpression={});var i=dn(this.getElements());r.qExpression.qv=i.exp}function dn(e){var t=e.filter((function(e){return e.isDefault}));return 0===t.length?e[0]:t[0]}cn.prototype.applyAutoSorting=pn,cn.prototype.applyDefaultCustomSorting=function(e,t){pn.call(this,e);var r=dn(this.getElements()),n=e.qDef.qSortCriterias[0];t.elementId=r.id,t.sortCriteria={},qt(t.sortCriteria,"sortByExpression",n.qSortByExpression),qt(t.sortCriteria,"sortByAscii",n.qSortByAscii),qt(t.sortCriteria,"sortByNumeric",n.qSortByNumeric),qt(t.sortCriteria,"sortByLoadOrder",n.qSortByLoadOrder)},cn.prototype.applyCustomSorting=function(e,t){var r=e.qDef.qSortCriterias[0];if(qt(r,"qSortByExpression",t.sortCriteria.sortByExpression),qt(r,"qSortByAscii",t.sortCriteria.sortByAscii),qt(r,"qSortByNumeric",t.sortCriteria.sortByNumeric),qt(r,"qSortByLoadOrder",t.sortCriteria.sortByLoadOrder),1!==r.qSortByExpression&&-1!==r.qSortByExpression)return;r.qExpression||(r.qExpression={});if(t.elementId){var n=function(e,t){var r=e.filter((function(e){return e.id===t}));0===r.length&&function(e){throw new Error("Sorter: ".concat(e))}("Could not find any element matching the element '".concat(t,"'"));return r[0]}(this.getElements(),t.elementId);r.qExpression.qv=n.exp}else r.qExpression.qv=t.expression.qValueExpression.qExpr};var fn={create:function(e,t){return new cn(e,t)}};var mn={applySorting:function(e,t,r){var n=r.autoSort,i=!!r.sortCriteria;n?e.applyAutoSorting(t):i?e.applyCustomSorting(t,r):e.applyDefaultCustomSorting(t,r)}};var hn={ASCII:{ELEMENT:void 0,SORT_BY_EXPRESSION:void 0,SORT_BY_ASCII:1,SORT_BY_NUMERIC:1,SORT_BY_LOAD_ORDER:1}};Object.freeze(hn.ASCII),Object.freeze(hn);var gn=M(!0,{DIST_MAX:{ELEMENT:"distplot-exp-max",SORT_BY_EXPRESSION:-1,SORT_BY_ASCII:1,SORT_BY_NUMERIC:1,SORT_BY_LOAD_ORDER:1}},hn);var yn={getSettings:function(e){return vt(e,"qHyperCube.qDimensionInfo.1.qCardinal",1)>10?gn.DIST_MAX:gn.ASCII}};function bn(e,t,r,n){var i="Fractile";0===e?i="Min":1===e&&(i="Max");var o=t?Dr.wrapExpression(t):"",a=r?Dr.wrapExpression(r):"";return"".concat(i,"( ").concat("total {{<outerDimString>}} Aggr( {{innerMeasureString}}, {{outerDimString,}} {{innerDimString}} )",", ").concat(e," )").replace(/{{innerDimString}}/g,o).replace(/{{outerDimString}}/g,a).replace(/{{<outerDimString>}}/g,r?"<".concat(a,">"):"").replace(/{{outerDimString,}}/g,r?"".concat(a,","):"").replace(/{{innerMeasureString}}/g,(n||"").replace(/^=/,""))}var vn={getElementIds:function(){return[Nr.SORTING_ELEMENT_MIN_ID,Nr.SORTING_ELEMENT_MAX_ID]},getElements:function(e,t,r,n){var i=t[0],o=t[1],a=e[0],s=bn(0,i,o,a),u=bn(1,i,o,a);return[{id:Nr.SORTING_ELEMENT_MIN_ID,label:n.get("properties.distributionPlot.min"),exp:s,isDefault:Nr.SORTING_ELEMENT_MIN_ID===r.ELEMENT},{id:Nr.SORTING_ELEMENT_MAX_ID,label:n.get("properties.distributionPlot.max"),exp:u,isDefault:Nr.SORTING_ELEMENT_MAX_ID===r.ELEMENT}]},getFractileExpression:bn};function qn(e){throw new Error("distributionplot-sorter.applySorting: ".concat(e))}function xn(e,t,r,n){if(e.qUndoExclude){e.sorting||(e.sorting={autoSort:!0});var i=e.qUndoExclude.qHyperCubeDef.qDimensions;i.length>=2?e.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[0,2,1]:e.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[1,0];var o=function(){return yn.getSettings(t)},a=fn.create(o,(function(){var e=o();return vn.getElements(r.measures,r.dimensions,e,n)})),s=i[0],u=e.sorting;mn.applySorting(a,s,u)}}var Dn={applySorting:function(e,t,r,n,i){return function(e){var t=e.qHyperCubeDef;t?t.qDimensions?t.qMeasures?(!t.qDimensions.length||t.qDimensions.length<2)&&qn("'qHyperCubeDef.qDimensions' has no outer dimension"):qn("no 'qHyperCubeDef.qMeasures' in properties arg"):qn("no 'qHyperCubeDef.qDimensions' in properties arg"):qn("no 'qHyperCubeDef' in properties arg")}(e),n?xn(e,t,n,i):Mr.getAllHyperCubeExpressions(e.qHyperCubeDef,t.qHyperCube,r).then((function(r){xn(e,t,r,i)}))}},Sn="".concat(Nr.SORT_CRITERIA,".sortByExpression");var Cn={updateSortOrder:function(e,t){if(t){var r=vt(e,Sn);if(-1===r||1===r){var n=vt(e,Nr.SORTING_ELEMENT_ID),i=vt(t,Nr.SORTING_ELEMENT_ID),o=n===Nr.SORTING_ELEMENT_MAX_ID,a=n===Nr.SORTING_ELEMENT_MIN_ID&&i===Nr.SORTING_ELEMENT_MAX_ID,s=o&&(!!!i||i===Nr.SORTING_ELEMENT_MIN_ID),u=vt(t,Sn),l=o&&!(-1===u||1===u)&&1===r;a?qt(e,Sn,1):(s||l)&&qt(e,Sn,-1)}}}};function En(e){return!vt(e,"color.point.auto")&&"byDimension"===vt(e,"color.point.mode")&&vt(e,"qHyperCubeDef.qMeasures.length",0)<=1}function Mn(e){var t=e.flags,r=e.translator,n=e.anything.sense.theme,i=function(e){return{color:e,index:n.getDataColorPickerPalettes()[0].colors.indexOf(e)}},o={translation:"properties.colors",type:"items",items:{colors:{type:"items",items:{pointColor:{type:"items",translation:"properties.colorsAndLegend",grouped:!0,items:{colors:{type:"items",items:{autoColor:{ref:"color.point.auto",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},colorMode:{ref:"color.point.mode",type:"string",component:"dropdown",options:function(){return[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}]},defaultValue:"primary",show:function(e){return!vt(e,"color.point.auto",!0)}},boxColor:{ref:"color.box.paletteColor",translation:"properties.distributionPlot.boxColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=n.getStyle(Nr.CHART_ID,"box","fill");return i(e)}},paletteColor:{ref:"color.point.paletteColor",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",dualOutput:!0,show:function(e){return!vt(e,"color.point.auto",!0)&&"primary"===vt(e,"color.point.mode","primary")},defaultValue:function(){var e=n.getDataColorSpecials().primary;return i(e)}},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"color.point.expression.qValueExpression.qExpr",translation:"Common.Expression",show:function(e){return!vt(e,"color.point.auto")&&"byExpression"===vt(e,"color.point.mode")}},expressionIsColor:{ref:"color.point.expressionIsColor",translation:"properties.expressionIsColor",type:"boolean",defaultValue:!0,show:!1}}}}}}}}},a={items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",show:function(){return t.isEnabled("SHOW_DISCLAIMER")},defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},s={type:"items",translation:"properties.presentation",items:{orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"horizontal",horizontal:!0,items:[{component:"icon-item",icon:"direction_up_down",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"direction_left_right",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}]},showDistBackground:{ref:"presentation.visibleComponents",translation:"properties.show",type:"string",component:"dropdown",defaultValue:"points_box",options:[{value:"points_box",translation:"properties.distributionPlot.pointsAndBox"},{value:"points",translation:"properties.distributionPlot.pointsOnly"},{value:"box",translation:"properties.distributionPlot.boxOnly"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:function(e){return e.gridlines&&!e.gridlines.auto}}}}}};s.items.bubbleScaleItems={type:"items",items:{bubbleScales:{type:"integer",component:"slider",ref:"dataPoint.bubbleScales",translation:"properties.dataPoints.bubbleSizes",min:20,max:Nr.BUBBLE_SCALES_MAX,step:5,defaultValue:100,show:function(e){return e.qHyperCubeDef.qMeasures.length<2&&"box"!==e.presentation.visibleComponents}}}},s.items.jitter={type:"string",component:"switch",ref:"dataPoint.displacement",translation:"properties.distributionPlot.jitter",defaultValue:"none",options:[{value:"none",translation:"properties.off"},{value:"jitter",translation:"properties.on"}],show:function(e){return"box"!==e.presentation.visibleComponents}};var u={uses:"axis.picasso.dimensionAxis",show:function(e,t,r){return vt(r.layout,"".concat(Nr.HYPERCUBE_PATH,".qDimensionInfo.length"))>1},items:{othersGroup:{items:{label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}};function l(e,t){var r=vt(e,t,void 0);r&&void 0!==r.label&&("="===r.label.charAt(0)?e.color.point.altLabel={qStringExpression:{qExpr:r.label.substr(1)}}:e.color.point.altLabel=r.label)}var c={uses:"settings",items:{general:a,presentation:s,colors:{uses:"colorsAndLegend",items:{colors:{globalChange:ln.onGlobalChangeColors,items:{autoColor:{ref:"color.point.auto",undefinedValue:!1},colorMode:{ref:"color.point.mode",options:function(e){var t=[];return t.push({value:"primary",translation:"properties.colorMode.primary"}),t.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),vt(e,"qHyperCubeDef.qDimensions.length",0)>=1&&t.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),t},show:function(e){return!ln.isColorAuto(e)},globalChange:function(){}},colorByDimension:{ref:"color.point.byDimDef",show:function(e){return ln.isColorByDimension(e)},change:function(e){l(e,"color.point.byDimDef")}},colorByMeasure:{ref:"color.point.byMeasureDef",show:function(e){return ln.isColorByMeasure(e)},change:function(e){l(e,"color.point.byMeasureDef")}},colorByLabel:{ref:"color.point.altLabel",show:ln.showColorByLabel,change:function(e){var t,r=vt(e,"color.point.mode"),n=vt(e,"color.point.altLabel","");switch(r){case"byMeasure":t=e.color.point.byMeasureDef;break;case"byDimension":t=e.color.point.byDimDef}t&&(t.label=n.qStringExpression?"=".concat(n.qStringExpression.qExpr):n)}},baseColors:{type:"items",items:{useBaseColor:{ref:"color.point.useBaseColors",show:function(e,t){var r=vt(e,"color.point.mode","primary");return!ln.isColorAuto(e)&&"primary"===r&&(ln.measuresHasBaseColors(t)||ln.dimensionsHasBaseColors(t))}},measureColor:{translation:"properties.libraryColors",component:"measure-color",show:function(e,t){return!vt(e,"color.point.auto")&&"byMultiple"===vt(e,"color.point.mode")&&"measure"===vt(e,"color.point.useBaseColors")&&t.layout.qHyperCube.qMeasureInfo.length>1&&ln.measuresHasBaseColors(t)}}}},paletteColor:{ref:"color.point.paletteColor",translation:"properties.distributionPlot.pointColor",show:function(e,t){var r="measure"===vt(e,"color.point.useBaseColors")&&ln.measuresHasBaseColors(t),n="dimension"===vt(e,"color.point.useBaseColors")&&ln.dimensionsHasBaseColors(t);return ln.isColorBySingle(e)&&!r&&!n}},useDimColVal:{ref:"color.point.useDimColVal",show:function(e){return ln.isColorByDimension(e)&&ln.isDimensionLibraryItem(e)}},useMeasureGradient:{ref:"color.point.useMeasureGradient",translation:"properties.libraryColors",type:"boolean",component:"switch",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],show:function(e){var t=vt(e,"color.point.auto"),r=vt(e,"color.point.mode");return!t&&"byMeasure"===r&&"libraryItem"===vt(e,"color.point.byMeasureDef.type")}},persistentColors:{ref:"color.point.persistent",show:function(e){return vt(e,"color.point.auto")||"byDimension"!==vt(e,"color.point.mode")||"libraryItem"!==vt(e,"color.point.byDimDef.type")?En(e):En(e)&&!vt(e,"color.point.useDimColVal")}},colorSchemeMeasure:{ref:"color.point.measureScheme",show:function(e){return!ln.isColorAuto(e)&&ln.isColorByMeasure(e)}},reverseScheme:{ref:"color.point.reverseScheme",change:function(e){e.color.reverseScheme=e.color.point.reverseScheme},show:function(e){return!ln.isColorAuto(e)&&ln.isColorByMeasure(e)}},colorSchemeDimension:{ref:"color.point.dimensionScheme",show:function(e){var t=ln.isColorByDimension(e)&&(!ln.isDimensionLibraryItem(e)||!vt(e,"color.point.useDimColVal"));return t}},customRange:{show:function(e){return!ln.isColorAuto(e)},items:{autoMinMax:{ref:"color.point.autoMinMax",show:function(e){return ln.isColorByMeasure(e)}},min:{ref:"color.point.measureMin",show:function(e){return ln.isColorByMeasure(e)&&!1===vt(e,"color.point.autoMinMax")},invalid:function(e){return"minMax"===vt(e,"color.point.minMax")&&vt(e,"color.point.measureMin")>=vt(e,"color.point.measureMax")}},max:{ref:"color.point.measureMax",show:function(e){return ln.isColorByMeasure(e)&&!1===vt(e,"color.point.autoMinMax")},invalid:function(e){return"minMax"===vt(e,"color.point.minMax")&&vt(e,"color.point.measureMin")>=vt(e,"color.point.measureMax")}}}},attributeExpression:{ref:"color.point.expression.qValueExpression.qExpr",show:function(e){return ln.isColorByExpression(e)}},expressionIsColor:{ref:"color.point.expressionIsColor",show:!1},boxColor:{ref:"color.box.paletteColor",translation:"properties.distributionPlot.boxColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=n.getStyle(Nr.CHART_ID,"box","fill");return i(e)},show:function(e){return!vt(e,"color.point.auto",!0)}}}},legend:{show:ln.showLegend,type:"items",items:{show:{snapshot:{tid:"property-legend"}},dock:{show:function(e){var t=ln.showLegend(e)&&vt(e,"legend.show",!0);return t}},showTitle:{show:function(e){var t=ln.showLegend(e)&&vt(e,"legend.show",!0);return t}}}}}}||o,measureAxis:{uses:"axis.picasso.measureAxis"},dimensionAxis:u}},p={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:ln.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},d=Rr.expression("".concat(Nr.SORT_CRITERIA,".sortByExpression")),f={type:"items",items:{toggled:d.items.toggled,sortByElement:{component:"sort-by-element",expressionRef:Nr.SORTING_EXPRESSION,elementRef:Nr.SORTING_ELEMENT_ID,show:Fr.isSortByExpression,elements:function(e){return Mr.getAllHyperCubeExpressions(e.properties.qHyperCubeDef,e.layout.qHyperCube,e.model.app).then((function(t){var n=yn.getSettings(e.layout);return vn.getElements(t.measures,t.dimensions,n,r)}))}},order:d.items.order}};return{type:"items",component:"accordion",items:{data:{uses:"data",grouped:!0,items:{dimensions:{uses:"dimensions"},measures:{uses:"measures"}}},sorting:{type:"items",translation:"properties.sorting",schemaIgnore:!0,grouped:!1,globalChange:function(e,t,r){r&&Cn.updateSortOrder(e,r.prevProperties)},items:{autoSort:{ref:Nr.AUTO_SORT,type:"boolean",translation:"properties.sorting",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],show:Fr.hasMultipleDimensions,change:function(e,t,n,i){if(n&&Fr.hasMultipleDimensions(n)&&i.layout)return Dn.applySorting(n,i.layout,i.model.app,null,r)}},sortingItems:{type:"items",grouped:!0,show:function(e){return Fr.hasMultipleDimensions(e)&&!Fr.isAutoSort(e)},items:{expression:f,numeric:Rr.numeric("".concat(Nr.SORT_CRITERIA,".sortByNumeric")),ascii:Rr.ascii("".concat(Nr.SORT_CRITERIA,".sortByAscii")),defaultSortMessage:{component:"text",translation:"properties.sorting.defaultSortingMessage",show:function(e){return!Fr.isSortByExpression(e)&&!Fr.isSortByNumeric(e)&&!Fr.isSortByAscii(e)}}}},noData:{component:"no-data",show:function(e){return!Fr.hasMultipleDimensions(e)}}}},addons:p,settings:c}}}function In(e,t){var r={chart:"",dimension:""};return 0!==vt(e,"".concat(t,"qSortByExpression"),0)?(r.chart="sortByExpression",r.dimension="qSortByExpression"):0!==vt(e,"".concat(t,"qSortByNumeric"),0)?(r.chart="sortByNumeric",r.dimension="qSortByNumeric"):0!==vt(e,"".concat(t,"qSortByAscii"),0)&&(r.chart="sortByAscii",r.dimension="qSortByAscii"),r}var An={type:"items",component:"accordion",items:{data:{uses:"data"},sorting:{buildDefinition:function(e,t,r,n,i){var o="".concat(r,".qDef.qSortCriterias.0.");return{type:"items",translation:"properties.sorting",icon:"ascending",show:function(t){return vt(t,"".concat(e,".qDimensions.length"),0)>1},items:{sortingOptions:{component:"radio-list",type:"number",diffs:["".concat(o,"qSortByExpression"),"".concat(o,"qSortByNumeric"),"".concat(o,"qSortByAscii")],options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],setPropertyValue:function(e,r,a){var s=a.layout,u=In(e,o).chart;u||(u="sortByAscii");var l=vt(e,t);if(l.sortCriteria||(l.sortCriteria={}),l.autoSort){var c=n(s);if(c.ELEMENT)l.elementId=c.ELEMENT;else{var p=i(e,s);l.elementId=p[0]}}l.autoSort=!1,function(e,t){var r=e.sortCriteria;"sortByNumeric"!==t&&"sortByAscii"!==t||(r.sortByExpression=0);"sortByAscii"===t&&(r.sortByNumeric=0)}(l,u),l.sortCriteria[u]=r},getValue:function(e){var t=In(e,o).dimension;return t?vt(e,o+t):0}}}}}}.buildDefinition("qHyperCubeDef","sorting","qUndoExclude.qHyperCubeDef.qDimensions.0",yn.getSettings,vn.getElementIds),presentation:{uses:"presentation",items:{orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"direction_up_down",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"direction_left_right",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}]},bubbleScales:{type:"integer",component:"slider",ref:"dataPoint.bubbleScales",translation:"properties.dataPoints.bubbleSizes",min:20,max:100,step:5,defaultValue:100,show:function(e){return e.qHyperCubeDef.qMeasures.length<2&&"box"!==e.presentation.visibleComponents}},jitter:{type:"string",component:"switch",ref:"dataPoint.displacement",translation:"properties.distributionPlot.jitter",defaultValue:"none",options:[{value:"none",translation:"properties.off"},{value:"jitter",translation:"properties.on"}],show:function(e){return"box"!==e.presentation.visibleComponents}}}}}},wn={items:{color:{uses:"color",items:{mode:{options:[{value:"auto",translation:"Common.Auto"},{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}],diffs:["color.point.mode","color.point.auto"],setPropertyValue:function(e,t){"auto"===t?e.color.point.auto=!0:(e.color.point.auto=!1,e.color.point.mode=t)},getValue:function(e){return ln.isColorAuto(e)?"auto":e.color.point.mode}},dimension:{show:function(e){return ln.isColorByDimension(e)},items:{colorScheme:{ref:"color.point.dimensionScheme"},persistentColors:{ref:"color.point.persistent"}}},measure:{show:function(e){return ln.isColorByMeasure(e)},items:{sequential:{ref:"color.point.measureScheme"}}},legend:{show:ln.showLegend}}}}};function On(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:Mn(e),softDefinition:An,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},options:{usingDerivedProperties:!0,colorByPath:"color.point"},onSoftPropertyChange:function(e,t){ln.onGlobalChangeColors(t)},importProperties:function(t,r,n){var i=pr(e);return n.mapProperties(),vr({dataDefinition:i,defaultPropertyValues:{defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},exportFormat:t,initialProperties:r})},exportProperties:function(e,t,r){return qr({propertyTree:e,viewDataMode:r})}}}M(!0,An,wn);var Tn={getChar:function(e){var t,r=e;return r>9?(t=65+r-10)>90&&(t+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62:function(e){var t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id:function(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function kn(){return Tn.id()}function Ln(e,t,r){return"y"===e?jn(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function jn(e,t){var r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var _n={getAxisDock:Ln,getOppositeAxisDock:function(e,t,r){return Ln(e,"far"===t?"near":"far",r)},getYAxisDock:jn},Pn=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Rn=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Nn=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Hn(e){return Pn.test(e)}function Fn(e){return Rn.test(e)||Nn.test(e)}var Bn={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){var t,r,n=e?e.length:0;for(t=0;t<n;t++){if(Hn(r=e[t]))return"ltr";if(Fn(r))return"rtl"}return"ltr"}};var Vn={lineSettings:function(e,t){var r,n={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(r=t.style)||void 0===r?void 0:r.lineType}};return M(!0,n,e||{})},lineLabelSettings:function(e,t){var r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.label.name","color"),i=t.theme.getStyle(r,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(r,"referenceLine.label.name","fontFamily");return t.paletteColor?n=t.theme.getColorPickerColor(t.paletteColor):n||(n="transparent"),M(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:function(e){return e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr},getRefLineTitle:function(e){var t=e.refLine,r=e.label,n=e.valueString;return!1!==t.showValue?!1!==t.showLabel?"".concat(r," ").concat(Bn.lrm,"(").concat(n,")").concat(Bn.lrm):"".concat(Bn.lrm,"(").concat(n,")").concat(Bn.lrm):!1!==t.showLabel?r:""}},zn={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:-10},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};zn.DEFAULT_CHART_ORIENTATION=zn.HORIZONTAL;function Un(e,t){var r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||zn.DEFAULT_CHART_ORIENTATION,a=o===zn.HORIZONTAL,s=a?"x":"y",u=a?"y":"x",l=zn.SHOW_AXIS_LABELS_OPTIONS,c=zn.SHOW_TITLE_OPTIONS,p=l.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),f=r.includeDimensionAxis&&l.includes(i.show),m=r.includeDimensionAxis&&!!r.dimensionTitleText&&c.includes(i.show),h=r.gridlines&&!(!r.gridlines.auto&&0===r.gridlines.spacing),g=r.refLines&&r.refLines.some((function(e){return e.show})),y=[];(p&&function(e,t,r,n){var i={scale:"measure",forceBounds:n&&!n.autoMinMax&&n.showBounds};i=M(i,zn.LAYOUTSETTINGS.measureAxis);var o=Kn(t,r);e.addComponent("".concat(r,"-axis"),i,o)}(e,r,s,n),d&&function(e,t,r){var n={text:t.measureTitleText};n=M(n,zn.LAYOUTSETTINGS.measureAxisTitle);var i=function(e,t){return Kn(e,t)}(t,r);e.addComponent("".concat(r,"-axis-title"),n,i)}(e,r,s),function(e,t,r,n){var i=t.measureScaleSettings,o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=M(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),f&&function(e,t,r){var n={scale:"dimension"};n=M(n,zn.LAYOUTSETTINGS.dimensionAxis);var i=Yn(t,r);M(!0,n,t.dimensionAxisSettings||{}),e.addComponent("".concat(r,"-axis"),n,i)}(e,r,u),m&&function(e,t,r){var n={text:t.dimensionTitleText};n=M(n,zn.LAYOUTSETTINGS.dimensionAxisTitle);var i=function(e,t){return Yn(e,t)}(t,r);e.addComponent("".concat(r,"-axis-title"),n,i)}(e,r,u),r.includeDimensionAxis&&function(e,t,r){var n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===zn.HORIZONTAL?zn.VERTICAL:zn.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){var n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};(n=M(n,zn.LAYOUTSETTINGS.gridLines))[r]={scale:"measure"},e.addComponent("grid-line",n)}(e,r.gridlines,s),r.hasNavigation&&function(e,t,r,n){e.getSettings().scroll={dimension:{viewSize:r.scrollSettings&&r.scrollSettings.viewSize||0,max:r.scrollSettings&&r.scrollSettings.max||0}};var i={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},o=M({},zn.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",o,i),Wn(t,function(e){function t(t,r){if(!r||!e())return!1;var n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some((function(e){return"scrollbar"===e.settings.key}))}return[{type:"Tap",options:{enable:t},events:{tap:function(e){this.chart.component("scrollbar").emit("tap",e)}}},{type:"Pan",options:{enable:t},events:{panstart:function(e){this.chart.component("scrollbar").emit("panStart",e)},pan:function(e){this.chart.component("scrollbar").emit("panMove",e)},panend:function(e){this.chart.component("scrollbar").emit("panEnd",e)},pancancel:function(e){this.chart.component("scrollbar").emit("panCancel",e)}}}]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){var i=_n.getAxisDock(r,n.dock,t.isRtl),o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=M(o,zn.LAYOUTSETTINGS.refLines);var a={key:"ref-line-labels-".concat(kn()),require:["renderer","chart"],dock:_n.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize:function(){if("x"===r)return 26;for(var t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((function(e){var r=!1!==e.label.showValue?"(".concat(n(e.value),")"):"",i="".concat(e.label.text," ").concat(r),o=e.label.text&&r?" ".concat(r):r;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0],s=1;s<i.length;s++)i[s].wanted>o.wanted&&(o.wanted=i[s].wanted),i[s].required>o.required&&(o.required=i[s].required);var u=12;return o.required+u>100?o.required+u:Math.min(o.wanted+u,100)},lines:{x:[],y:[]}};a=M(a,zn.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((function(n){if(n.show){var s=n.refLineExpr&&n.refLineExpr.value,u=M(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),l=Vn.lineSettings({scale:"measure",dir:r,value:s},u);o.lines[r].push(l);var c=Vn.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},u);"x"===r?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[r].push(c)}})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,r,s,n),r.enableLasso&&r.selectionsEnabled)&&function(e,t){var r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",zn.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{});r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeDim"};o=M(o,zn.LAYOUTSETTINGS.rangeDim);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.dimRange||{},a,Yn(r,u).dock,r.isRtl);r.enableMeasureRange&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeMeasure"};o=M(o,zn.LAYOUTSETTINGS.rangeMeasure);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.measureRange||{},a,Kn(r,s).dock,r.isRtl);r.enableAreaRange&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeMinor"};o=M(o,zn.LAYOUTSETTINGS.rangeMinor);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?r:!r,dock:n,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,r.areaRange||{},a,Yn(r,u).dock,r.isRtl);r.brushActions&&Wn(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function Wn(e,t){t.forEach((function(t){e.push(t)}))}function Kn(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Yn(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Gn(e,t){var r=t||{},n=!r.orientation||"horizontal"===r.orientation,i=!!r.isRtl,o={name:r.name||"scale",component:{invert:n&&i,minorTicks:{count:1},range:r.range||void 0,domain:r.domain||void 0,trackBy:r.trackBy||"id"}};return M(!0,{},o,e||{})}function Xn(e,t){var r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.line.major","color"),s=t.theme.getStyle(r,"axis.title","fontSize"),u=t.theme.getStyle(r,"axis.title","color"),l=t.theme.getStyle(r,"axis.label.name","color"),c=t.theme.getStyle(r,"axis.label.name","fontSize"),p=t.theme.getStyle(r,"axis.title","fontFamily"),d=t.theme.getStyle(r,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",dock:_n.getAxisDock(i,n,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:u},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:l,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}};return M(!0,{},f,e||{})}function $n(e,t){var r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.title","fontSize"),s=t.theme.getStyle(r,"axis.title","color"),u=t.theme.getStyle(r,"axis.title","fontFamily"),l={key:"text",type:"text",dock:_n.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:u,fill:s}}};return M(!0,{},l,e||{})}Gn.measureScale=function(e,t){var r=(t||{}).source||[];"string"==typeof r&&(r=[r]);var n={name:"measure",component:{expand:.1,data:{fields:r.map((function(e){return{field:e}}))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(n.component.min=i.min),["max","minMax"].includes(i.minMax)&&(n.component.max=i.max));var o=Gn(M(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},Gn.dimensionScale=function(e,t){var r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:function(e){return e.qText||""}}}},label:function(e){return e.datum.label.value}}};return Gn(M(!0,r,e||{}),t)},Xn.xAxis=function(e,t){return Xn(M(!0,{key:"x-axis",scale:"x"},e||{}),t)},Xn.yAxis=function(e,t){var r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:_n.getYAxisDock(r,n)};return Xn(M(!0,i,e||{}),t)},$n.xAxisTitle=function(e,t){return $n(M(!0,{key:"x-axis-title"},e||{}),t)},$n.yAxisTitle=function(e,t){var r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:_n.getYAxisDock(r,n)||"left"};return $n(M(!0,i,e||{}),t)};var Jn={getBublesAlign:function(e,t,r){var n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){var r,n=[];return e&&n.push("@".concat(e)),t&&n.push("@".concat(t)),n.length&&(r=n.join(",")),r}};var Zn={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function Qn(){return Zn}function ei(e){var t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Qn.getLayoutModeKeys=function(){var e,t=[];for(e in Zn)t.push(e);return t};var ti={left:"left",right:"right",up:"top",down:"bottom"};function ri(e,t,r){switch(e){case"scale":return Gn(t,r);case"measure-scale":return Gn.measureScale(t,r);case"dimension-scale":return Gn.dimensionScale(t,r);case"axis":return Xn(t,r);case"box-marker":return function(e){return M(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return M(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){var r=t&&t.isRtl,n=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":r?"left":"right",settings:{backgroundColor:t.theme.getStyle(n,"","backgroundColor"),invert:r&&i}};return M(!0,{},o,e||{})}(t,r);case"text":return $n(t,r);case"lasso":return function(e,t){var r=t&&t.brushKey,n=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return n.forEach((function(e){o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})})),M(!0,{},o,e||{})}(t,r);case"range":return function(e,t){var r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,u=t&&t.isRtl,l={type:"brush-range",key:"range",displayOrder:99,dock:Jn.getDock(n,i),settings:{brush:r,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Jn.getBublesAlign(a,s,u)}}};return M(!0,{},l,e||{})}(t,r);case"range-area":return function(e,t){var r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,u=t&&t.dock,l=t&&t.isRtl,c=t&&t.chartInstance,p=!0,d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Jn.getDock(n,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Jn.getBublesAlign(s,u,l),label:function(e){return p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))}},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((function(e){d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})})),M(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){var r=t&&t.chartID,n=t&&t.isRtl,i=t&&t.dock||"auto",o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");var a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),u=t.theme.getStyle(r,"legend.label","color"),l=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.title","fontFamily"),p={key:"legend",type:"legend-cat",dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:n?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:function(e,t){return e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon","lui-icon--triangle-".concat(ti[t.direction])].join(" ")})}}}},style:{item:{label:{fontSize:l,fontFamily:t.theme.getStyle(r,"legend.label","fontFamily"),fill:u,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(l,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return M(!0,{},p,e)}(t,r);case"sequential-legend":return function(e,t){var r=t&&t.chartID,n=t&&t.isRtl,i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");var o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),u=t.theme.getStyle(r,"legend.label","color"),l=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;case"middle":default:return.5}}var d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(n?"right":"left"),major:{invert:"left"===i||"right"===i||n},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:u,fontSize:l,fontFamily:c}}};return M(!0,{},d,e)}(t,r);case"x-axis":return Xn.xAxis(t,r);case"y-axis":return Xn.yAxis(t,r);case"x-axis-title":return $n.xAxisTitle(t,r);case"y-axis-title":return $n.yAxisTitle(t,r);case"grid-line":return function(e,t){var r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return M(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:n},minorTicks:{stroke:n}},e||{})}(t,r);case"interaction":return function(e,t){var r=t&&t.gestures||[];return M(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){var r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return M(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:n},padding:{x:7,y:5}}}},e||{})}(t,r);case"event-area":return function(e){return M(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){var r=t&&t.chartID,n=t.theme.getStyle(r,"label.value","color"),i=t.theme.getStyle(r,"label.value","fontSize"),o={key:"labels",type:"labels",displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:t.theme.getStyle(r,"label.value","fontFamily"),fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:n,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:ei}]}}}]}};return M(!0,{},o,e||{})}(t,r);default:return}}function ni(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Qn()},components:[],scales:{}}}ni.prototype.addComponent=function(e,t,r){var n=ri(e,t,M(!0,{},this.options,r||{}));return this.settings.components.push(n),n},ni.prototype.addInteraction=function(e,t){var r=ri("interaction",e,M(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},ni.prototype.addScale=function(e,t,r){var n=ri(e,t,M(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},ni.prototype.getSettings=function(){return this.settings},ni.prototype.getComponent=function(e){return this.settings.components.filter((function(t){return t.key===e}))[0]},ni.prototype.addPreset=function(e,t){!function(e,t,r){switch(e){case"dimension-measure-chart":Un(t,r);break;default:throw Error("There is no chart preset with that type")}}(e,this,t)},ni.validateComponentKeys=function(e){var t={};return e.map((function(e){var r=e.key;return r?t[r]?"Duplicate key for component ".concat(e.type):(t[r]=!0,null):"Missing key for component ".concat(e.type)})).filter((function(e){return!!e}))},ni.create=function(e){return new ni(e)},ni.createComponent=ri;var ii={CENTER:0,BOTTOM:1},oi={DISCLAIMERS:[{label:"NoDataExist",alignment:ii.CENTER,default:!0},{label:"RequireNumericDimension",alignment:ii.CENTER,default:!1},{label:"OnlyNanData",alignment:ii.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:ii.CENTER,default:!1},{label:"LimitedData",alignment:ii.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:ii.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:ii.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:ii.BOTTOM,default:!1}],ALIGNMENT:ii};var ai={getNoDataExistAttribute:function(e){return e.qSize.qcy*e.qSize.qcx==0},getLimitedDataAttribute:function(e,t){var r,n,i=!1;return e?void 0!==t.explicitLimitedData?i=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?i=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(n=e.qStackedDataPages)&&n[0]&&n[0].qData[0]&&n[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,i=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some((function(e){return e.qDown>0})):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):i=!0===t.explicitLimitedData,i},getNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.some((function(e){return e.qMin<=0}))},getOnlyNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.every((function(e){return e.qMax<=0&&e.qMax>=e.qMin}))||0===e.qSize.qcy},getOnlyNanDataAttribute:function(e,t){return void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((function(e){return e.qMax<e.qMin||"NaN"===e.qMax}))},getDataRangeIncludingZeroAttribute:function(e,t){return!t.supportRangeOverZero&&function(e,t){var r,n,i,o,a,s=t.length;for(e&&(n=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),i=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),o=Number.MAX_VALUE,a=-Number.MAX_VALUE,r=0;r<s;r++)if(o=Math.min(o,t[r].qMin),a=Math.max(a,t[r].qMax),o<=0&&a>=0)return!0;return o=n?e.min:o,a=i?e.max:a,o<=0&&a>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo)},applyAttributes:function(e,t){var r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,oi.DISCLAIMERS.forEach((function(e){n[e.label]=!1})),t&&t.qHyperCube?(n.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),n.NoDataExist?n:(n.RequireNumericDimension=r.explicitRequireNumericDimension,n.RequireNumericDimension||(n.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,r),n.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,r),n.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,r)),n)):n}};function si(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function ui(e,t){return e&&t&&t[e]}function li(e){this.environment=e,this.clear()}si.prototype.isValidAndSupported=function(e,t){return ui(e.label,this.dataAttributes)&&(e.default||ui(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},si.prototype.isAnyValidDisclaimer=function(e){var t=!1,r=this;return this.disclaimersConfig.forEach((function(n){r.isValidAndSupported(n,e)&&(t=!0)})),t},si.prototype.getMessage=function(e,t){var r="",n=this;return t&&this.disclaimersConfig.forEach((function(i){n.isValidAndSupported(i,e)&&(r+="".concat(t.get("Object.Disclaimer.".concat(i.label))," "))})),r},li.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},li._applyDefaultSupport=function(e,t){var r=e;return r||(r={}),t.forEach((function(e){void 0===r[e.label]&&(r[e.label]=e.default)})),r},li.prototype.getComponentSettings=function(){var e,t,r,n,i=this.environment.translator,o=M(!0,{},this.vizAttributes.supportedDisclaimers),a=new si(oi.DISCLAIMERS,this.dataAttributes,o);if(a.isAnyValidDisclaimer(oi.ALIGNMENT.CENTER))r=a.getMessage(oi.ALIGNMENT.CENTER,i),n="center";else{if(!a.isAnyValidDisclaimer(oi.ALIGNMENT.BOTTOM))return;r=a.getMessage(oi.ALIGNMENT.BOTTOM,i),n="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:n},settings:{label:r,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},li.prototype.set=function(e){if(this.clear(),!e)throw new Error(li.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=ai.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},li.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};var ci=Gt.extend({init:function(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new li(r),this._dataPaths=["qHyperCube"];var o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[ni.createComponent("event-area",{mounted:function(e){o.dataAreaElem=e}})]}})},updateEnvironment:function(e){this.environment=e},isRtl:function(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths:function(e){this._dataPaths=e},getData:function(e,t,r){return function(e,t,r){var n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){var o=r.width||t.qSize.qcx,a=Math.floor(1e4/o);i={qTop:r.top||0,qLeft:r.left||0,qWidth:o,qHeight:r.height?Math.min(r.height,a):a}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};switch(t.qMode){case"K":n="qStackedDataPages";break;case"S":default:n="qDataPages"}return e.getData([i],null,t).then((function(e){t[n]=e}))}(e,t,r)},hasValidData:function(){return!0},paint:function(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));var t=this._disclaimer.getComponentSettings(),r="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),n=this.createChartSettings(this.layout);r?n.components=[t]:t&&n.components.push(t),ni.validateComponentKeys(n.components).forEach((function(e){console.error(e)})),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize:function(){if(this.layout)return this.paint()},createChartSettings:function(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings:function(e,t){!this.environment.options.freeResize&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData:function(e){return this._destroyed?Promise.reject():(this.layout=M(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart:function(e,t,r){var n,i,o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map((function(t){return{type:"q",key:t,config:{localeInfo:o},data:vt(e,t.replace(/\//g,"."))}}));this.colorService&&a.push.apply(a,R(this.colorService.getData())),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy:function(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:function(){return{}},isLassoDisabled:function(){return!0},setSnapshotData:function(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:function(e){return{data:e}}});function pi(e){var t=0;if(!e||!e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t&=t}return t}var di={generateHash:function(e){return pi(JSON.stringify(e))},updateHash:function(e,t){e.qUndoExclude||(e.qUndoExclude={});e.qUndoExclude.hashCode=di.generateHash(t)}};var fi={getDefaultHashDataForHyperCube:function(e,t,r){return function(e,t){var r=[];if(!e.qMeasures)return Promise.resolve(r);return e.qMeasures.forEach((function(e){e.qLibraryId?r.push(function(e,t){return t.getMeasure(e).then((function(e){return e.getProperties().then((function(e){return e.qMeasure.qDef}))}))}(e.qLibraryId,t)):r.push(Promise.resolve())})),Promise.all(r)}(e,r).then((function(e){return{drillLevel:hi(t),dimensionExpressions:mi(t),measureExpressions:e}}))}};function mi(e){return e.qDimensionInfo.map((function(e){return e.qGroupFieldDefs}))}function hi(e){return function(e){return vt(e,"qDimensionInfo",[])}(e).map((function(e){return e.qGroupPos}))}var gi={},yi=M.bind(null,!0);function bi(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}var vi=Array.isArray,qi=function(e){return void 0===e};function xi(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Di(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){i!==n.length&&(e[(r=+t)||t]=qi(e[r||t])?Number.isNaN(+r)?{}:[]:e[t],e=e[r||t])})),e}function Si(e,t){if(bi(e)&&bi(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!Si(e[i],t[i]))return!1}return!0}if(vi(e)&&vi(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o++)if(!Si(e[o],t[o]))return!1;return!0}return e===t}gi.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e&&(e=yi({},{val:e}).val),e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);Si(o,a)||xi(t,i)||(qi(a)?n.push({op:"add",path:s,value:o}):bi(o)&&bi(a)?n=n.concat(gi.generate(a,o,s)):vi(o)&&vi(a)?n=n.concat(function(e,t,r){var n,i,o=[],a=e.slice(),s=-1;function u(e,t,r){if(e[r]&&qi(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n++)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Si(t,a))return o;if(null===t[0]||!qi(t[0])&&qi(t[0].qInfo))return o.push({op:"replace",path:r,value:t}),o;for(n=a.length-1;n>=0;--n)-1===(s=u(t,a[n]&&a[n].qInfo&&a[n].qInfo.qId,n))?(o.push({op:"remove",path:"".concat(r,"/").concat(n)}),a.splice(n,1)):o=o.concat(gi.generate(a[n],t[s],"".concat(r,"/").concat(n)));for(n=0,i=t.length;n<i;++n)-1===(s=u(a,t[n]&&t[n].qInfo&&t[n].qInfo.qId))?(o.push({op:"add",path:"".concat(r,"/").concat(n),value:t[n]}),a.splice(n,0,t[n])):s!==n&&(o.push({op:"move",path:"".concat(r,"/").concat(n),from:"".concat(r,"/").concat(s)}),a.splice(n,0,a.splice(s,1)[0]));return o}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){qi(t[i])&&!xi(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},gi.apply=function(e,t){t.forEach((function(t){var r,n=Di(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?n[i]:n[+i]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("add"===t.op||"replace"===t.op)if(vi(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(vi(o)&&vi(t.value)){var s=t.value.slice();o.length=0,o.push.apply(o,s)}else bi(o)&&bi(t.value)?(r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!xi(r,e)&&delete r[e]})),yi(o,t.value)):n[i]=t.value;else if("move"===t.op){var u=Di(e,t.from);vi(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(vi(n)?n.splice(+i,1):delete n[i])}))},gi.clone=function(e){return yi({},e)},gi.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},gi.updateObject=function(e,t){Object.keys(e).length?gi.apply(e,gi.generate(e,t)):yi(e,t)};var Ci=function(){function e(t){k(this,e),this._model=t}var t;return j(e,[{key:"setModel",value:function(e){this._model=e}},{key:"saveSoftProperties",value:function(e,t){if(!this._model)return Promise.resolve(!1);var r=gi.generate(e,t);return M(!0,e,t),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),this._model.applyPatches(r,!0).then((function(){return!0}))):Promise.resolve(!1)}},{key:"mergeSoftPatches",value:(t=T(regeneratorRuntime.mark((function e(){var t,r,n,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._model){e.next=2;break}return e.abrupt("return");case 2:return t=this._model.getProperties(),r=this._model.getEffectiveProperties(),e.next=6,t;case 6:return n=e.sent,e.next=9,r;case 9:if(i=e.sent,!n.qExtendsId){e.next=12;break}return e.abrupt("return");case 12:o=gi.generate(n,i),gi.apply(n,o),(a=this)._model.setProperties(n).then((function(){a._model.clearSoftPatches()}));case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),Ei={canModifyHardProperties:function(e){if(e.qHasSoftPatches||e.qExtendsId)return!1;if(e.permissions)return e.permissions.update;return-1!==e.qMeta.privileges.indexOf("update")}};var Mi={saveDerivedProperties:function(e,t,r,n){if(Ei.canModifyHardProperties(t))return e.setProperties(r);return new Ci(e).saveSoftProperties(n,r)}};var Ii={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function Ai(){this._generationInProgress=!1}function wi(e){Ii.validate(e);var t=e.properties,r=di.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==r)}Ai.prototype.isDerivedUpToDate=wi,Ai.prototype.updateDerivedProperties=function(e){if(Ii.validate(e),this._generationInProgress)return Promise.resolve(!0);if(wi(e)){var t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}var r=this,n=e.model,i=e.layout,o=M(!0,{},e.properties),a=M(!0,{},o);return this._generationInProgress=!0,di.updateHash(o,e.hashData),e.generateDerivedProperties(i,o).then((function(){return Mi.saveDerivedProperties(n,i,o,a).then((function(){return r._generationInProgress=!1,Promise.resolve(!0)}))}))},Ai.prototype.addDefaultHyperCubeHash=function(e,t,r,n){return fi.getDefaultHashDataForHyperCube(e,t,r).then((function(e){return M(!0,n,e)}))};var Oi={exports:{}},Ti=Oi.exports=function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e){return(r="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 n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){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 l(e,t,r){return(l=u()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&s(i,r.prototype),i}).apply(null,arguments)}function c(e,t){return f(e)||h(e,t)||g(e,t)||v()}function p(e){return d(e)||m(e)||g(e)||b()}function d(e){if(Array.isArray(e))return y(e)}function f(e){if(Array.isArray(e))return e}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}}function g(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(){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 v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var q=Object.prototype.hasOwnProperty,x=Object.prototype.toString,D=Object.defineProperty,S=Object.getOwnPropertyDescriptor,C=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===x.call(e)},E=function(e){if(!e||"[object Object]"!==x.call(e))return!1;var t,r=q.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&q.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||q.call(e,t)},M=function(e,t){D&&"__proto__"===t.name?D(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},I=function(e,t){if("__proto__"===t){if(!q.call(e,t))return;if(S)return S(e,t).value}return e[t]},A=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!==w(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(r in t)n=I(s,r),s!==(i=I(t,r))&&(c&&i&&(E(i)||(o=C(i)))?(o?(o=!1,a=n&&C(n)?n:[]):a=n&&E(n)?n:{},M(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&M(s,{name:r,newValue:i}));return s};function O(e,t,r){if(!e)return-1;var n=r.cache,i=e.origin?e.origin():null;i&&(e=i);var o=n.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<n.wrappedFields.length;u++)if(s=n.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;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 T(e,t,r){var n=r.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:n,field:e.field.key()}),i}function k(e){var t=e.cache,r=e.f,n=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,p=n;if(i.field&&i.field!==r){var d=O(i.field,o,{cache:t});if(-1===d)return;p=A({qRow:a},d(s))}l[c]=T(i,p,{key:u})}function L(e,t,n,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){for(var u=t.raw(),l=t.key(),c="object"===r(o[s].field)?o[s].field:t.field(o[s].field),d=i.normalizeConfig(o[s],t),f=d.props,m=d.main,h=Object.keys(f),g=!!o[s].trackBy,y=r(o[s].trackBy),b={},v=[],q=[],x=0;x<u.qDataPages.length;x++){var D=O(c,u.qDataPages[x],{cache:n});if(-1!==D)for(var S=0;S<u.qDataPages[x].qMatrix.length;S++){var C=u.qDataPages[x].qArea.qTop+S,E=A({qRow:C},D(u.qDataPages[x].qMatrix[S])),M=T(m,E,{key:l});if(!m.filter||m.filter(E)){for(var I=0;I<h.length;I++){var w=f[h[I]],L=w.fields||[w];w.fields&&(M[h[I]]=[]);for(var j=0;j<L.length;j++)k({cache:n,f:c,mainCell:E,p:L[j],prop:h[I],props:f,page:u.qDataPages[x],rowIdx:C,row:u.qDataPages[x].qMatrix[S],sourceKey:l,target:w.fields?M[h[I]]:M,targetProp:w.fields?j:h[I]});if(w.fields){var _=M[h[I]].map((function(e){return e.value})),P=M[h[I]].map((function(e){return e.label}));M[h[I]]={value:"function"==typeof w.value?w.value(_):void 0!==w.value?w.value:_,label:"function"==typeof w.label?w.label(P):void 0!==w.label?String(w.label):String(M[h[I]].value)}}}g&&i.track({cfg:o[s],itemData:E,obj:M,target:v,tracker:b,trackType:y}),q.push(M)}}}g?a.push.apply(a,p(i.collect(v,{main:m,propsArr:h,props:f}))):a.push.apply(a,q)}return a}function j(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function _(){return this.eachAfter(j)}function P(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length);return this}function R(e){for(var t,r,n=this,i=[n];n=i.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)i.push(t[r]);return this}function N(e){for(var t,r,n,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r]);for(;i=a.pop();)e(i);return this}function H(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))}function F(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}function B(e){for(var t=this,r=V(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function V(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function z(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function U(){var e=[];return this.each((function(t){e.push(t)})),e}function W(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}function K(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t}function Y(e,t){var r,n,i,o,a,s=new Z(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=X);r=l.pop();)if(u&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)l.push(n=r.children[o]=new Z(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(J)}function G(){return Y(this).eachBefore($)}function X(e){return e.children}function $(e){e.data=e.data.data}function J(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Z(e){this.data=e,this.depth=this.height=0,this.parent=null}function Q(e){if("function"!=typeof e)throw new Error;return e}Z.prototype=Y.prototype={constructor:Z,count:_,each:P,eachAfter:N,eachBefore:R,sum:H,sort:F,path:B,ancestors:z,descendants:U,leaves:W,links:K,copy:G};var ee="$",te={depth:-1},re={};function ne(e){return e.id}function ie(e){return e.parentId}function oe(){var e=ne,t=ie;function r(r){var n,i,o,a,s,u,l,c=r.length,p=new Array(c),d={};for(i=0;i<c;++i)n=r[i],s=p[i]=new Z(n),null!=(u=e(n,i,r))&&(u+="")&&(d[l=ee+(s.id=u)]=l in d?re:s);for(i=0;i<c;++i)if(s=p[i],null!=(u=t(r[i],i,r))&&(u+="")){if(!(a=d[ee+u]))throw new Error("missing: "+u);if(a===re)throw new Error("ambiguous: "+u);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=te,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(J),o.parent=null,c>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=Q(t),r):e},r.parentId=function(e){return arguments.length?(t=Q(e),r):t},r}function ae(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),i=t,o=0;o<n.length;o++){if("*"===n[o]&&Array.isArray(i)){var a=[];r=n.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=ae(r,i[s]);Array.isArray(u)?a.push.apply(a,p(u)):a.push(u)}return a}if(!n[o]&&Array.isArray(i)){var l=new Array(i.length);r=n.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=ae(r,i[c]);return l}n[o]in i&&(i=i[n[o]])}return i}function se(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var i=r>=0?[e[r]]:e;n.push.apply(n,p(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&n.push.apply(n,p(se(e[o].children,t-1,r)));return n}function ue(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t));return function(e){for(var t=e,r=0;r<n;++r)t=t.parent;return t}}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return se(e.children,i-1,r)}}return!1}function le(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var i=0;i<n.length;i++)if(e(n[i]))return n[i];return!1}if("string"==typeof e){for(var o=0;o<n.length;o++)if(n[o].key()===e||n[o].title()===e)return n[o]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var ce=/^qDimensionInfo(?:\/(\d+))?/,pe=/^\/?qMeasureInfo\/(\d+)/,de=/\/qAttrExprInfo\/(\d+)/,fe=/\/qAttrDimInfo\/(\d+)/;function me(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}function he(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 ge(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=n,p=r.qEffectiveInterColumnSortOrder,d=he(r);return ce.test(c)&&(i=!0,o=+ce.exec(c)[1],c=n.replace(ce,"")),pe.test(c)&&("K"===r.qMode?u=+pe.exec(c)[1]:p&&-1!==p.indexOf(-1)?(u=+pe.exec(c)[1],l=0):l=+pe.exec(c)[1],c=c.replace(pe,"")),c&&(fe.exec(c)?s=+fe.exec(c)[1]:de.exec(c)&&(a=+de.exec(c)[1])),{fieldDepth:(i?"S"===r.qMode?d[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function ye(e,t){var r,n,i=ue(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:i,attrFn:n,valueFn:r}}function be(e,t,r){var n=r.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:n,field:e.field.key()}),i}function ve(e){for(var t=e.propsArr,r=e.props,n=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=r[t[s]],l=u.fields||[u],c=void 0,p=void 0;u.fields&&(c=[],p=[]);for(var d=function(e){var r=l[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===r.type?(m=r.value,y=String(r.value)):("function"==typeof r.value&&(d=function(e){return r.value(e,n)}),"function"==typeof r.label&&(f=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=r.reduce?r.reduce(m):m,y=r.reduceLabel?r.reduceLabel(y,m):String(m)):y=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=i,y=i)),u.fields){var b=d?d(m):m;c.push(b),p.push(f&&null!=y?f(y):null!=y?y:String(b))}else{var v=d?d(m):m;o[t[s]]={value:v,label:f?f(y):null!=y?y:String(v)},r.field&&(o[t[s]].source={field:r.field.key(),key:a})}},f=0;f<l.length;f++)d(f);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,n):c,label:"function"==typeof u.label?u.label(p,n):p})}}var qe=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=ae(n,e);return o&&o[0]?(t.tree=Y(o[0],r.children||function(e){return e[i]}),t.tree):null};function xe(e){for(var r=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=me(e),i=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(i.indexOf(e))})),a=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(i.indexOf(e))})),s={__root:{__id:"__root",qValues:[]}},u=0;u<r.length;u++){for(var l=r[u],c="__root",p=!1,d=0;d<o.length;d++){var f=l[o[d]],m="".concat(c,"__").concat(f.qText);s[m]||(s[m]=t({__id:m,__parent:c,qValues:[]},f),p=!0),c=m}if(p)for(var h=0;h<a.length;h++){var g=l[a[h]];s[c].qValues.push(g)}}var y=Object.keys(s).map((function(e){return s[e]}));return oe().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(y)}var De=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=r[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var p=l[c];if(p.field!==a){var d=ye(o,ge(p.field,{cube:n,cache:i}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=r.raw(),a=r.key(),s="S"===o.qMode?xe(r):qe(o,n,e);if(!s)return null;for(var u=s.height,l=[],c=0;c<=u;c++){var p=null;if(c>0)if("S"===o.qMode){var d=he(o)[c-1];p=n.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[c-1];c>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),p=n.fields[f]}var m=i.normalizeConfig(t(t({},e),{},{field:p?p.key():void 0}),r),h=m.props,g=m.main,y=Object.keys(h);l[c]={propsArr:y,props:h,main:g};var b=p?ge(p,{cube:o,cache:n}):{fieldDepth:0};De({propsArr:y,props:h,cube:o,cache:n,itemDepthObject:b,f:p})}for(var v=s.copy().descendants(),q=s.descendants(),x=0;x<q.length;x++){var D=l[q[x].depth].propsArr,S=l[q[x].depth].props,C=l[q[x].depth].main,E=v[x],M=E.data,I=be(C,M,{key:a});ve({propsArr:D,props:S,item:E,itemData:M,ret:I,sourceKey:a,isTree:!0}),q[x].data=I}return s}function Ce(e,t,n,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){var u=t.raw(),l=t.key();if(!qe(u,n,e))continue;var c="object"===r(o[s].field)?o[s].field:t.field(o[s].field),d=i.normalizeConfig(o[s],t),f=d.props,m=d.main,h=Object.keys(f),g=ge(c,{cube:u,cache:n}),y=ye({fieldDepth:0},g),b=y.nodeFn,v=y.attrFn,q=y.valueFn;De({propsArr:h,props:f,cube:u,cache:n,itemDepthObject:g,f:c});for(var x=!!o[s].trackBy,D=r(o[s].trackBy),S={},C=[],E=b(n.tree),M=[],I=0;I<E.length;I++){var A=E[I],w=v?v(q(A)):q(A);if(!m.filter||m.filter(w)){var O=be(m,w,{key:l});ve({propsArr:h,props:f,item:A,itemData:w,ret:O,sourceKey:l}),x&&i.track({cfg:o[s],itemData:w,obj:O,target:C,tracker:S,trackType:D}),M.push(O)}}x?a.push.apply(a,p(i.collect(C,{main:m,propsArr:h,props:f}))):a.push.apply(a,M)}return a}function Ee(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==dr||"undefined"!=typeof self&&self;var Me=Ee((function(e){
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),q=g>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,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=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-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+q}}(Et={exports:{}}),Et.exports);function At(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var It={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"},wt=/%$/,Ot=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Tt=/^\(oct\)/i,kt=/^\(dec\)/i,Lt=/^\(hex\)/i,_t=/^\(bin\)/i,Pt=/^\(rom\)/i,Rt=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Nt=/#|0/g;function Ht(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 Ft(e,t,n){var r=At(e);return n?r:new RegExp(r||"",t)}function Bt(e,t,n){var r,i,o,a,s,l,u,c,p,d,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(f=n)&&(f=At(f)),d&&(d=At(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(o=(o=m.match(p))?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(Ft(l,"g"),t)),u=n,n=".",u&&(o=o.replace(Ft(u,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Nt)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=wt.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Ft(t,null,!0),"|").concat(Ft(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}!function(){function e(t,n,r,i,o){xt(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 It;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()}St(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],Rt.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Rt.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Rt.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Bt(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Bt(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Bt(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,p="",d="",f=e;if(isNaN(e))return"".concat(f);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 Ot.test(t)?e=Ht(e,Number(/\d{2}/.exec(t)[0]),t,n):Tt.test(t)?e=Ht(e,8,t,n):kt.test(t)?e=Ht(e,10,t,n):Lt.test(t)?e=Ht(e,16,t,n):_t.test(t)?e=Ht(e,2,t,n):Pt.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&&(p=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=Mt(b+=o,v)||"0",u){var q=Math.max(0,Math.min(14,u.length)),x=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%1).toFixed(q).slice(2).replace(/0+$/,"");for(s=D.length;s<x;s++)D+="0";D&&(e+=o+D)}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)/,""),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(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=Mt(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+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var jt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],zt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Vt=["January","February","March","April","May","June","July","August","September","October","November","December"],Ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wt(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Kt(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,n,r){xt(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:jt,qDayNames:zt,qLongMonthNames:Vt,qMonthNames:Ut}),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=(Ct(i={},"T",o.qTimeFmt||"hh:mm:ss"),Ct(i,"D",o.qDateFmt||"YYYY-MM-DD"),Ct(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}St(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*Kt(t),r=60*Kt(n),i=60*Kt(r),o=1e3*Kt(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:Wt("".concat(t.year).slice(-2),2),YYY:Wt("".concat(t.year).slice(-3),3),def:function(e){return Wt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Wt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Wt("".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 Wt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Wt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Wt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Wt("".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 p=new RegExp(u.join("|"),"g");return t.replace(p,(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}))}}])}();var Yt=/xyz/.test((function(){}))?/\b_super\b/:/.*/,Gt=function(){};function Xt(e,t,n,r){0===arguments.length?this.set(0,0,0,0):this.set(e,t,n,r)}Gt.extend=function e(t,n){var r=this.prototype;"string"!=typeof t&&(n=t,t="Class");var i=Object.create(this.prototype);for(var o in n)i[o]="function"==typeof n[o]&&"function"==typeof r[o]&&Yt.test(n[o])?function(e,t){return function(){var n=this._super;this._super=r[e];var i=t.apply(this,arguments);return this._super=n,i}}(o,n[o]):n[o];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");var a=new Function("return (function ".concat(t,"(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });"))();return a.prototype=i,a.prototype.constructor=a,a.extend=e,a},Xt.prototype={toString:function(){return"".concat(this.x," ").concat(this.y," ").concat(this.width," ").concat(this.height)},clone:function(){return new Xt(this.x,this.y,this.width,this.height)},set:function(e,t,n,r){n>=0?(this.x=e,this.width=n):(this.x=e+n,this.width=-n),r>=0?(this.y=t,this.height=r):(this.y=t+r,this.height=-r)},setLTRB:function(e,t,n,r){e<=n?(this.x=e,this.width=n-e):(this.x=n,this.width=e-n),t<=r?(this.y=t,this.height=r-t):(this.y=r,this.height=t-r)},equal:function(e){return e&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},combineWith:function(e){var t=Math.max(e.getRight(),this.getRight()),n=Math.max(e.getBottom(),this.getBottom()),r=Math.min(e.x,this.x),i=Math.min(e.y,this.y);return new Xt(r,i,Math.max(0,t-r),Math.max(0,n-i))},intersectsWith:function(e){return!!e&&(this.x<=e.getRight()&&e.x<=this.getRight()&&this.y<=e.getBottom()&&e.y<=this.getBottom())},intersectsRect:function(e){return this.intersectsWith(e)},intersection:function(e,t){if(this.intersectsWith(e)){var n=Math.max(this.x,e.x),r=Math.max(this.y,e.y);return new Xt(n,r,Math.min(this.getRight(),e.getRight())-n,Math.min(this.getBottom(),e.getBottom())-r)}return t?null:new Xt(this.x,this.y,this.width,this.height)},union:function(e){var t=Math.min(this.x,e.x),n=Math.min(this.y,e.y);return new Xt(t,n,Math.max(this.getRight(),e.getRight())-t,Math.max(this.getBottom(),e.getBottom())-n)},pointInside:function(e,t){return e>=this.x&&e<=this.getRight()&&t>=this.y&&t<=this.getBottom()},rectInside:function(e){var t,n=e.getPoints();for(t=0;t<4;t++)if(!this.pointInside(n[t].x,n[t].y))return!1;return!0},getPoints:function(){var e=[];return e.push({x:this.x,y:this.y}),e.push({x:this.getRight(),y:this.y}),e.push({x:this.getRight(),y:this.getBottom()}),e.push({x:this.x,y:this.getBottom()}),e},getRight:function(){return this.x+this.width},getBottom:function(){return this.y+this.height},getCenterPoint:function(){return{x:this.x+this.width/2,y:this.y+this.height/2}},getBoundingRect:function(){return this},scale:function(e){var t=e-1,n=t*this.width/2,r=t*this.height/2;this.x-=n,this.y-=r,this.width*=e,this.height*=e},hasNaN:function(){return Number.isNaN(+this.x)||Number.isNaN(+this.y)||Number.isNaN(+this.width)||Number.isNaN(+this.height)}};var $t,Jt=new Xt(0,0,0,0),Zt=new Xt(0,0,0,0),Qt=Gt.extend("CubeSlicer",{init:function(){this.pages=[]},get:function(e){var t=this;return e.map((function(e){return t.getPage(e)}))},getPage:function(e){var t,n,r,i=[];for(n=0;n<this.pages.length;n++)if(t=this.pages[n].qArea,Jt.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Zt.set(t.qLeft,t.qTop,t.qWidth,t.qHeight),r=Zt.intersection(Jt,!0),i.push({coverage:r?r.clone():new Xt(0,0,0,0),idx:n}),t.qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[n]);return i.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),i[0].coverage.height>0&&i[0].coverage.width>0?this._extract(e,this.pages[i[0].idx]):{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qMatrix:[]}},destroy:function(){this.clear()},isEmpty:function(){return!(this.pages&&this.pages[0]&&this.pages[0].qArea.qHeight&&this.pages[0].qArea.qWidth)},clear:function(){this.pages=[]},store:function(e){this.pages=e},containsArea:function(e){for(var t,n=0;n<this.pages.length;n++)if((t=this.pages[n].qArea).qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return!0;return!1},contains:function(e){var t=this;return!(!this.pages||!this.pages.length)&&0===e.filter((function(e){return!t.containsArea(e)})).length},_extract:function(e,t){Jt.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Zt.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var n=Jt.intersection(Zt,!0);if(!n)return{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qMatrix:[]};var r=Math.max(0,e.qTop-t.qArea.qTop),i=Math.max(0,e.qLeft-t.qArea.qLeft),o=t.qMatrix.slice(r,r+n.height).map((function(e){return e.slice(i,i+n.width)}));return{qArea:{qTop:n.y,qLeft:n.x,qWidth:n.width,qHeight:n.height},qMatrix:o}}});function en(e,t){var n,r={};for(n in e)"qSubNodes"!==n&&e.hasOwnProperty(n)&&(r[n]=e[n]);return t.push(r),r}function tn(e,t,n){var r,i,o,a=[],s=[],l=0,u=0;for(n.length&&(l=n[0].qUp||0,u=n[n.length-1].qDown||0),r=0;r<n.length;++r)if((i=n[r]).qSubNodes.length>0&&(s=tn(e,t,i.qSubNodes)),o=null,(0===i.qSubNodes.length&&$t>=e&&$t<=e+t||s.length>0)&&(void 0!==(o=en(i,a)).qUp&&1===a.length&&(o.qUp=l+r),o.qSubNodes=s),0===i.qSubNodes.length&&$t++,$t===e+t){o&&void 0!==o.qDown&&(o.qDown=u+(n.length-1-r));break}return a}function nn(e,t,n){return $t=0,tn(e,t,n)}var rn=new Xt(0,0,0,0),on=new Xt(0,0,0,0),an=Qt.extend("PivotCubeSlicer",{init:function(){this._super(),this.requestedAreas=[]},getPage:function(e){var t,n,r,i=[];for(n=0;n<this.pages.length;n++)if(t=this.pages[n].qArea,rn.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),on.set(t.qLeft,t.qTop,t.qWidth,t.qHeight),r=on.intersection(rn,!0),i.push({coverage:r?r.clone():new Xt(0,0,0,0),idx:n}),t.qLeft<=e.qLeft&&t.qLeft+t.qWidth>=e.qLeft+e.qWidth&&t.qTop<=e.qTop&&t.qTop+t.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[n]);return i.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),i[0].coverage.height>0&&i[0].coverage.width>0?this._extract(e,this.pages[i[0].idx]):{qLeft:[],qTop:[],qData:[],qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0}}},_extract:function(e,t){rn.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),on.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var n=rn.intersection(on,!0);if(!n)return{qLeft:[],qTop:[],qData:[],qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0}};var r=Math.max(0,e.qTop-t.qArea.qTop),i=Math.max(0,e.qLeft-t.qArea.qLeft),o=t.qData.slice(r,r+n.height).map((function(e){return e.slice(i,i+n.width)}));return{qLeft:nn(r,n.height,t.qLeft),qTop:nn(i,n.width,t.qTop),qData:o,qArea:{qTop:n.y,qLeft:n.x,qWidth:n.width,qHeight:n.height}}}});function sn(e){if("pivot-table"===e.visualization)this.responseProperty="qPivotDataPages",this.slicer=new an;else{if("table"!==e.visualization)return;this.slicer=new Qt}var t=e.snapshotData.object.origDataPages;t||(t=e.qHyperCube[this.responseProperty]),this.slicer.store(t.filter((function(e){return e})))}var ln=function(){function e(t,n,r){k(this,e),this.layout=t,this.dataPath=n,this.responseProperty=r,sn.call(this,t)}return _(e,[{key:"getData",value:function(e){!function(e,t,n,r){if(e){t.snapshotData.object.origDataPages||(t.snapshotData.object.origDataPages=t.qHyperCube[r]);for(var i=0;i<n.length;i++)n[i].qHeight=Math.min(t.qHyperCube.qSize.qcy,n[i].qHeight),n[i].qTop=t.snapshotData.object.origDataPages[i].qArea.qTop;t.qHyperCube[r]=e.get(n)}}(this.slicer,this.layout,e,this.responseProperty);var t=bt(this.layout,"".concat(this.dataPath,".").concat(this.responseProperty));return Promise.resolve(t)}},{key:"setCacheOptions",value:function(){}},{key:"updateCache",value:function(){}}]),e}(),un={version:"0.28.0",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"K",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},color:{box:{paletteColor:{index:-1,color:"#e6e6e6"}},expressionLabel:"",point:{auto:!0,mode:"primary",useBaseColors:"off",expressionIsColor:!0}},dataPoint:{bubbleScales:100,displacement:"none"},dimensionAxis:{dock:"near",label:"auto",show:"all"},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},gridlines:{auto:!0,spacing:2},orientation:"horizontal",presentation:{visibleComponents:"points_box"},refLine:{refLines:[]},sorting:{autoSort:!0},showTitles:!0,subtitle:"",title:"",footnote:""};function cn(e){2===e.qHyperCubeDef.qInterColumnSortOrder.length?e.qHyperCubeDef.qInterColumnSortOrder=[1,0]:3===e.qHyperCubeDef.qInterColumnSortOrder.length&&(e.qHyperCubeDef.qInterColumnSortOrder=[1,2,0])}function pn(e){e.qHyperCubeDef.qDimensions.length>1&&e.color&&(e.color.point.persistent=!0)}function dn(e){var t=e.translator;return{path:"/qHyperCubeDef",dimensions:{min:1,max:2,description:function(e,n){var r;return r=0===n?"Visualizations.Descriptions.Point":"horizontal"===e.orientation?"properties.yAxis":"properties.xAxis",t.get(r)},added:function(e,t){cn(t),pn(t)},moved:function(e,t){cn(t),pn(t)},removed:function(e,t){cn(t),pn(t)}},measures:{min:1,max:1,description:function(e){var n="horizontal"===e.orientation?"properties.xAxis":"properties.yAxis";return t.get(n)}}}}var fn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hn={exports:{}};window;var gn=mn(hn.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"==w(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=2)}([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,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=w(p)&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(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(p,{name:n,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:n,newValue:i}));return p}},function(e,t,n){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"==w(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,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=w(p)&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(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(p,{name:n,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:n,newValue:i}));return p}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=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},a=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},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(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 p(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 m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(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 v(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 u=y(c(r[0],i),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var p=c(r[0],i),d=c(r[1],i),f=m(0),h=m(1),g=y(p,f),v=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function q(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var x={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var p=m(0),d=m(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return h(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,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===q({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=m(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(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,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=q({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}var S=i.a.bind(null,!0),C={},E=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function A(e){return void 0===e}function I(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function O(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]=A(e[n||t])?o:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!T(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?S({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);T(o,a)||I(t,i)||(A(a)?r.push({op:"add",path:s,value:o}):M(o)&&M(a)?r=r.concat(C.generate(a,o,s)):E(o)&&E(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&A(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(T(t,i))return r;if(!A(t[0])&&A(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){A(t[i])&&!I(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},C.apply=function(e,t){t.forEach((function(t){var n,r=O(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(E(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(E(o)&&E(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(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")}()}(l))}else if(M(o)&&M(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!I(n,e)&&delete n[e]})),S(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=O(e,t.from);E(r)?r.splice(+i,0,u.splice(+a,1)[0]):(r[i]=u[a],delete u[a])}else"remove"===t.op&&(E(r)?r.splice(+i,1):delete r[i])}))},C.clone=function(e){return S({},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)):S(e,t)};var k=C,L=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()},_="accumulation";function P(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===_)return n[r]}function R(e,t){var n=function(e,t){var n=a(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}var N={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},H={translationKey:"properties.modifier.accumulation",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return x.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,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=x.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=x.getNumStepComp(n,l),d=x.getAboveComp(n,l,c,p),f=x.getRangeComp("RangeSum",d);if(x.needDimension({modifier:n,properties:r,layout:i})){var m=x.getDimComp(u,1),h=x.getDimComp(u,0),g=x.getAggrComp(f,m,h);f=n.showExcludedValues?x.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,N)},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(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(R(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(R(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(R(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(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return x.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=P(t,e);return o&&!o.disabled}}}},F="movingAverage";function B(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===F)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===F)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return x.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=x.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=r.showExcludedValues&&r.nullSuppression,d=x.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=x.getNumStepComp(r,u),m=x.getAboveComp(r,u,d,f);if(r.nullSuppression)t=x.getRangeComp("RangeAvg",m);else{var h=x.getRangeComp("RangeSum",m),g=function(e,t){var n=x.getRowNoComp(e,t);if(!x.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(x.needDimension({modifier:r,properties:i,layout:o})){var v=x.getDimComp(c,1),b=x.getDimComp(c,0),q=x.getAggrComp(y,v,b);y=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:q}):q}return y},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,z)},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(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(j(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(j(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(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=B(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=B(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(F))return!1;var o=B(t,e);return o&&!o.disabled}}}},U="difference";function W(e,t){var n=a(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=a(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 Y={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},G={translationKey:"properties.modifier.difference",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return x.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=x.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=x.getAboveComp(n,l,c),d="".concat(c," - ").concat(p);if(x.needDimension({modifier:n,properties:r,layout:i})){var f=x.getDimComp(u,1),m=x.getDimComp(u,0),h=x.getAggrComp(d,f,m);d=n.showExcludedValues?x.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,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!x.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 x.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}}}},X={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},$={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},J="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}function Q(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)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:$.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:$.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:$.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:X.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.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:$.DISREGARD_ALL_DIMENSIONS,selectionScope:X.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(x.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?"<".concat(x.getDimDefWithWrapper(n),">"):""}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return x.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=x.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=x.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=n.selectionScope,d=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ie(t),l=oe(t,n,r),u=""===s&&""===l?"":s||l,c=ae(i,o),p=se(i,o,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=x.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,n.field,n.value,d,l,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!x.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:X.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===X.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===X.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:$.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)===$.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se},ue={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},pe=ce;function de(e){return(de="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}var fe={accumulation:H,movingAverage:V,difference:G,normalization:le},me=(t.default={modifiers:fe,apply:he,applyModifiers:ge,cleanUpMeasure:ye,destroy:function(e){e&&me[e.id]&&me[e.id].masterItemSubscriber&&(me[e.id].masterItemSubscriber&&me[e.id].masterItemSubscriber.unsubscribe(),delete me[e.id])},hasActiveModifiers:ve,getActiveModifier:be,initBase:pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:n,layout:r})}))},measureBase:ue,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);we({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||_e({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:qe},{});function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;me[t.id]=me[t.id]||{isFirstTime:!0};var l=me[t.id].isFirstTime;if(me[t.id].isFirstTime=!1,n&&"object"===de(n))return ge({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(o||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=me[t.id].lastReloadTime;if(me[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ve({measures:p,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ie({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:p,layout:u,model:t,lastReloadTime:d});return f||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 we({modifiers:De(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Ce(n);var r=Pe(n);return Oe({model:t}).then((function(i){return Te({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ie({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Me(t)&&x.simplifyExpression(t.qDef.base.qDef)!==x.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),ge({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"===de(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Pe(n);return Re({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ye(e)})),Le({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),Ce(r);var d=Pe(r);return Re({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:n}))return t.forEach((function(e){return ye(e)})),Promise.resolve();var l=o?void 0:Pe(n);return Oe({model:r,dimensionAndFieldList:s}).then((function(e){return Te({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){we({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;pe.isValid(t)||pe.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(fe[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)");fe[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[n.type].updateModifier&&fe[n.type].updateModifier(n,r.qHyperCubeDef);var a=ue.getExpression(t),s=fe[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:o}),function(e){var t=a(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}),Ee(t)):ye(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Le({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ye(e){!function(e){var t=De(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!fe[e.type]}))}(e)?pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ee(e)}function ve(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return we({modifiers:De(e),properties:n,layout:r})}))}function be(e){var t=De(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(fe[r.type]&&!r.disabled)return r}}function qe(e){var t=be(e);return!t||fe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function De(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Se(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&Se(t)!==e.qDef.qDef?delete e.qDef.base:!pe.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Ee(e){var t=De(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!fe[t.type]&&Se(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Me(e){return e.base||e.qDef&&e.qDef.base}function Ae(e){var t=Me(e);return e.qLibraryId||t&&t.qLibraryId}function Ie(e){var t=e.measure,n=e.properties,r=e.layout;return!Ae(t)&&we({modifiers:De(t),properties:n,layout:r})}function we(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!fe[e.type])&&(void 0===i[e.type]&&(i[e.type]=fe[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Oe(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 Te(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 Le(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(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&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):L(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function _e(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&fe[e.type]&&fe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Pe(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=De(t);if(we({modifiers:r,properties:e})){var o=Ae(t);o&&n.push(o),i=i||_e({modifiers:r,properties:e})}})),a(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)?(me[t.id].masterItemSubscriber=me[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(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,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[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(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return he({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),me[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function i(e){return(i="function"==typeof Symbol&&"symbol"==w(Symbol.iterator)?function(e){return w(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":w(e)})(e)}n.r(t);var o={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:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(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 s(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)?s(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 s(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 l(e){return function(e){if(Array.isArray(e))return u(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 u(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)?u(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 u(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 c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c},d=n(1),f=n.n(d),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function q(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var x=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return S(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 S(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)?S(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 S(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 C(e){return function(e){if(Array.isArray(e))return E(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 E(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)?E(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 E(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 M={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=v(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=b(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=q(a.max,i.dimensions.length,x),l=q(a.min,i.dimensions.length,0);return{maxDimensions:q(o.max,s,x),minDimensions:q(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(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=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=C(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function A(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var I={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:i,qHyperCubeDef:l}),m.addMeasures({exportFormat:i,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:i,properties:a}),r||m.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(h(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(h(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(h(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f={qChildren:[]},m=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),h=o.getValue(r,u||"").qHyperCubeDef,g=o.getValue(m,u||"").qHyperCubeDef,y=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),v=y.maxDimensions,b=y.minDimensions,q=y.maxMeasures,x=y.minMeasures,D=l.defaultDimension,S=void 0===D?M.getDefaultDimension():D,C=l.defaultMeasure,E=void 0===C?M.getDefaultMeasure():C;g.qDimensions.length=0,g.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:b,maxMeasures:q,minMeasures:x})&&M.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:b,maxMeasures:q,minMeasures:x,newHyperCubeDef:g}),M.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:b,newHyperCubeDef:g,defaultDimension:S}),M.addMeasures({exportFormat:t,maxMeasures:q,minMeasures:x,newHyperCubeDef:g,defaultMeasure:E}),M.updateDimensionsOnAdded({newProperties:m,dataDefinition:a,hypercubePath:u}),M.updateMeasuresOnAdded({newProperties:m,dataDefinition:a,hypercubePath:u}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:g}),M.copyPropertyIfExist("qMaxStackedCells",h,g),M.copyPropertyIfExist("qNoOfLeftDims",h,g),M.copyPropertyOrSetDefault("qInitialDataFetch",h,g,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",h,g,"S"),M.copyPropertyOrSetDefault("qReductionMode",h,g,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",h,g),M.copyPropertyOrSetDefault("qIndentMode",h,g),M.copyPropertyOrSetDefault("qShowTotalsAbove",h,g),M.importCommonProperties(m,t,r),f.qProperty=m;var I=o.getValue(c||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:g.qMeasures,modifierTypes:I}),d&&A(f.qProperty,"storedFilters"),"S"===g.qMode&&A(f.qProperty,"dynamicScript"),f}},O={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function T(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function k(e,t){return e.length!==t}var L={create:function(e,t){if(!e||!O[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(T(a,t,r,i),k(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},_={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},P={colorModeOptions:{primary:function(){return!0},dimension:function(e){return _.getNumDimensions(e)>0&&_.getNumMeasures(e)<=1},multiColor:function(e){return _.getNumMeasures(e)>1},measure:function(e){return _.getNumDimensions(e)>0},expression:function(e){return _.getNumMeasures(e)>=1}}},R={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return _.getNumMeasures(e)>=1}}},N={scatterplot:R,"sn-scatter-plot":R,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return _.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return _.getNumDimensions(e)>1},multiColor:function(e){return _.getNumMeasures(e)>1},measure:function(e){return _.getNumDimensions(e)<=1},expression:function(e){return _.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return _.getNumDimensions(e)>=1},multiColor:function(e){return _.getNumMeasures(e)>1},measure:function(e){return _.getNumDimensions(e)>=1},expression:function(e){return _.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return _.getNumDimensions(e)>=1}}}};function H(e,t,n){if(Array.isArray(e[t])){var r=p.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function F(e,t){var n=L.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){H(e,"qAttributeDimensions",n),H(e,"qAttributeExpressions",n)})),t.forEach((function(e){H(e,"qAttributeDimensions",n),H(e,"qAttributeExpressions",n)}))}function B(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;F(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=L.create(L.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=p.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=_.getItemLabel(t);switch(B(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||_.wrapFieldName(t.name),key:_.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&V.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=L.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return U(e,z("dimension",!!a,a||r)),!!a}function K(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&B(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=z("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,U(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function Y(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&B(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=z("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,U(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=L.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var G={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(N[t]||P).colorModeOptions||P.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?F(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?K(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?Y(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),F(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},X={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=I.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=L.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return L.moveByIdFromGroup(a,[],"qAttributeDimensions",u),L.moveByIdFromGroup(a,[],"qAttributeExpressions",u),L.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=I.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l}),c=u.qProperty,p=o.getValue(c,"visualization"),d=o.getValue(c,"qHyperCubeDef.qDimensions",[]),f=o.getValue(c,"color.mode",""),m=o.getValue(c,"color.auto",""),h=G.getCanColorBy(c,p),g=G.shouldUpdateColorBy({canColorBy:h,autoColor:m,colorMode:f,dimensions:d});return h[f]?G.shouldAddColorByExpression({shouldUpdateColorBy:g,properties:c})&&G.addColorByExpression(c):G.switchToAutoColor(c),g&&G.updateColorBy(c,"qHyperCubeDef."),G.shouldSwitchToColorPersistent(c)&&G.changeProperty(c,"color.persistent",!0),G.deleteTotalMode(d),u}},$=["bar","marker","line"],J={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?A(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):A(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),$.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=X.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=X.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l}),c=u.qProperty;return J.handleAutoMinMax({initialProperties:n,properties:c}),J.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:a}),J.setInterColumnSortOrder(c.qHyperCubeDef),u}};function Q(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Q(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function te(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Q(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var ne={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),te({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:I,colorChart:X,axisChart:Z,quarantineProperty:h,unquarantineProperty:A,quarantineArrayProp:ee,unquarantineArrayProp:te,conditionalColoring:ne,conditionalShow:re}}])),yn=["altLabel","auto","autoMinMax","byDimDef","byMeasureDef","dimensionScheme","expressionIsColor","expressionLabel","measureMax","measureMin","measureScheme","mode","paletteColor","persistent","reverseScheme","useBaseColors","useDimColVal"];function vn(e,t,n){for(var r=0;r<n.length;++r){var i=n[r];void 0!==e[i]&&(t[i]=e[i],delete e[i])}}var bn={importColors:function(e){e.color.point=e.color.point||{},vn(e.color,e.color.point,yn),e.color.colorExpression&&(e.color.point.expression={qValueExpression:{qExpr:e.color.colorExpression}},delete e.color.colorExpression),e.color.point.expressionIsColor=!0},exportColors:function(e){vn(e.color.point,e.color,yn),e.color.colorExpression=bt(e,"color.point.expression.qValueExpression.qExpr",""),delete e.color.point.expression}};function qn(e){var t=e.dataDefinition,n=e.defaultPropertyValues,r=e.exportFormat,i=e.initialProperties,o=gn.axisChart.importProperties({exportFormat:r,initialProperties:i,dataDefinition:t,defaultPropertyValues:n}),a=o.qProperty;return 3===a.qHyperCubeDef.qInterColumnSortOrder.length&&(a.qHyperCubeDef.qInterColumnSortOrder=[1,2,0]),bn.importColors(a),a.qHyperCubeDef.qAlwaysFullyExpanded=!0,o}function xn(e){var t=e.propertyTree,n=e.viewDataMode,r=gn.axisChart.exportProperties({propertyTree:t,viewDataMode:n});return bn.exportColors(t.qProperty),r}var Dn=function(e){var t=dn(e);return{properties:un,data:{targets:[t]},importProperties:function(e){var n=e.exportFormat,r=e.initialProperties;return qn({dataDefinition:t,exportFormat:n,initialProperties:r})},exportProperties:xn}},Sn={wrapExpression:function(e){var t=e.replace(/\]/g,"]]");return t?"[".concat(t,"]"):""}};var Cn={replaceExpressionTokens:function(e,t,n){var r,i,o={start:n&&n.start||"{{",end:n&&n.end||"}}"},a=e;for(var s in t)r=t[s],i=o.start+s+o.end,a=a.replace(En(i,!0),r);return a},createRegExp:En};function En(e,t,n){var r=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),i=n?"(".concat(r,")"):r;return t?new RegExp(i,"g"):new RegExp(i)}var Mn={generateExpression:function(e,t){var n={};if(t){var r=function(e){var r=t[e],i=r.wrap?Sn.wrapExpression(r.value):r.value;n[e]=i,(r.variations||[]).forEach((function(t){var r=function(e,t,n){if(""===t)return"";var r=Cn.createRegExp(n,!0,!0),i=e.split(r),o="";return i.forEach((function(e){o+=e!==n?e:t})),o}(t,i,e);n[t]=r}))};for(var i in t)r(i)}return Cn.replaceExpressionTokens(e,n)}};var An={generateHyperCubeDef:function(e,t,n,r,i){return function(e,t,n,r){var i,o={},a=[];e.forEach((function(e){Ln(e.match(kn("Dim"))).forEach((function(e){a.push(wn(t.qDimensions[e],r,e,n).then((function(t){o["Dim[".concat(e,"]")]={value:t,wrap:!0}})))})),Ln(e.match(kn("Mea"))).forEach((function(e){a.push(On(t.qMeasures[e],r).then((function(t){o["Mea[".concat(e,"]")]={value:t}})))}))})),i=a.length?Promise.all(a).then((function(){return Promise.resolve(o)})):Promise.resolve(o);return i}(e.dimensions.concat(e.measures),t,n,r).then((function(n){var r=M({},n,i),o=M(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((function(e){o.qDimensions.push({qDef:{qFieldDefs:["=".concat(Mn.generateExpression(e,r))]}})})),e.measures.forEach((function(e){o.qMeasures.push({qDef:{qDef:Mn.generateExpression(e,r)}})})),o}))},getAllHyperCubeExpressions:function(e,t,n){return In.apply(this,arguments)}};function In(){return(In=T(regeneratorRuntime.mark((function e(t,n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.qDimensions.map((function(e,t){return wn(e,r,t,n)})),o=t.qMeasures.map((function(e){return On(e,r)})),e.next=4,Promise.all(i);case 4:return e.t0=e.sent,e.next=7,Promise.all(o);case 7:return e.t1=e.sent,e.abrupt("return",{dimensions:e.t0,measures:e.t1});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wn(e,t,n,r){if(e.qLibraryId)return Tn(e.qLibraryId,"dimension",t,n,r);var i=r.qDimensionInfo[n].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function On(e,t){return e.qLibraryId?Tn(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function Tn(e,t,n,r,i){return n?n["dimension"===t?"getDimension":"getMeasure"](e).then((function(e){return e.getProperties().then((function(e){return"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[r].qGroupPos]:e.qMeasure.qDef}))})):(console.warn("No app provided, returning library id"),e)}function kn(e){return new RegExp("\\{\\{".concat(e,"\\[\\d\\]\\}\\}"),"g")}function Ln(e){return e?e.map((function(e){return e.substr(6,1)})):[]}function _n(e){return e=e||function(){return!1},{get:function(t){var n=e()?-1:1;switch(t("integer")*n){case-1:return"descending";case 1:return"ascending";default:return"disabled"}},set:function(t,n){var r=e();switch(t){case"descending":n("integer",r?1:-1);break;case"ascending":n("integer",r?-1:1);break;case"disabled":n("integer",0);break;default:n("integer",void 0)}}}}var Pn={booleanConvertFunctions:function(e,t){return e=e||function(){return!1},t=t||1,{get:function(e){return!!e("integer")},set:function(n,r){if(n){var i=e()?-1:1;r("integer",i*=t)}else r("integer",0)}}},enumConvertFunctions:_n,invertedEnumConvertFunctions:function(e){return _n((function(){return!e||!e()}))}},Rn=[{value:"ascending",translation:"properties.sorting.ascending"},{value:"descending",translation:"properties.sorting.descending"}];function Nn(e,t,n){return{type:"items",items:{toggled:{type:"boolean",ref:e,translation:t,convertFunctions:n.toggled},order:{type:"string",component:"dropdown",ref:e,options:Rn,convertFunctions:n.sorting,show:function(t){return 0!==bt(t,e,0)}}}}}var Hn={state:function(e,t){return Nn(e=e||"qSortByState","properties.sorting.sortByState",{toggled:Pn.booleanConvertFunctions(t),sorting:Pn.invertedEnumConvertFunctions(t)})},ascii:function(e,t){return Nn(e=e||"qSortByAscii","properties.sorting.sortByAlphabetic",{toggled:Pn.booleanConvertFunctions(t),sorting:Pn.enumConvertFunctions(t)})},numeric:function(e,t){return Nn(e=e||"qSortByNumeric","properties.sorting.sortByNumeric",{toggled:Pn.booleanConvertFunctions(t,-1),sorting:Pn.enumConvertFunctions(t)})},expression:function(e,t){e=e||"qSortByExpression";var n={toggled:Pn.booleanConvertFunctions(t),sorting:Pn.enumConvertFunctions(t)},r=Nn(e,"properties.sorting.sortByExpression",n);return r.items.expression={type:"number",component:"expression",expressionType:"ValueExpr",ref:"qExpression",translation:"Common.Expression",defaultValue:"",show:function(t){return 0!==bt(t,e,0)}},r},frequency:function(e,t){return Nn(e=e||"qSortByFrequency","properties.sorting.sortByFrequency",{toggled:Pn.booleanConvertFunctions(t),sorting:Pn.invertedEnumConvertFunctions(t)})}},Fn={DATA_PATH:"qUndoExclude",HYPERCUBE_DEF_PATH:"qHyperCubeDef",HYPERCUBE_PATH:"qHyperCube",CHART_ID:"object.distributionPlot",AUTO_SORT:"sorting.autoSort",SORT_CRITERIA:"sorting.sortCriteria",SORTING_ELEMENT_ID:"sorting.elementId",SORTING_ELEMENT_MIN_ID:"distplot-exp-min",SORTING_ELEMENT_MAX_ID:"distplot-exp-max",SORTING_EXPRESSION:"sorting.expression",MAX_GLYPH_COUNT:20,MAX_STACKED_VALUES:3e3,HORIZONTAL:"horizontal",BOX_PADDING:2,POINT_BANDWIDTH_BASE_RATIO:.35,MAX_POINT_BASE_SIZE_PX:34,MIN_POINT_PIXELS:5,JITTER_PARAMETER:3,BUBBLE_SCALES_MAX:100};function Bn(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qDimensions.length>1||e.qHyperCube&&e.qHyperCube.qDimensionInfo&&e.qHyperCube.qDimensionInfo.length>1}Object.freeze(Fn);var jn={hasMultipleDimensions:Bn,getOuterDimensionCardinality:function(e){var t=bt(e,Fn.HYPERCUBE_PATH);return Bn(e)?t&&t.qDimensionInfo[1].qCardinal:1},isAutoSort:function(e){return bt(e,Fn.AUTO_SORT,!1)},isSortByExpression:function(e){return 0!==bt(e,"".concat(Fn.SORT_CRITERIA,".sortByExpression"),0)},isSortByNumeric:function(e){return 0!==bt(e,"".concat(Fn.SORT_CRITERIA,".sortByNumeric"),0)},isSortByAscii:function(e){return 0!==bt(e,"".concat(Fn.SORT_CRITERIA,".sortByAscii"),0)}},zn={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0},Vn=function(e,t){if(!e||!zn[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},Un=function(e,t,n){return!!e&&(n=n||"id",e.filter((function(e){return e[n]===t}))[0])},Wn=function(e,t,n){var r=-1;return e&&(n=n||"id",e.forEach((function(e,i){e[n]===t&&(r=i)}))),r},Kn={CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"};var Yn={getColorByDefinition:function(e,t,n){var r,i,o,a={};switch(e){case"dimension":n.qLibraryId?(a.type="dimension",a.name=n.qLibraryId,a.id=n.qLibraryId):(a.type="field",t?(a.name=n.label||n.qDef,a.id=n.qDef):(i=!!(r=n.qDef).qLabelExpression,o=r.qFieldLabels&&r.qFieldLabels[0],a.name=r.qFieldDefs[0],a.label=i?r.qLabelExpression:o?r.qFieldLabels[0]:r.qFieldDefs[0]));break;default:throw new Error("Default-property-logic.js: getColorByDefinition: Illegal input")}return a}};var Gn={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0},useLocalFormat:function(e){var t,n;e.qNumFormat=(null===(t=e.quarantine)||void 0===t?void 0:t.qNumFormat)||{},e.isCustomFormatted=(null===(n=e.quarantine)||void 0===n?void 0:n.isCustomFormatted)||!1,e.quarantine=void 0},isUsingMasterNumberFormat:function(e){var t,n;return null!==(t=!(null==e||null===(n=e.quarantine)||void 0===n||!n.qNumFormat))&&void 0!==t&&t}},Xn=function(e,t,n){var r,i,o,a,s=bt(n,"mode"),l=bt(n,"auto"),u=bt(e,"".concat(t,"qDimensions"),[]),c=bt(e,"".concat(t,"qMeasures"),[]);if(!l&&"byDimension"===s&&u.length)(r=bt(n,"byDimDef"))&&nr(n,r.label),r&&r.activeDimensionIndex>-1?(r.activeDimensionIndex=Math.min(r.activeDimensionIndex,u.length-1),i=u[r.activeDimensionIndex],(a=Yn.getColorByDefinition("dimension",!1,i)).activeDimensionIndex=r.activeDimensionIndex,er(n,a)):r&&r.key||(i=u[u.length-1],o=Un(i.qAttributeDimensions,Kn.COLOR_BY_ALTERNATIVE),er(n,Yn.getColorByDefinition("dimension",!!o,o||i)));else{if(!l&&"byMeasure"===s&&u.length)throw new Error("not suported in any 444-chart");"byMultiple"===s&&c.length<2&&qt(n,"mode","primary")}},$n=function(e,t,n){var r=bt(n,"mode"),i=bt(n,"auto"),o=bt(e,"".concat(t,"qDimensions"),[]),a=bt(e,"".concat(t,"qMeasures"),[]),s=bt(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);!i&&"byDimension"===r&&o.length?tr(n,!0,o,s,a,bt(n,"byDimDef.label")):!i&&"byMeasure"===r&&o.length?tr(n,!1,o,s,a,bt(n,"byMeasureDef.label")):Jn(o,s)};function Jn(e,t){e.forEach((function(e){Zn(e,Kn.COLOR_BY_ALTERNATIVE,"qAttributeDimensions"),Zn(e,Kn.COLOR_BY_ALTERNATIVE,"qAttributeExpressions")})),t.forEach((function(e){Zn(e,Kn.COLOR_BY_ALTERNATIVE,"qAttributeDimensions"),Zn(e,Kn.COLOR_BY_ALTERNATIVE,"qAttributeExpressions")}))}function Zn(e,t,n){if(e[n]){var r=Wn(e[n],t);r>=0&&e[n].splice(r,1)}else e[n]=[]}function Qn(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}function er(e,t,n,r){var i=n?"expression":t.type,o=e.mode;switch(nr(e,t.label||t.name||""),i){case"field":o="byDimension",e.byDimDef={label:t.label||Qn(t.name),key:Qn(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":o="byMeasure",e.byMeasureDef={label:n||t.label||t.name,key:n||t.name,type:"expression"};break;case"dimension":o="byDimension",e.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":o="byMeasure",e.byMeasureDef={label:t.name,key:t.id,type:"libraryItem"},e.formatting&&Gn.useMasterNumberFormat(e.formatting)}r||(e.auto=!1,e.mode=o)}function tr(e,t,n,r,i,o){Jn(n,r);var a=n[n.length-1];if(a){var s=bt(e,t?"byDimDef":"byMeasureDef"),l=bt(e,"formatting.qNumFormat"),u=bt(e,"formatting.isCustomFormatted");if(s){var c=Vn(Kn.COLOR_BY_ALTERNATIVE);switch(s.type){case"expression":c.label=o||s.label,t?c.qDef=s.key:(c.qExpression=s.key,l&&(c.qNumFormat=l,c.isCustomFormatted=u));break;case"libraryItem":if(!t){var p=-1;i.forEach((function(e,t){s.key===e.qLibraryId&&(p=t)})),c.matchMeasure=p,l&&(c.qNumFormat=l,c.isCustomFormatted=u)}c.qLibraryId=s.key,c.colorMapRef=s.key}t?(c.qSortBy={qSortByAscii:1},a.qAttributeDimensions.push(c)):a.qAttributeExpressions.push(c)}}}function nr(e,t){if(t){var n="="===t.charAt(0);e.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function rr(e){return!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor)}function ir(e){return"libraryItem"===bt(e,"color.point.byDimDef.type")}function or(e){return"libraryItem"===bt(e,"color.point.byMeasureDef.type")}function ar(e){return!0===bt(e,"color.point.auto")}function sr(e){return!ar(e)&&"byDimension"===bt(e,"color.point.mode")}function lr(e){return!ar(e)&&"byMeasure"===bt(e,"color.point.mode")}var ur={measuresHasBaseColors:function(e){return bt(e,"layout.qHyperCube.qMeasureInfo",[]).filter((function(e){return!!rr(e)})).length>0},dimensionsHasBaseColors:function(e){return bt(e,"layout.qHyperCube.qDimensionInfo",[]).filter((function(e){return!!rr(e)})).length>0},onGlobalChangeColors:function(e){Xn(e,"qHyperCubeDef.",e.color.point)},onChangeCalcCond:function(e){var t,n=null==e?void 0:e.qHyperCubeDef,r=null==e||null===(t=e.qUndoExclude)||void 0===t?void 0:t.qHyperCubeDef;n&&r&&(r.qCalcCond=n.qCalcCond,r.qCalcCondition=n.qCalcCondition)},isColorByDimension:sr,isColorByMeasure:lr,isColorAuto:ar,isColorByExpression:function(e){return!ar(e)&&"byExpression"===bt(e,"color.point.mode")},isColorBySingle:function(e){return!ar(e)&&"primary"===bt(e,"color.point.mode","primary")},isDimensionLibraryItem:ir,isMeasureLibraryItem:or,showLegend:function(e){var t=bt(e,"color.point.mode","primary");return"primary"!==t&&"byExpression"!==t&&!1===ar(e)},showColorByLabel:function(e){var t=sr(e)&&!1===ir(e),n=lr(e)&&!1===or(e),r=bt(e,"color.point.byDimDef.activeDimensionIndex")>-1;return t&&!r||n}};function cr(e,t){this.getSettings=e,this.getElements=t}function pr(e){var t=e.qDef.qSortCriterias;t[0]||t.push({});var n=t[0],r=this.getSettings();qt(n,"qSortByExpression",r.SORT_BY_EXPRESSION),qt(n,"qSortByAscii",r.SORT_BY_ASCII),qt(n,"qSortByNumeric",r.SORT_BY_NUMERIC),qt(n,"qSortByLoadOrder",r.SORT_BY_LOAD_ORDER),n.qExpression||(n.qExpression={});var i=dr(this.getElements());n.qExpression.qv=i.exp}function dr(e){var t=e.filter((function(e){return e.isDefault}));return 0===t.length?e[0]:t[0]}cr.prototype.applyAutoSorting=pr,cr.prototype.applyDefaultCustomSorting=function(e,t){pr.call(this,e);var n=dr(this.getElements()),r=e.qDef.qSortCriterias[0];t.elementId=n.id,t.sortCriteria={},qt(t.sortCriteria,"sortByExpression",r.qSortByExpression),qt(t.sortCriteria,"sortByAscii",r.qSortByAscii),qt(t.sortCriteria,"sortByNumeric",r.qSortByNumeric),qt(t.sortCriteria,"sortByLoadOrder",r.qSortByLoadOrder)},cr.prototype.applyCustomSorting=function(e,t){var n=e.qDef.qSortCriterias[0];if(qt(n,"qSortByExpression",t.sortCriteria.sortByExpression),qt(n,"qSortByAscii",t.sortCriteria.sortByAscii),qt(n,"qSortByNumeric",t.sortCriteria.sortByNumeric),qt(n,"qSortByLoadOrder",t.sortCriteria.sortByLoadOrder),1!==n.qSortByExpression&&-1!==n.qSortByExpression)return;n.qExpression||(n.qExpression={});if(t.elementId){var r=function(e,t){var n=e.filter((function(e){return e.id===t}));0===n.length&&function(e){throw new Error("Sorter: ".concat(e))}("Could not find any element matching the element '".concat(t,"'"));return n[0]}(this.getElements(),t.elementId);n.qExpression.qv=r.exp}else n.qExpression.qv=t.expression.qValueExpression.qExpr};var fr={create:function(e,t){return new cr(e,t)}};var mr={applySorting:function(e,t,n){var r=n.autoSort,i=!!n.sortCriteria;r?e.applyAutoSorting(t):i?e.applyCustomSorting(t,n):e.applyDefaultCustomSorting(t,n)}};var hr={ASCII:{ELEMENT:void 0,SORT_BY_EXPRESSION:void 0,SORT_BY_ASCII:1,SORT_BY_NUMERIC:1,SORT_BY_LOAD_ORDER:1}};Object.freeze(hr.ASCII),Object.freeze(hr);var gr=M(!0,{DIST_MAX:{ELEMENT:"distplot-exp-max",SORT_BY_EXPRESSION:-1,SORT_BY_ASCII:1,SORT_BY_NUMERIC:1,SORT_BY_LOAD_ORDER:1}},hr);var yr={getSettings:function(e){return bt(e,"qHyperCube.qDimensionInfo.1.qCardinal",1)>10?gr.DIST_MAX:gr.ASCII}};function vr(e,t,n,r){var i="Fractile";0===e?i="Min":1===e&&(i="Max");var o=t?Sn.wrapExpression(t):"",a=n?Sn.wrapExpression(n):"";return"".concat(i,"( ").concat("total {{<outerDimString>}} Aggr( {{innerMeasureString}}, {{outerDimString,}} {{innerDimString}} )",", ").concat(e," )").replace(/{{innerDimString}}/g,o).replace(/{{outerDimString}}/g,a).replace(/{{<outerDimString>}}/g,n?"<".concat(a,">"):"").replace(/{{outerDimString,}}/g,n?"".concat(a,","):"").replace(/{{innerMeasureString}}/g,(r||"").replace(/^=/,""))}var br={getElementIds:function(){return[Fn.SORTING_ELEMENT_MIN_ID,Fn.SORTING_ELEMENT_MAX_ID]},getElements:function(e,t,n,r){var i=t[0],o=t[1],a=e[0],s=vr(0,i,o,a),l=vr(1,i,o,a);return[{id:Fn.SORTING_ELEMENT_MIN_ID,label:r.get("properties.distributionPlot.min"),exp:s,isDefault:Fn.SORTING_ELEMENT_MIN_ID===n.ELEMENT},{id:Fn.SORTING_ELEMENT_MAX_ID,label:r.get("properties.distributionPlot.max"),exp:l,isDefault:Fn.SORTING_ELEMENT_MAX_ID===n.ELEMENT}]},getFractileExpression:vr};function qr(e){throw new Error("distributionplot-sorter.applySorting: ".concat(e))}function xr(e,t,n,r){if(e.qUndoExclude){e.sorting||(e.sorting={autoSort:!0});var i=e.qUndoExclude.qHyperCubeDef.qDimensions;i.length>=2?e.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[0,2,1]:e.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[1,0];var o=function(){return yr.getSettings(t)},a=fr.create(o,(function(){var e=o();return br.getElements(n.measures,n.dimensions,e,r)})),s=i[0],l=e.sorting;mr.applySorting(a,s,l)}}var Dr={applySorting:function(e,t,n,r,i){return function(e){var t=e.qHyperCubeDef;t?t.qDimensions?t.qMeasures?(!t.qDimensions.length||t.qDimensions.length<2)&&qr("'qHyperCubeDef.qDimensions' has no outer dimension"):qr("no 'qHyperCubeDef.qMeasures' in properties arg"):qr("no 'qHyperCubeDef.qDimensions' in properties arg"):qr("no 'qHyperCubeDef' in properties arg")}(e),r?xr(e,t,r,i):An.getAllHyperCubeExpressions(e.qHyperCubeDef,t.qHyperCube,n).then((function(n){xr(e,t,n,i)}))}},Sr="".concat(Fn.SORT_CRITERIA,".sortByExpression");var Cr={updateSortOrder:function(e,t){if(t){var n=bt(e,Sr);if(-1===n||1===n){var r=bt(e,Fn.SORTING_ELEMENT_ID),i=bt(t,Fn.SORTING_ELEMENT_ID),o=r===Fn.SORTING_ELEMENT_MAX_ID,a=r===Fn.SORTING_ELEMENT_MIN_ID&&i===Fn.SORTING_ELEMENT_MAX_ID,s=o&&(!!!i||i===Fn.SORTING_ELEMENT_MIN_ID),l=bt(t,Sr),u=o&&!(-1===l||1===l)&&1===n;a?qt(e,Sr,1):(s||u)&&qt(e,Sr,-1)}}}};function Er(e){return!bt(e,"color.point.auto")&&"byDimension"===bt(e,"color.point.mode")&&bt(e,"qHyperCubeDef.qMeasures.length",0)<=1}function Mr(e){var t=e.flags,n=e.translator,r=e.anything.sense.theme,i=function(e){return{color:e,index:r.getDataColorPickerPalettes()[0].colors.indexOf(e)}},o={translation:"properties.colors",type:"items",items:{colors:{type:"items",items:{pointColor:{type:"items",translation:"properties.colorsAndLegend",grouped:!0,items:{colors:{type:"items",items:{autoColor:{ref:"color.point.auto",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},colorMode:{ref:"color.point.mode",type:"string",component:"dropdown",options:function(){return[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}]},defaultValue:"primary",show:function(e){return!bt(e,"color.point.auto",!0)}},boxColor:{ref:"color.box.paletteColor",translation:"properties.distributionPlot.boxColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=r.getStyle(Fn.CHART_ID,"box","fill");return i(e)}},paletteColor:{ref:"color.point.paletteColor",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",dualOutput:!0,show:function(e){return!bt(e,"color.point.auto",!0)&&"primary"===bt(e,"color.point.mode","primary")},defaultValue:function(){var e=r.getDataColorSpecials().primary;return i(e)}},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"color.point.expression.qValueExpression.qExpr",translation:"Common.Expression",show:function(e){return!bt(e,"color.point.auto")&&"byExpression"===bt(e,"color.point.mode")}},expressionIsColor:{ref:"color.point.expressionIsColor",translation:"properties.expressionIsColor",type:"boolean",defaultValue:!0,show:!1}}}}}}}}},a={items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",show:function(){return t.isEnabled("SHOW_DISCLAIMER")},defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},s={type:"items",translation:"properties.presentation",items:{orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"horizontal",horizontal:!0,items:[{component:"icon-item",icon:"direction_up_down",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"direction_left_right",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}]},showDistBackground:{ref:"presentation.visibleComponents",translation:"properties.show",type:"string",component:"dropdown",defaultValue:"points_box",options:[{value:"points_box",translation:"properties.distributionPlot.pointsAndBox"},{value:"points",translation:"properties.distributionPlot.pointsOnly"},{value:"box",translation:"properties.distributionPlot.boxOnly"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:function(e){return e.gridlines&&!e.gridlines.auto}}}}}};s.items.bubbleScaleItems={type:"items",items:{bubbleScales:{type:"integer",component:"slider",ref:"dataPoint.bubbleScales",translation:"properties.dataPoints.bubbleSizes",min:20,max:Fn.BUBBLE_SCALES_MAX,step:5,defaultValue:100,show:function(e){return e.qHyperCubeDef.qMeasures.length<2&&"box"!==e.presentation.visibleComponents}}}},s.items.jitter={type:"string",component:"switch",ref:"dataPoint.displacement",translation:"properties.distributionPlot.jitter",defaultValue:"none",options:[{value:"none",translation:"properties.off"},{value:"jitter",translation:"properties.on"}],show:function(e){return"box"!==e.presentation.visibleComponents}};var l={uses:"axis.picasso.dimensionAxis",show:function(e,t,n){return bt(n.layout,"".concat(Fn.HYPERCUBE_PATH,".qDimensionInfo.length"))>1},items:{othersGroup:{items:{label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}};function u(e,t){var n=bt(e,t,void 0);n&&void 0!==n.label&&("="===n.label.charAt(0)?e.color.point.altLabel={qStringExpression:{qExpr:n.label.substr(1)}}:e.color.point.altLabel=n.label)}var c={uses:"settings",items:{general:a,presentation:s,colors:{uses:"colorsAndLegend",items:{colors:{globalChange:ur.onGlobalChangeColors,items:{autoColor:{ref:"color.point.auto",undefinedValue:!1},colorMode:{ref:"color.point.mode",options:function(e){var t=[];return t.push({value:"primary",translation:"properties.colorMode.primary"}),t.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),bt(e,"qHyperCubeDef.qDimensions.length",0)>=1&&t.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),t},show:function(e){return!ur.isColorAuto(e)},globalChange:function(){}},colorByDimension:{ref:"color.point.byDimDef",show:function(e){return ur.isColorByDimension(e)},change:function(e){u(e,"color.point.byDimDef")}},colorByMeasure:{ref:"color.point.byMeasureDef",show:function(e){return ur.isColorByMeasure(e)},change:function(e){u(e,"color.point.byMeasureDef")}},colorByLabel:{ref:"color.point.altLabel",show:ur.showColorByLabel,change:function(e){var t,n=bt(e,"color.point.mode"),r=bt(e,"color.point.altLabel","");switch(n){case"byMeasure":t=e.color.point.byMeasureDef;break;case"byDimension":t=e.color.point.byDimDef}t&&(t.label=r.qStringExpression?"=".concat(r.qStringExpression.qExpr):r)}},baseColors:{type:"items",items:{useBaseColor:{ref:"color.point.useBaseColors",show:function(e,t){var n=bt(e,"color.point.mode","primary");return!ur.isColorAuto(e)&&"primary"===n&&(ur.measuresHasBaseColors(t)||ur.dimensionsHasBaseColors(t))}},measureColor:{translation:"properties.libraryColors",component:"measure-color",show:function(e,t){return!bt(e,"color.point.auto")&&"byMultiple"===bt(e,"color.point.mode")&&"measure"===bt(e,"color.point.useBaseColors")&&t.layout.qHyperCube.qMeasureInfo.length>1&&ur.measuresHasBaseColors(t)}}}},paletteColor:{ref:"color.point.paletteColor",translation:"properties.distributionPlot.pointColor",show:function(e,t){var n="measure"===bt(e,"color.point.useBaseColors")&&ur.measuresHasBaseColors(t),r="dimension"===bt(e,"color.point.useBaseColors")&&ur.dimensionsHasBaseColors(t);return ur.isColorBySingle(e)&&!n&&!r}},useDimColVal:{ref:"color.point.useDimColVal",show:function(e){return ur.isColorByDimension(e)&&ur.isDimensionLibraryItem(e)}},useMeasureGradient:{ref:"color.point.useMeasureGradient",translation:"properties.libraryColors",type:"boolean",component:"switch",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],show:function(e){var t=bt(e,"color.point.auto"),n=bt(e,"color.point.mode");return!t&&"byMeasure"===n&&"libraryItem"===bt(e,"color.point.byMeasureDef.type")}},persistentColors:{ref:"color.point.persistent",show:function(e){return bt(e,"color.point.auto")||"byDimension"!==bt(e,"color.point.mode")||"libraryItem"!==bt(e,"color.point.byDimDef.type")?Er(e):Er(e)&&!bt(e,"color.point.useDimColVal")}},colorSchemeMeasure:{ref:"color.point.measureScheme",show:function(e){return!ur.isColorAuto(e)&&ur.isColorByMeasure(e)}},reverseScheme:{ref:"color.point.reverseScheme",change:function(e){e.color.reverseScheme=e.color.point.reverseScheme},show:function(e){return!ur.isColorAuto(e)&&ur.isColorByMeasure(e)}},colorSchemeDimension:{ref:"color.point.dimensionScheme",show:function(e){var t=ur.isColorByDimension(e)&&(!ur.isDimensionLibraryItem(e)||!bt(e,"color.point.useDimColVal"));return t}},customRange:{show:function(e){return!ur.isColorAuto(e)},items:{autoMinMax:{ref:"color.point.autoMinMax",show:function(e){return ur.isColorByMeasure(e)}},min:{ref:"color.point.measureMin",show:function(e){return ur.isColorByMeasure(e)&&!1===bt(e,"color.point.autoMinMax")},invalid:function(e){return"minMax"===bt(e,"color.point.minMax")&&bt(e,"color.point.measureMin")>=bt(e,"color.point.measureMax")}},max:{ref:"color.point.measureMax",show:function(e){return ur.isColorByMeasure(e)&&!1===bt(e,"color.point.autoMinMax")},invalid:function(e){return"minMax"===bt(e,"color.point.minMax")&&bt(e,"color.point.measureMin")>=bt(e,"color.point.measureMax")}}}},attributeExpression:{ref:"color.point.expression.qValueExpression.qExpr",show:function(e){return ur.isColorByExpression(e)}},expressionIsColor:{ref:"color.point.expressionIsColor",show:!1},boxColor:{ref:"color.box.paletteColor",translation:"properties.distributionPlot.boxColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=r.getStyle(Fn.CHART_ID,"box","fill");return i(e)},show:function(e){return!bt(e,"color.point.auto",!0)}}}},legend:{show:ur.showLegend,type:"items",items:{show:{snapshot:{tid:"property-legend"}},dock:{show:function(e){var t=ur.showLegend(e)&&bt(e,"legend.show",!0);return t}},showTitle:{show:function(e){var t=ur.showLegend(e)&&bt(e,"legend.show",!0);return t}}}}}}||o,measureAxis:{uses:"axis.picasso.measureAxis"},dimensionAxis:l}},p={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:ur.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},d=Hn.expression("".concat(Fn.SORT_CRITERIA,".sortByExpression")),f={type:"items",items:{toggled:d.items.toggled,sortByElement:{component:"sort-by-element",expressionRef:Fn.SORTING_EXPRESSION,elementRef:Fn.SORTING_ELEMENT_ID,show:jn.isSortByExpression,elements:function(e){return An.getAllHyperCubeExpressions(e.properties.qHyperCubeDef,e.layout.qHyperCube,e.model.app).then((function(t){var r=yr.getSettings(e.layout);return br.getElements(t.measures,t.dimensions,r,n)}))}},order:d.items.order}};return{type:"items",component:"accordion",items:{data:{uses:"data",grouped:!0,items:{dimensions:{uses:"dimensions"},measures:{uses:"measures"}}},sorting:{type:"items",translation:"properties.sorting",schemaIgnore:!0,grouped:!1,globalChange:function(e,t,n){n&&Cr.updateSortOrder(e,n.prevProperties)},items:{autoSort:{ref:Fn.AUTO_SORT,type:"boolean",translation:"properties.sorting",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],show:jn.hasMultipleDimensions,change:function(e,t,r,i){if(r&&jn.hasMultipleDimensions(r)&&i.layout)return Dr.applySorting(r,i.layout,i.model.app,null,n)}},sortingItems:{type:"items",grouped:!0,show:function(e){return jn.hasMultipleDimensions(e)&&!jn.isAutoSort(e)},items:{expression:f,numeric:Hn.numeric("".concat(Fn.SORT_CRITERIA,".sortByNumeric")),ascii:Hn.ascii("".concat(Fn.SORT_CRITERIA,".sortByAscii")),defaultSortMessage:{component:"text",translation:"properties.sorting.defaultSortingMessage",show:function(e){return!jn.isSortByExpression(e)&&!jn.isSortByNumeric(e)&&!jn.isSortByAscii(e)}}}},noData:{component:"no-data",show:function(e){return!jn.hasMultipleDimensions(e)}}}},addons:p,settings:c}}}function Ar(e,t){var n={chart:"",dimension:""};return 0!==bt(e,"".concat(t,"qSortByExpression"),0)?(n.chart="sortByExpression",n.dimension="qSortByExpression"):0!==bt(e,"".concat(t,"qSortByNumeric"),0)?(n.chart="sortByNumeric",n.dimension="qSortByNumeric"):0!==bt(e,"".concat(t,"qSortByAscii"),0)&&(n.chart="sortByAscii",n.dimension="qSortByAscii"),n}var Ir={type:"items",component:"accordion",items:{data:{uses:"data"},sorting:{buildDefinition:function(e,t,n,r,i){var o="".concat(n,".qDef.qSortCriterias.0.");return{type:"items",translation:"properties.sorting",icon:"ascending",show:function(t){return bt(t,"".concat(e,".qDimensions.length"),0)>1},items:{sortingOptions:{component:"radio-list",type:"number",diffs:["".concat(o,"qSortByExpression"),"".concat(o,"qSortByNumeric"),"".concat(o,"qSortByAscii")],options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],setPropertyValue:function(e,n,a){var s=a.layout,l=Ar(e,o).chart;l||(l="sortByAscii");var u=bt(e,t);if(u.sortCriteria||(u.sortCriteria={}),u.autoSort){var c=r(s);if(c.ELEMENT)u.elementId=c.ELEMENT;else{var p=i(e,s);u.elementId=p[0]}}u.autoSort=!1,function(e,t){var n=e.sortCriteria;"sortByNumeric"!==t&&"sortByAscii"!==t||(n.sortByExpression=0);"sortByAscii"===t&&(n.sortByNumeric=0)}(u,l),u.sortCriteria[l]=n},getValue:function(e){var t=Ar(e,o).dimension;return t?bt(e,o+t):0}}}}}}.buildDefinition("qHyperCubeDef","sorting","qUndoExclude.qHyperCubeDef.qDimensions.0",yr.getSettings,br.getElementIds),presentation:{uses:"presentation",items:{orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"direction_up_down",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"direction_left_right",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}]},bubbleScales:{type:"integer",component:"slider",ref:"dataPoint.bubbleScales",translation:"properties.dataPoints.bubbleSizes",min:20,max:100,step:5,defaultValue:100,show:function(e){return e.qHyperCubeDef.qMeasures.length<2&&"box"!==e.presentation.visibleComponents}},jitter:{type:"string",component:"switch",ref:"dataPoint.displacement",translation:"properties.distributionPlot.jitter",defaultValue:"none",options:[{value:"none",translation:"properties.off"},{value:"jitter",translation:"properties.on"}],show:function(e){return"box"!==e.presentation.visibleComponents}}}}}},wr={items:{color:{uses:"color",items:{mode:{options:[{value:"auto",translation:"Common.Auto"},{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}],diffs:["color.point.mode","color.point.auto"],setPropertyValue:function(e,t){"auto"===t?e.color.point.auto=!0:(e.color.point.auto=!1,e.color.point.mode=t)},getValue:function(e){return ur.isColorAuto(e)?"auto":e.color.point.mode}},dimension:{show:function(e){return ur.isColorByDimension(e)},items:{colorScheme:{ref:"color.point.dimensionScheme"},persistentColors:{ref:"color.point.persistent"}}},measure:{show:function(e){return ur.isColorByMeasure(e)},items:{sequential:{ref:"color.point.measureScheme"}}},legend:{show:ur.showLegend}}}}};function Or(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:Mr(e),softDefinition:Ir,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},options:{usingDerivedProperties:!0,colorByPath:"color.point"},onSoftPropertyChange:function(e,t){ur.onGlobalChangeColors(t)},importProperties:function(t,n,r){var i=dn(e);return r.mapProperties(),qn({dataDefinition:i,defaultPropertyValues:{defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},exportFormat:t,initialProperties:n})},exportProperties:function(e,t,n){return xn({propertyTree:e,viewDataMode:n})}}}M(!0,Ir,wr);var Tr={getChar:function(e){var t,n=e;return n>9?(t=65+n-10)>90&&(t+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62:function(e){var t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id:function(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function kr(){return Tr.id()}function Lr(e,t,n){return"y"===e?_r(t,n):function(e){return"far"===e?"top":"bottom"}(t)}function _r(e,t){var n=e||"near";return t&&"near"===n||!t&&"far"===n?"right":"left"}var Pr={getAxisDock:Lr,getOppositeAxisDock:function(e,t,n){return Lr(e,"far"===t?"near":"far",n)},getYAxisDock:_r},Rr=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Nr=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Hr=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Fr(e){return Rr.test(e)}function Br(e){return Nr.test(e)||Hr.test(e)}var jr={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(Fr(n=e[t]))return"ltr";if(Br(n))return"rtl"}return"ltr"}};var zr={lineSettings:function(e,t){var n,r={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(n=t.style)||void 0===n?void 0:n.lineType}};return M(!0,r,e||{})},lineLabelSettings:function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.label.name","color"),i=t.theme.getStyle(n,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(n,"referenceLine.label.name","fontFamily");return t.paletteColor?r=t.theme.getColorPickerColor(t.paletteColor):r||(r="transparent"),M(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:r,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:function(e){return e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr},getRefLineTitle:function(e){var t=e.refLine,n=e.label,r=e.valueString;return!1!==t.showValue?!1!==t.showLabel?"".concat(n," ").concat(jr.lrm,"(").concat(r,")").concat(jr.lrm):"".concat(jr.lrm,"(").concat(r,")").concat(jr.lrm):!1!==t.showLabel?n:""}},Vr={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:-10},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};Vr.DEFAULT_CHART_ORIENTATION=Vr.HORIZONTAL;function Ur(e,t){var n=t||{},r=n.measureAxisProperties||{},i=n.dimensionAxisProperties||{},o=n.orientation||Vr.DEFAULT_CHART_ORIENTATION,a=o===Vr.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=Vr.SHOW_AXIS_LABELS_OPTIONS,c=Vr.SHOW_TITLE_OPTIONS,p=u.includes(r.show),d=!!n.measureTitleText&&c.includes(r.show),f=n.includeDimensionAxis&&u.includes(i.show),m=n.includeDimensionAxis&&!!n.dimensionTitleText&&c.includes(i.show),h=n.gridlines&&!(!n.gridlines.auto&&0===n.gridlines.spacing),g=n.refLines&&n.refLines.some((function(e){return e.show})),y=[];(p&&function(e,t,n,r){var i={scale:"measure",forceBounds:r&&!r.autoMinMax&&r.showBounds};i=M(i,Vr.LAYOUTSETTINGS.measureAxis);var o=Kr(t,n);e.addComponent("".concat(n,"-axis"),i,o)}(e,n,s,r),d&&function(e,t,n){var r={text:t.measureTitleText};r=M(r,Vr.LAYOUTSETTINGS.measureAxisTitle);var i=function(e,t){return Kr(e,t)}(t,n);e.addComponent("".concat(n,"-axis-title"),r,i)}(e,n,s),function(e,t,n,r){var i=t.measureScaleSettings,o={isRtl:t.isRtl,source:t.measureSource,orientation:n,measureAxisProperties:r};r&&r.spacing>0&&(i=M(!0,i||{},{component:{ticks:{distance:100*r.spacing}}}));e.addScale("measure-scale",i,o)}(e,n,o,r),f&&function(e,t,n){var r={scale:"dimension"};r=M(r,Vr.LAYOUTSETTINGS.dimensionAxis);var i=Yr(t,n);M(!0,r,t.dimensionAxisSettings||{}),e.addComponent("".concat(n,"-axis"),r,i)}(e,n,l),m&&function(e,t,n){var r={text:t.dimensionTitleText};r=M(r,Vr.LAYOUTSETTINGS.dimensionAxisTitle);var i=function(e,t){return Yr(e,t)}(t,n);e.addComponent("".concat(n,"-axis-title"),r,i)}(e,n,l),n.includeDimensionAxis&&function(e,t,n){var r={isRtl:t.isRtl,source:t.dimensionSource,orientation:n===Vr.HORIZONTAL?Vr.VERTICAL:Vr.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,r)}(e,n,o),h&&function(e,t,n){var r={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};(r=M(r,Vr.LAYOUTSETTINGS.gridLines))[n]={scale:"measure"},e.addComponent("grid-line",r)}(e,n.gridlines,s),n.hasNavigation&&function(e,t,n,r){e.getSettings().scroll={dimension:{viewSize:n.scrollSettings&&n.scrollSettings.viewSize||0,max:n.scrollSettings&&n.scrollSettings.max||0}};var i={isRtl:n.isRtl,chartID:n.chartID,isHorizontal:!r},o=M({},Vr.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",o,i),Wr(t,function(e){function t(t,n){if(!n||!e())return!1;var r={x:n.center.x-n.deltaX,y:n.center.y-n.deltaY};return this.chart.componentsFromPoint(r).some((function(e){return"scrollbar"===e.settings.key}))}return[{type:"Tap",options:{enable:t},events:{tap:function(e){this.chart.component("scrollbar").emit("tap",e)}}},{type:"Pan",options:{enable:t},events:{panstart:function(e){this.chart.component("scrollbar").emit("panStart",e)},pan:function(e){this.chart.component("scrollbar").emit("panMove",e)},panend:function(e){this.chart.component("scrollbar").emit("panEnd",e)},pancancel:function(e){this.chart.component("scrollbar").emit("panCancel",e)}}}]}(n.isNavigationEnabledFn))}(e,y,n,a),g&&function(e,t,n,r){var i=Pr.getAxisDock(n,r.dock,t.isRtl),o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=M(o,Vr.LAYOUTSETTINGS.refLines);var a={key:"ref-line-labels-".concat(kr()),require:["renderer","chart"],dock:Pr.getOppositeAxisDock(n,r.dock,t.isRtl),preferredSize:function(){if("x"===n)return 26;for(var t=this.renderer.measureText,r=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((function(e){var n=!1!==e.label.showValue?"(".concat(r(e.value),")"):"",i="".concat(e.label.text," ").concat(n),o=e.label.text&&n?" ".concat(n):n;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0],s=1;s<i.length;s++)i[s].wanted>o.wanted&&(o.wanted=i[s].wanted),i[s].required>o.required&&(o.required=i[s].required);var l=12;return o.required+l>100?o.required+l:Math.min(o.wanted+l,100)},lines:{x:[],y:[]}};a=M(a,Vr.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((function(r){if(r.show){var s=r.refLineExpr&&r.refLineExpr.value,l=M(!0,{},t,{paletteColor:r.paletteColor,style:r.style,chartID:e.options.chartID}),u=zr.lineSettings({scale:"measure",dir:n,value:s},l);o.lines[n].push(u);var c=zr.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==r.showLabel?r.label:"",showValue:!1!==r.showValue}},l);"x"===n?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[n].push(c)}})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,n,s,r),n.enableLasso&&n.selectionsEnabled)&&function(e,t){var n={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",Vr.LAYOUTSETTINGS.lasso,n)}(e,n.lasso||{});n.enableDimRange&&n.includeDimensionAxis&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeDim"};o=M(o,Vr.LAYOUTSETTINGS.rangeDim);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!n,dock:r,isRtl:i};e.addComponent("range",o,a)}(e,n.dimRange||{},a,Yr(n,l).dock,n.isRtl);n.enableMeasureRange&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeMeasure"};o=M(o,Vr.LAYOUTSETTINGS.rangeMeasure);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:n,dock:r,isRtl:i};e.addComponent("range",o,a)}(e,n.measureRange||{},a,Kr(n,s).dock,n.isRtl);n.enableAreaRange&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeMinor"};o=M(o,Vr.LAYOUTSETTINGS.rangeMinor);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?n:!n,dock:r,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,n.areaRange||{},a,Yr(n,l).dock,n.isRtl);n.brushActions&&Wr(y,n.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function Wr(e,t){t.forEach((function(t){e.push(t)}))}function Kr(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Yr(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Gr(e,t){var n=t||{},r=!n.orientation||"horizontal"===n.orientation,i=!!n.isRtl,o={name:n.name||"scale",component:{invert:r&&i,minorTicks:{count:1},range:n.range||void 0,domain:n.domain||void 0,trackBy:n.trackBy||"id"}};return M(!0,{},o,e||{})}function Xr(e,t){var n=t&&t.chartID,r=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(n,"axis.line.major","color"),s=t.theme.getStyle(n,"axis.title","fontSize"),l=t.theme.getStyle(n,"axis.title","color"),u=t.theme.getStyle(n,"axis.label.name","color"),c=t.theme.getStyle(n,"axis.label.name","fontSize"),p=t.theme.getStyle(n,"axis.title","fontFamily"),d=t.theme.getStyle(n,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",dock:Pr.getAxisDock(i,r,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}};return M(!0,{},f,e||{})}function $r(e,t){var n=t&&t.chartID,r=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(n,"axis.title","fontSize"),s=t.theme.getStyle(n,"axis.title","color"),l=t.theme.getStyle(n,"axis.title","fontFamily"),u={key:"text",type:"text",dock:Pr.getAxisDock(i,r,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return M(!0,{},u,e||{})}Gr.measureScale=function(e,t){var n=(t||{}).source||[];"string"==typeof n&&(n=[n]);var r={name:"measure",component:{expand:.1,data:{fields:n.map((function(e){return{field:e}}))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(r.component.min=i.min),["max","minMax"].includes(i.minMax)&&(r.component.max=i.max));var o=Gr(M(!0,r,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},Gr.dimensionScale=function(e,t){var n={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:function(e){return e.qText||""}}}},label:function(e){return e.datum.label.value}}};return Gr(M(!0,n,e||{}),t)},Xr.xAxis=function(e,t){return Xr(M(!0,{key:"x-axis",scale:"x"},e||{}),t)},Xr.yAxis=function(e,t){var n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Pr.getYAxisDock(n,r)};return Xr(M(!0,i,e||{}),t)},$r.xAxisTitle=function(e,t){return $r(M(!0,{key:"x-axis-title"},e||{}),t)},$r.yAxisTitle=function(e,t){var n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis-title",dock:Pr.getYAxisDock(n,r)||"left"};return $r(M(!0,i,e||{}),t)};var Jr={getBublesAlign:function(e,t,n){var r=e&&"far"!==t||!e&&"far"===t;return!e&&n&&(r=!r),r?"start":"end"},getDock:function(e,t){var n,r=[];return e&&r.push("@".concat(e)),t&&r.push("@".concat(t)),r.length&&(n=r.join(",")),n}};var Zr={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function Qr(){return Zr}function ei(e){var t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Qr.getLayoutModeKeys=function(){var e,t=[];for(e in Zr)t.push(e);return t};var ti={left:"left",right:"right",up:"top",down:"bottom"};function ni(e,t,n){switch(e){case"scale":return Gr(t,n);case"measure-scale":return Gr.measureScale(t,n);case"dimension-scale":return Gr.dimensionScale(t,n);case"axis":return Xr(t,n);case"box-marker":return function(e){return M(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return M(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){var n=t&&t.isRtl,r=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":n?"left":"right",settings:{backgroundColor:t.theme.getStyle(r,"","backgroundColor"),invert:n&&i}};return M(!0,{},o,e||{})}(t,n);case"text":return $r(t,n);case"lasso":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return r.forEach((function(e){o.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:i})})),M(!0,{},o,e||{})}(t,n);case"range":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:Jr.getDock(r,i),settings:{brush:n,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:r,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Jr.getBublesAlign(a,s,l)}}};return M(!0,{},u,e||{})}(t,n);case"range-area":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance,p=!0,d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Jr.getDock(r,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:r,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Jr.getBublesAlign(s,l,u),label:function(e){return p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))}},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((function(e){d.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:o,action:"add"})})),M(!0,{},d,e||{})}(t,n);case"categorical-legend":return function(e,t){var n=t&&t.chartID,r=t&&t.isRtl,i=t&&t.dock||"auto",o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?r?"left":"right":"bottom");var a=t.theme.getStyle(n,"legend.title","color"),s=t.theme.getStyle(n,"legend.title","fontSize"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.title","fontFamily"),p={key:"legend",type:"legend-cat",dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:r?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:function(e,t){return e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon","lui-icon--triangle-".concat(ti[t.direction])].join(" ")})}}}},style:{item:{label:{fontSize:u,fontFamily:t.theme.getStyle(n,"legend.label","fontFamily"),fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return M(!0,{},p,e)}(t,n);case"sequential-legend":return function(e,t){var n=t&&t.chartID,r=t&&t.isRtl,i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?r?"left":"right":"bottom");var o=t.theme.getStyle(n,"legend.title","color"),a=t.theme.getStyle(n,"legend.title","fontSize"),s=t.theme.getStyle(n,"legend.title","fontFamily"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;case"middle":default:return.5}}var d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(r?"right":"left"),major:{invert:"left"===i||"right"===i||r},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return M(!0,{},d,e)}(t,n);case"x-axis":return Xr.xAxis(t,n);case"y-axis":return Xr.yAxis(t,n);case"x-axis-title":return $r.xAxisTitle(t,n);case"y-axis-title":return $r.yAxisTitle(t,n);case"grid-line":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"grid.line.major","color");return M(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:r},minorTicks:{stroke:r}},e||{})}(t,n);case"interaction":return function(e,t){var n=t&&t.gestures||[];return M(!0,{},{type:"hammer",key:"hammered",gestures:n},e||{})}(t,n);case"ref-line":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(n,"referenceLine.outOfBounds","backgroundColor");return M(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:r},padding:{x:7,y:5}}}},e||{})}(t,n);case"event-area":return function(e){return M(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"label.value","color"),i=t.theme.getStyle(n,"label.value","fontSize"),o={key:"labels",type:"labels",displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:t.theme.getStyle(n,"label.value","fontFamily"),fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:r,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:ei}]}}}]}};return M(!0,{},o,e||{})}(t,n);default:return}}function ri(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Qr()},components:[],scales:{}}}ri.prototype.addComponent=function(e,t,n){var r=ni(e,t,M(!0,{},this.options,n||{}));return this.settings.components.push(r),r},ri.prototype.addInteraction=function(e,t){var n=ni("interaction",e,M(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(n),n},ri.prototype.addScale=function(e,t,n){var r=ni(e,t,M(!0,{},this.options,n||{}));this.settings.scales[r.name]=r.component},ri.prototype.getSettings=function(){return this.settings},ri.prototype.getComponent=function(e){return this.settings.components.filter((function(t){return t.key===e}))[0]},ri.prototype.addPreset=function(e,t){!function(e,t,n){switch(e){case"dimension-measure-chart":Ur(t,n);break;default:throw Error("There is no chart preset with that type")}}(e,this,t)},ri.validateComponentKeys=function(e){var t={};return e.map((function(e){var n=e.key;return n?t[n]?"Duplicate key for component ".concat(e.type):(t[n]=!0,null):"Missing key for component ".concat(e.type)})).filter((function(e){return!!e}))},ri.create=function(e){return new ri(e)},ri.createComponent=ni;var ii={CENTER:0,BOTTOM:1},oi={DISCLAIMERS:[{label:"NoDataExist",alignment:ii.CENTER,default:!0},{label:"RequireNumericDimension",alignment:ii.CENTER,default:!1},{label:"OnlyNanData",alignment:ii.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:ii.CENTER,default:!1},{label:"LimitedData",alignment:ii.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:ii.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:ii.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:ii.BOTTOM,default:!1}],ALIGNMENT:ii};var ai={getNoDataExistAttribute:function(e){return e.qSize.qcy*e.qSize.qcx==0},getLimitedDataAttribute:function(e,t){var n,r,i=!1;return e?void 0!==t.explicitLimitedData?i=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?i=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(r=e.qStackedDataPages)&&r[0]&&r[0].qData[0]&&r[0].qData[0].qSubNodes&&(n=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,i=e.qDimensionInfo.length>=n?e.qStackedDataPages[0].qData[0].qSubNodes.some((function(e){return e.qDown>0})):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):i=!0===t.explicitLimitedData,i},getNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.some((function(e){return e.qMin<=0}))},getOnlyNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.every((function(e){return e.qMax<=0&&e.qMax>=e.qMin}))||0===e.qSize.qcy},getOnlyNanDataAttribute:function(e,t){return void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((function(e){return e.qMax<e.qMin||"NaN"===e.qMax}))},getDataRangeIncludingZeroAttribute:function(e,t){return!t.supportRangeOverZero&&function(e,t){var n,r,i,o,a,s=t.length;for(e&&(r=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),i=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),o=Number.MAX_VALUE,a=-Number.MAX_VALUE,n=0;n<s;n++)if(o=Math.min(o,t[n].qMin),a=Math.max(a,t[n].qMax),o<=0&&a>=0)return!0;return o=r?e.min:o,a=i?e.max:a,o<=0&&a>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo)},applyAttributes:function(e,t){var n=e||{},r={};return n.supportNegative=void 0===n.supportNegative||n.supportNegative,n.supportRangeOverZero=void 0===n.supportRangeOverZero||n.supportRangeOverZero,oi.DISCLAIMERS.forEach((function(e){r[e.label]=!1})),t&&t.qHyperCube?(r.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),r.NoDataExist?r:(r.RequireNumericDimension=n.explicitRequireNumericDimension,r.RequireNumericDimension||(r.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,n),r.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,n),r.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,n),r.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,n),r.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,n)),r)):r}};function si(e,t,n){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=n}function li(e,t){return e&&t&&t[e]}function ui(e){this.environment=e,this.clear()}si.prototype.isValidAndSupported=function(e,t){return li(e.label,this.dataAttributes)&&(e.default||li(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},si.prototype.isAnyValidDisclaimer=function(e){var t=!1,n=this;return this.disclaimersConfig.forEach((function(r){n.isValidAndSupported(r,e)&&(t=!0)})),t},si.prototype.getMessage=function(e,t){var n="",r=this;return t&&this.disclaimersConfig.forEach((function(i){r.isValidAndSupported(i,e)&&(n+="".concat(t.get("Object.Disclaimer.".concat(i.label))," "))})),n},ui.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},ui._applyDefaultSupport=function(e,t){var n=e;return n||(n={}),t.forEach((function(e){void 0===n[e.label]&&(n[e.label]=e.default)})),n},ui.prototype.getComponentSettings=function(){var e,t,n,r,i=this.environment.translator,o=M(!0,{},this.vizAttributes.supportedDisclaimers),a=new si(oi.DISCLAIMERS,this.dataAttributes,o);if(a.isAnyValidDisclaimer(oi.ALIGNMENT.CENTER))n=a.getMessage(oi.ALIGNMENT.CENTER,i),r="center";else{if(!a.isAnyValidDisclaimer(oi.ALIGNMENT.BOTTOM))return;n=a.getMessage(oi.ALIGNMENT.BOTTOM,i),r="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:r},settings:{label:n,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},ui.prototype.set=function(e){if(this.clear(),!e)throw new Error(ui.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=ai.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},ui.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};var ci=Gt.extend({init:function(e,t,n,r,i){this.$element=t,this.environment=n,this.backendApi=r,this._selectionsApi=i,this._on=!1,this._disclaimer=new ui(n),this._dataPaths=["qHyperCube"];var o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[ri.createComponent("event-area",{mounted:function(e){o.dataAreaElem=e}})]}})},updateEnvironment:function(e){this.environment=e},isRtl:function(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths:function(e){this._dataPaths=e},getData:function(e,t,n){return function(e,t,n){var r,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(n){var o=n.width||t.qSize.qcx,a=Math.floor(1e4/o);i={qTop:n.top||0,qLeft:n.left||0,qWidth:o,qHeight:n.height?Math.min(n.height,a):a}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};switch(t.qMode){case"K":r="qStackedDataPages";break;case"S":default:r="qDataPages"}return e.getData([i],null,t).then((function(e){t[r]=e}))}(e,t,n)},hasValidData:function(){return!0},paint:function(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));var t=this._disclaimer.getComponentSettings(),n="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),r=this.createChartSettings(this.layout);n?r.components=[t]:t&&r.components.push(t),ri.validateComponentKeys(r.components).forEach((function(e){console.error(e)})),this.updateChart(this.layout,r),this._painted=!0}return Promise.resolve()},resize:function(){if(this.layout)return this.paint()},createChartSettings:function(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings:function(e,t){!this.environment.options.freeResize&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData:function(e){return this._destroyed?Promise.reject():(this.layout=M(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart:function(e,t,n){var r,i,o=null!==(r=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==r?r:{},a=this._dataPaths.map((function(t){return{type:"q",key:t,config:{localeInfo:o},data:bt(e,t.replace(/\//g,"."))}}));this.colorService&&a.push.apply(a,N(this.colorService.getData())),this.chartInstance.update({data:a,settings:t,partialData:n});this.picassoElement.setAttribute("data-state",2)},destroy:function(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:function(){return{}},isLassoDisabled:function(){return!0},setSnapshotData:function(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:function(e){return{data:e}}});function pi(e){var t=0;if(!e||!e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}var di={generateHash:function(e){return pi(JSON.stringify(e))},updateHash:function(e,t){e.qUndoExclude||(e.qUndoExclude={});e.qUndoExclude.hashCode=di.generateHash(t)}};var fi={getDefaultHashDataForHyperCube:function(e,t,n){return function(e,t){var n=[];if(!e.qMeasures)return Promise.resolve(n);return e.qMeasures.forEach((function(e){e.qLibraryId?n.push(function(e,t){return t.getMeasure(e).then((function(e){return e.getProperties().then((function(e){return e.qMeasure.qDef}))}))}(e.qLibraryId,t)):n.push(Promise.resolve())})),Promise.all(n)}(e,n).then((function(e){return{drillLevel:hi(t),dimensionExpressions:mi(t),measureExpressions:e}}))}};function mi(e){return e.qDimensionInfo.map((function(e){return e.qGroupFieldDefs}))}function hi(e){return function(e){return bt(e,"qDimensionInfo",[])}(e).map((function(e){return e.qGroupPos}))}var gi={},yi=M.bind(null,!0);function vi(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}var bi=Array.isArray,qi=function(e){return void 0===e};function xi(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Di(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){i!==r.length&&(e[(n=+t)||t]=qi(e[n||t])?Number.isNaN(+n)?{}:[]:e[t],e=e[n||t])})),e}function Si(e,t){if(vi(e)&&vi(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!Si(e[i],t[i]))return!1}return!0}if(bi(e)&&bi(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o++)if(!Si(e[o],t[o]))return!1;return!0}return e===t}gi.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e&&(e=yi({},{val:e}).val),e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);Si(o,a)||xi(t,i)||(qi(a)?r.push({op:"add",path:s,value:o}):vi(o)&&vi(a)?r=r.concat(gi.generate(a,o,s)):bi(o)&&bi(a)?r=r.concat(function(e,t,n){var r,i,o=[],a=e.slice(),s=-1;function l(e,t,n){if(e[n]&&qi(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++)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Si(t,a))return o;if(null===t[0]||!qi(t[0])&&qi(t[0].qInfo))return o.push({op:"replace",path:n,value:t}),o;for(r=a.length-1;r>=0;--r)-1===(s=l(t,a[r]&&a[r].qInfo&&a[r].qInfo.qId,r))?(o.push({op:"remove",path:"".concat(n,"/").concat(r)}),a.splice(r,1)):o=o.concat(gi.generate(a[r],t[s],"".concat(n,"/").concat(r)));for(r=0,i=t.length;r<i;++r)-1===(s=l(a,t[r]&&t[r].qInfo&&t[r].qInfo.qId))?(o.push({op:"add",path:"".concat(n,"/").concat(r),value:t[r]}),a.splice(r,0,t[r])):s!==r&&(o.push({op:"move",path:"".concat(n,"/").concat(r),from:"".concat(n,"/").concat(s)}),a.splice(r,0,a.splice(s,1)[0]));return o}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){qi(t[i])&&!xi(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},gi.apply=function(e,t){t.forEach((function(t){var n,r=Di(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("add"===t.op||"replace"===t.op)if(bi(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(bi(o)&&bi(t.value)){var s=t.value.slice();o.length=0,o.push.apply(o,s)}else vi(o)&&vi(t.value)?(n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!xi(n,e)&&delete n[e]})),yi(o,t.value)):r[i]=t.value;else if("move"===t.op){var l=Di(e,t.from);bi(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(bi(r)?r.splice(+i,1):delete r[i])}))},gi.clone=function(e){return yi({},e)},gi.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},gi.updateObject=function(e,t){Object.keys(e).length?gi.apply(e,gi.generate(e,t)):yi(e,t)};var Ci=function(){function e(t){k(this,e),this._model=t}var t;return _(e,[{key:"setModel",value:function(e){this._model=e}},{key:"saveSoftProperties",value:function(e,t){if(!this._model)return Promise.resolve(!1);var n=gi.generate(e,t);return M(!0,e,t),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),this._model.applyPatches(n,!0).then((function(){return!0}))):Promise.resolve(!1)}},{key:"mergeSoftPatches",value:(t=T(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._model){e.next=2;break}return e.abrupt("return");case 2:return t=this._model.getProperties(),n=this._model.getEffectiveProperties(),e.next=6,t;case 6:return r=e.sent,e.next=9,n;case 9:if(i=e.sent,!r.qExtendsId){e.next=12;break}return e.abrupt("return");case 12:o=gi.generate(r,i),gi.apply(r,o),(a=this)._model.setProperties(r).then((function(){a._model.clearSoftPatches()}));case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),Ei={canModifyHardProperties:function(e){if(e.qHasSoftPatches||e.qExtendsId)return!1;if(e.permissions)return e.permissions.update;return-1!==e.qMeta.privileges.indexOf("update")}};var Mi={saveDerivedProperties:function(e,t,n,r){if(Ei.canModifyHardProperties(t))return e.setProperties(n);return new Ci(e).saveSoftProperties(r,n)}};var Ai={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function Ii(){this._generationInProgress=!1}function wi(e){Ai.validate(e);var t=e.properties,n=di.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==n)}Ii.prototype.isDerivedUpToDate=wi,Ii.prototype.updateDerivedProperties=function(e){if(Ai.validate(e),this._generationInProgress)return Promise.resolve(!0);if(wi(e)){var t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}var n=this,r=e.model,i=e.layout,o=M(!0,{},e.properties),a=M(!0,{},o);return this._generationInProgress=!0,di.updateHash(o,e.hashData),e.generateDerivedProperties(i,o).then((function(){return Mi.saveDerivedProperties(r,i,o,a).then((function(){return n._generationInProgress=!1,Promise.resolve(!0)}))}))},Ii.prototype.addDefaultHyperCubeHash=function(e,t,n,r){return fi.getDefaultHashDataForHyperCube(e,t,n).then((function(e){return M(!0,r,e)}))};var Oi={exports:{}},Ti=Oi.exports=function(){function e(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 t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return(n="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 r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){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 u(e,t,n){return(u=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&s(i,n.prototype),i}).apply(null,arguments)}function c(e,t){return f(e)||h(e,t)||g(e,t)||b()}function p(e){return d(e)||m(e)||g(e)||v()}function d(e){if(Array.isArray(e))return y(e)}function f(e){if(Array.isArray(e))return e}function m(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}function g(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function y(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 v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var q=Object.prototype.hasOwnProperty,x=Object.prototype.toString,D=Object.defineProperty,S=Object.getOwnPropertyDescriptor,C=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===x.call(e)},E=function(e){if(!e||"[object Object]"!==x.call(e))return!1;var t,n=q.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&q.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||q.call(e,t)},M=function(e,t){D&&"__proto__"===t.name?D(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},A=function(e,t){if("__proto__"===t){if(!q.call(e,t))return;if(S)return S(e,t).value}return e[t]},I=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"!==w(s)&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=A(s,n),s!==(i=A(t,n))&&(c&&i&&(E(i)||(o=C(i)))?(o?(o=!1,a=r&&C(r)?r:[]):a=r&&E(r)?r:{},M(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&M(s,{name:n,newValue:i}));return s};function O(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 T(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 k(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,p=r;if(i.field&&i.field!==n){var d=O(i.field,o,{cache:t});if(-1===d)return;p=I({qRow:a},d(s))}u[c]=T(i,p,{key:l})}function L(e,t,r,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){for(var l=t.raw(),u=t.key(),c="object"===n(o[s].field)?o[s].field:t.field(o[s].field),d=i.normalizeConfig(o[s],t),f=d.props,m=d.main,h=Object.keys(f),g=!!o[s].trackBy,y=n(o[s].trackBy),v={},b=[],q=[],x=0;x<l.qDataPages.length;x++){var D=O(c,l.qDataPages[x],{cache:r});if(-1!==D)for(var S=0;S<l.qDataPages[x].qMatrix.length;S++){var C=l.qDataPages[x].qArea.qTop+S,E=I({qRow:C},D(l.qDataPages[x].qMatrix[S])),M=T(m,E,{key:u});if(!m.filter||m.filter(E)){for(var A=0;A<h.length;A++){var w=f[h[A]],L=w.fields||[w];w.fields&&(M[h[A]]=[]);for(var _=0;_<L.length;_++)k({cache:r,f:c,mainCell:E,p:L[_],prop:h[A],props:f,page:l.qDataPages[x],rowIdx:C,row:l.qDataPages[x].qMatrix[S],sourceKey:u,target:w.fields?M[h[A]]:M,targetProp:w.fields?_:h[A]});if(w.fields){var P=M[h[A]].map((function(e){return e.value})),R=M[h[A]].map((function(e){return e.label}));M[h[A]]={value:"function"==typeof w.value?w.value(P):void 0!==w.value?w.value:P,label:"function"==typeof w.label?w.label(R):void 0!==w.label?String(w.label):String(M[h[A]].value)}}}g&&i.track({cfg:o[s],itemData:E,obj:M,target:b,tracker:v,trackType:y}),q.push(M)}}}g?a.push.apply(a,p(i.collect(b,{main:m,propsArr:h,props:f}))):a.push.apply(a,q)}return a}function _(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 P(){return this.eachAfter(_)}function R(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}function N(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}function H(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}function F(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}))}function B(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}function j(e){for(var t=this,n=z(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}function z(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}function V(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function U(){var e=[];return this.each((function(t){e.push(t)})),e}function W(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}function K(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}function Y(e,t){var n,r,i,o,a,s=new Z(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=X);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 Z(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(J)}function G(){return Y(this).eachBefore($)}function X(e){return e.children}function $(e){e.data=e.data.data}function J(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Z(e){this.data=e,this.depth=this.height=0,this.parent=null}function Q(e){if("function"!=typeof e)throw new Error;return e}Z.prototype=Y.prototype={constructor:Z,count:P,each:R,eachAfter:H,eachBefore:N,sum:F,sort:B,path:j,ancestors:V,descendants:U,leaves:W,links:K,copy:G};var ee="$",te={depth:-1},ne={};function re(e){return e.id}function ie(e){return e.parentId}function oe(){var e=re,t=ie;function n(n){var r,i,o,a,s,l,u,c=n.length,p=new Array(c),d={};for(i=0;i<c;++i)r=n[i],s=p[i]=new Z(r),null!=(l=e(r,i,n))&&(l+="")&&(d[u=ee+(s.id=l)]=u in d?ne:s);for(i=0;i<c;++i)if(s=p[i],null!=(l=t(n[i],i,n))&&(l+="")){if(!(a=d[ee+l]))throw new Error("missing: "+l);if(a===ne)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=te,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(J),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Q(t),n):e},n.parentId=function(e){return arguments.length?(t=Q(e),n):t},n}function ae(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=ae(n,i[s]);Array.isArray(l)?a.push.apply(a,p(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]=ae(n,i[c]);return u}r[o]in i&&(i=i[r[o]])}return i}function se(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,p(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,p(se(e[o].children,t-1,n)));return r}function le(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t));return function(e){for(var t=e,n=0;n<r;++n)t=t.parent;return t}}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return se(e.children,i-1,n)}}return!1}function ue(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 ce=/^qDimensionInfo(?:\/(\d+))?/,pe=/^\/?qMeasureInfo\/(\d+)/,de=/\/qAttrExprInfo\/(\d+)/,fe=/\/qAttrDimInfo\/(\d+)/;function me(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}function he(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 ge(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,p=n.qEffectiveInterColumnSortOrder,d=he(n);return ce.test(c)&&(i=!0,o=+ce.exec(c)[1],c=r.replace(ce,"")),pe.test(c)&&("K"===n.qMode?l=+pe.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+pe.exec(c)[1],u=0):u=+pe.exec(c)[1],c=c.replace(pe,"")),c&&(fe.exec(c)?s=+fe.exec(c)[1]:de.exec(c)&&(a=+de.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?d[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function ye(e,t){var n,r,i=le(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 ve(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 be(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,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var n=u[e],d=void 0,f=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&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=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)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=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=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;o[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(o[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(p,r):p})}}var qe=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=ae(r,e);return o&&o[0]?(t.tree=Y(o[0],n.children||function(e){return e[i]}),t.tree):null};function xe(e){for(var n=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=me(e),i=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(i.indexOf(e))})),a=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(i.indexOf(e))})),s={__root:{__id:"__root",qValues:[]}},l=0;l<n.length;l++){for(var u=n[l],c="__root",p=!1,d=0;d<o.length;d++){var f=u[o[d]],m="".concat(c,"__").concat(f.qText);s[m]||(s[m]=t({__id:m,__parent:c,qValues:[]},f),p=!0),c=m}if(p)for(var h=0;h<a.length;h++){var g=u[a[h]];s[c].qValues.push(g)}}var y=Object.keys(s).map((function(e){return s[e]}));return oe().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(y)}var De=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 p=u[c];if(p.field!==a){var d=ye(o,ge(p.field,{cube:r,cache:i}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=n.raw(),a=n.key(),s="S"===o.qMode?xe(n):qe(o,r,e);if(!s)return null;for(var l=s.height,u=[],c=0;c<=l;c++){var p=null;if(c>0)if("S"===o.qMode){var d=he(o)[c-1];p=r.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[c-1];c>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),p=r.fields[f]}var m=i.normalizeConfig(t(t({},e),{},{field:p?p.key():void 0}),n),h=m.props,g=m.main,y=Object.keys(h);u[c]={propsArr:y,props:h,main:g};var v=p?ge(p,{cube:o,cache:r}):{fieldDepth:0};De({propsArr:y,props:h,cube:o,cache:r,itemDepthObject:v,f:p})}for(var b=s.copy().descendants(),q=s.descendants(),x=0;x<q.length;x++){var D=u[q[x].depth].propsArr,S=u[q[x].depth].props,C=u[q[x].depth].main,E=b[x],M=E.data,A=ve(C,M,{key:a});be({propsArr:D,props:S,item:E,itemData:M,ret:A,sourceKey:a,isTree:!0}),q[x].data=A}return s}function Ce(e,t,r,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){var l=t.raw(),u=t.key();if(!qe(l,r,e))continue;var c="object"===n(o[s].field)?o[s].field:t.field(o[s].field),d=i.normalizeConfig(o[s],t),f=d.props,m=d.main,h=Object.keys(f),g=ge(c,{cube:l,cache:r}),y=ye({fieldDepth:0},g),v=y.nodeFn,b=y.attrFn,q=y.valueFn;De({propsArr:h,props:f,cube:l,cache:r,itemDepthObject:g,f:c});for(var x=!!o[s].trackBy,D=n(o[s].trackBy),S={},C=[],E=v(r.tree),M=[],A=0;A<E.length;A++){var I=E[A],w=b?b(q(I)):q(I);if(!m.filter||m.filter(w)){var O=ve(m,w,{key:u});be({propsArr:h,props:f,item:I,itemData:w,ret:O,sourceKey:u}),x&&i.track({cfg:o[s],itemData:w,obj:O,target:C,tracker:S,trackType:D}),M.push(O)}}x?a.push.apply(a,p(i.collect(C,{main:m,propsArr:h,props:f}))):a.push.apply(a,M)}return a}function Ee(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==fn||"undefined"!=typeof self&&self;var Me=Ee((function(e){
988
10
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
989
- !function(t,r){e.exports=r()}(0,(function(){return function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,u,l,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),q=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[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(;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],u=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%u,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%u)&&v<d-u&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+q}}))}));function Ie(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Ae={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"},we=/%$/,Oe=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Te=/^\(oct\)/i,ke=/^\(dec\)/i,Le=/^\(hex\)/i,je=/^\(bin\)/i,_e=/^\(rom\)/i,Pe=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Re=/#|0/g;function Ne(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function He(e,t){for(var r,n="",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(r=0;r<a.length;r++)if(a[r]<=i){n+=s[r],i-=a[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}function Fe(e,t,r){var n;return Oe.test(t)?e=Ne(e,Number(/\d{2}/.exec(t)[0]),t,r):Te.test(t)?e=Ne(e,8,t,r):ke.test(t)?e=Ne(e,10,t,r):Le.test(t)?e=Ne(e,16,t,r):je.test(t)?e=Ne(e,2,t,r):_e.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=He(e,t)):t+n+e.toExponential(0)),e}function Be(e,t,r){var n=Ie(e);return r?n:new RegExp(n||"",t)}function Ve(e,t){return t&&(t=Ie(t)),e&&(e=Ie(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function ze(e,t){if(!e||!e.qNumericalAbbreviation)return Ae;var r={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])})),r}function Ue(e,t,r){var n,i,o,a,s,u,l,c,p,d=e.pattern;d.indexOf("A")>=0&&(d=d.replace("A",""),e.abbreviate=!0),p=Ve(t,r),a=(o=(o=d.match(p))?o[0]:"")?d.substr(0,d.indexOf(o)):d,s=o?d.substring(d.indexOf(o)+o.length):"",o||(o=d?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),u=t,t=/,/.test(r)?"¤":",",u&&(o=o.replace(Be(u,"g"),t)),l=r,r=".",l&&(o=o.replace(Be(l,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var f,m=d.split(l);m[1]&&(f=m[1].match(Re)),e.prefix=a||"",e.postfix=s||"",e.pattern=d,e.maxPrecision=f?f.length:2,e.percentage=we.test(d),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Be(t,null,!0),"|").concat(Be(r,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=r,e.temp=c}var We=function(){function e(t,r,i,o,a){n(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=i||",",this.decimalDelimiter=o||".",this.type=a||"numeric",this.patternSeparator=";",this.abbreviations=ze(t,this.patternSeparator),this.prepare()}return o(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,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],Pe.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Pe.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Pe.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Ue(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Ue(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Ue(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,u,l,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);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=Fe(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,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(y<0&&y-r<=c.maxPrecision?h=y:m<=r&&!(y>0&&-r<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var b=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),v=u.split(o)[0];if(e=Me(v+=o,b)||"0",l){var q=Math.max(0,Math.min(14,l.length)),x=l.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(s=D.length;s<x;s++)D+="0";D&&(e+=o+D)}else 0===b&&(i=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=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(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)u+="#";e=Me(u,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+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ke(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(We,t)}function Ye(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size,o=void 0===i?5e3:i,a=n.multipleArguments,s=void 0!==a&&a,u=n.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return r=l.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=l(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return d>=o&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[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),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function Ge(e,t,r,n,i){var o=Ke(i,e,t,r,n),a=Ye(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),o.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Xe={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},$e=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Je=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ze=["January","February","March","April","May","June","July","August","September","October","November","December"],Qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],et=86400;function tt(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function rt(e,t){var r=e.getUTCHours(),n=e.getUTCDay()-1;return t&&((r%=12)||(r=12)),n<0&&(n=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:n,date:e.getUTCDate(),h:r,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}function nt(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function it(e){var t=e,r=24*nt(t),n=60*nt(r),i=60*nt(n),o=1e3*nt(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}function ot(e,t){var r,n=it(e),i=n.d,o=n.h,a=n.m,s=n.s,u=n.f,l=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(et*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=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)&&(l=r?r.getDay()-1:0)<0&&(l=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}function at(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:tt("".concat(t.year).slice(-2),2),YYY:tt("".concat(t.year).slice(-3),3),def:function(e){return tt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:tt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:tt("".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 tt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return tt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return tt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return tt("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var i=0;i<n;i++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r=r.slice(0,e.length)}}}}var st=function(){function e(t,r,i){n(this,e);var o,s=t||{};s.qCalendarStrings||(s.qCalendarStrings={qLongDayNames:$e,qDayNames:Je,qLongMonthNames:Ze,qMonthNames:Qe}),this.localeInfo=s,this.locale_days=s.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=s.qCalendarStrings.qDayNames.slice(),this.locale_months=s.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=s.qCalendarStrings.qMonthNames.slice(),r||(r=(a(o={},Xe.TIME,s.qTimeFmt||"hh:mm:ss"),a(o,Xe.DATE,s.qDateFmt||"YYYY-MM-DD"),a(o,Xe.DATE_TIME,s.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[i]),this.pattern=r}return o(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 r,n=/t+/gi.test(t);e instanceof Date?r=rt(e,n):(e<0&&(e=-e,t="-".concat(t)),r=ot(e,t));var i=at(this,r),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,r,n;for(r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in i[r])if(o===e||o.toLowerCase()===e){void 0===(n=i[r][o])&&(n=i[r][o.toLowerCase()]);break}return void 0===n&&(n=i[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function ut(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(st,t)}var lt=864e5;function ct(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(lt*(e-Math.floor(e)))))}function pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=ut(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),i=Ye(n.format.bind(n),{toKey:function(e){return"object"===r(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Xe.INTERVAL?ct(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),n.format(t,e)},a.locale=function(o){return n=ut(o,e,t),i=Ye(n.format.bind(n),{toKey:function(e){return"object"===r(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function dt(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return pt(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=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?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(r="#".concat(i,"##A"),o="U"),Ge(r,n,i,o,t)}function ft(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},d="dimension"===u?"first":"avg",f=dt(r,o),m={id:function(){return n},key:function(){return i},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(m)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:p,reduce:d,reduceLabel:"dimension"===u?"first":function(e,t){return f(t)},formatter:function(){return f},tags:function(){return r.qTags}};return m}function mt(e,t,r,n,i){return(t[e]||[]).map((function(t,o){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(o),s={instance:ft(A({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=mt("qAttrDimInfo",t,r,a,A({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=mt("qAttrExprInfo",t,r,a,A({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=mt("qMeasureInfo",t,r,a,A({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ht(){var e,r,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.key,a=i.data,s=i.config,u=void 0===s?{}:s,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=a;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var d=ht.util,f={cache:l,cube:c,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},m={key:function(){return o},raw:function(){return c},field:function(e){return le(e,f)},fields:function(){return l.fields.slice()},extract:function(e){return f.extractor(e,m,l,d)},hierarchy:function(e){return f.hierarchy(e,m,l,d)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(f.extractor=Ce,f.hierarchy=Se,f.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(f.extractor=L,f.pages=c.qDataPages,f.hierarchy=Se):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},m,l,d)};var h="S"===c.qMode?function(e){return e.qElemNumber}:void 0,g="S"===c.qMode?function(e){return e.qNum}:void 0;return(e=l.wrappedFields).push.apply(e,p(mt("qDimensionInfo",c,o,"",A({},f,{value:h,type:"dimension"})))),(r=l.wrappedFields).push.apply(r,p(mt("qMeasureInfo",c,o,"",A({},f,{value:g,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance})),function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))}(l.wrappedFields),(u.virtualFields||[]).forEach((function(e){var r=m.field(e.from),n=ft(t({meta:r.raw(),id:"".concat(o,"/").concat(e.key),sourceField:r,fieldExtractor:function(e){return f.extractor({field:e},m,l,d)},key:e.key,type:r.type(),localeInfo:f.localeInfo,value:r.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,p(l.virtualFields)),m}var gt=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],yt=/\/qDimensionInfo(?:\/(\d+))?/,bt=/\/qMeasureInfo\/(\d+)/,vt=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,qt=/\/qAttrExprInfo\/(\d+)/,xt=/\/?qHyperCube/,Dt=/\/?qTreeData/,St=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Ct=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Et(e,t){var r=e,n=-1,i=-1,o="",a=function(e){return e};xt.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=St):Dt.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=Ct);var s=!0;if(yt.test(e)&&(n=+yt.exec(e)[1]),bt.test(e)&&(i=+bt.exec(e)[1]),vt.test(e)){i=-1,n=0;var u=+vt.exec(r)[2];isNaN(u)||(n=u,r=r.replace(/\/\d+$/,"")),s=!1}if(qt.test(e)){var l=i;if(t){i=0;var p=ae(o,t);i+=(p.qMeasureInfo||[]).length,n>-1?(i=p.qDimensionInfo.slice(0,n).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),n=-1):(i=p.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=p.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+qt.exec(r)[1]}else n>-1?(n=-1,i=+qt.exec(r)[1]):i+=+qt.exec(r)[1]+1}return gt.forEach((function(e){var t=c(e,2),n=t[0],i=t[1];r=r.replace(n,i)})),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:i,dimensionIdx:n,path:r}}function Mt(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=r.byCells,o=r.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=Et(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.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 u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.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&&(l=!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(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var p=n.qHyperCube,d=p.qNoOfLeftDims,f=p.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===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!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)})),l=!!s.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&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=r.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 It(e){ht.util=e.data("matrix").util,e.data("q",ht),e.formatter("q-number",Ge),e.formatter("q-time",pt)}return It.qBrushHelper=Mt,It.selections=Mt,It}(),ki={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){var r=e.brushes().filter((function(e){return"value"===e.type})),n=[];r.length&&r.forEach((function(e){n=n.concat(e.brush.values().map((function(t){return{key:e.id,value:t}})))}));return n.concat(t)},filterValues:function(e,t){var r,n,i=this,o=[],a=0,s=[];return t.forEach((function(t){t.value!==i.DIM_VALUE_NULL&&t.value!==i.DIM_VALUE_TOTAL&&(n=function(e,t){var r=t.key.indexOf("qHyperCube")+"qHyperCube".length,n=t.key.substr(0,r),i=t.key.substr(r+1);return e.dataset(n).field(i)}(e,t),(r=n&&n.raw()).qLocked?(o.push(r),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};var Li={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function ji(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");var t=e.chartInstance,r=e.selectionsApi,n=e.dataPaths||[""],i=e.selectPaths,o=e.lasso,a=[],s={propertiesToRestore:{}},u=!1,l=function(e,t,r){function n(){}return n.update=function(e,n,i){t.isActive()||t.begin(r),Ti.qBrushHelper(i).forEach((function(e){t.select(e)}))},n.toggleValues=function(n,i,o){var a=ki.brushInterceptors.filterValues(e,n),s=a.items;return t.isActive()||a.itemsAreLocked||!(o||s.length>0)||(t.begin(r),i.start(),i.emit("update",[],[])),s},n}(t,r,i),c={},p=!1;function d(e){16===e.keyCode&&e.shiftKey!==p&&(p=e.shiftKey,o.toggle())}function f(e){var t=e.keyCode;27===t?r.cancel():13===t&&r.confirm()}function m(){a.forEach((function(e){e.listeners.update=function(t,r){e.sleep||l.update(t,r,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function h(){a.forEach((function(e){e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return r.on("cleared",(function(){a.forEach((function(e){e.brush.clear(),e.dependentComponents.forEach((function(e){var r=t.component(e.id);r&&r.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();var t=this.setUpBrush(e);return u&&m(),t},c.setUpBrush=function(e){var r=M(!0,{},Li,e),i={on:"tap",action:function(t){return t.ctrlKey||e.isSingleSelect?"set":"toggle"},contexts:r.contexts,data:r.data,globalPropagation:"stop"},o={context:r.contexts[0],data:r.data,style:r.style},s=function(e,t){return{brush:t.brush(e.contexts[0]),listeners:{},dependentComponents:[],id:e.contexts[0]}}(r,t);return s.listeners.toggle=function(e){if(!u)return[];var i=function(){var e=[],r=n.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))}));r=[].concat.apply([],r);for(var i=0;i<r.length;i++)r[i].raw().qLocked&&e.push(r[i].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===r.length}}();return r.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:l.toggleValues(e,s.brush,r.startOnEmptySelection)},s.brush.intercept("toggle-values",s.listeners.toggle),s.brush.intercept("add-values",s.listeners.toggle),s.brush.intercept("remove-values",s.listeners.toggle),s.brush.intercept("set-values",s.listeners.toggle),s.listeners.start=function(){a.length>1&&a.forEach((function(e){e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){u&&m()},c.tearDown=function(){u&&h(),a.forEach((function(e){e.brush.removeInterceptor("toggle-values",e.listeners.toggle),e.brush.removeInterceptor("add-values",e.listeners.toggle),e.brush.removeInterceptor("remove-values",e.listeners.toggle),e.brush.removeInterceptor("set-values",e.listeners.toggle)})),a=[]},c.pauseEngineCalls=function(e){a.forEach((function(t){t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((function(r){r.id===e&&(r.sleep=!1,t&&r.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((function(r){r.id===e&&r.dependentComponents.push(t)}))},c.on=function(){if(!u){u=!0,m(),document.addEventListener("keydown",d),document.addEventListener("keyup",d);var e=function(){a.forEach((function(e){e.brush.end()})),document.removeEventListener("keyup",f),o.active()&&o.toggle()};r.on("deactivated",e),s.unbindDeactivated=function(){r.removeListener("deactivated",e)};var t=function(){document.addEventListener("keyup",f)};r.on("activated",t),s.unbindActivated=function(){r.removeListener("activated",t)}}},c.isOn=function(){return u},c.off=function(){u&&(u=!1,h(),document.removeEventListener("keydown",d),document.removeEventListener("keyup",d),document.removeEventListener("keyup",f),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return e=n.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))})),(e=[].concat.apply([],e)).length&&e.every((function(e){return e.raw().qLocked}));var e},c}var _i=function(){function e(){k(this,e)}return j(e,[{key:"isOn",value:function(){return!1}},{key:"on",value:function(){console.warn("Can not turn on selections on this object")}},{key:"off",value:function(){}}]),e}(),Pi=function(e){return e.selectionsApi?ji(e):new _i};var Ri={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return-1!==t.indexOf(e.settings.key)}))[0]},isOnComponentForLasso:function(e,t,r){return e&&r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return e.settings.key===t.keys.componentKey}))[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some((function(e){return e.settings.key===t}))}};var Ni={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:E.DIRECTION_ALL,threshold:1,enable:function(n,i){if(e.lassoing)return t.isSelectionEnabled();var o,a=Ri.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((o=r.handlers).selectionHandler.lassoState()&&!o.selectionHandler.allFieldsLocked()||e.lassoing)&&a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart:function(n){Ri.isOnComponentForLasso(n,r,this)&&(t.switchTo("lasso",this.chart,n),e.lassoing=!0,r.handlers.selectionHandler.pauseEngineCalls(r.keys.lassoBrushKey),n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",n))},lassomove:function(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend:function(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel:function(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var Hi={callMeasureRangeGesture:function(e,t,r,n){var i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?E.DIRECTION_HORIZONTAL:E.DIRECTION_VERTICAL,event:"measurerange",enable:function(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();var a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Ri.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart:function(i){var o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];Ri.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.measureRangeBrushKey))},measurerangemove:function(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend:function(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel:function(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Fi(e,t){return"x-axis"===e?"horizontal"===t?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL:"horizontal"===t?E.DIRECTION_HORIZONTAL:E.DIRECTION_VERTICAL}var Bi={callAreaRangeGesture:function(e,t,r,n){var i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Fi(n,r.isHorizontal),event:"arearange",enable:function(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();var a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Ri.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:"lasso ".concat(i),recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart:function(i){var o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];Ri.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.areaBrushKey))},arearangemove:function(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend:function(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel:function(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Vi={callDimensionRangeGesture:function(e,t,r,n){var i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL,event:"majorrange",enable:function(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();var a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Ri.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart:function(i){var o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];Ri.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.dimRangeBrushKey))},majorrangemove:function(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend:function(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel:function(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var zi={callDragGesture:function(e,t,r,n,i){var o={};return{type:"Pan",options:{direction:r.isHorizontal?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL,event:"drag",enable:function(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return e.settings.key===r.keys.componentKey}))[0],e.dragging)}},requireFailure:n?"lasso ".concat(t.getBrushConfig()):"",events:{dragstart:function(e){o={x:e.deltaX,y:e.deltaY};var t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove:function(t){if(e.dragging){var n=-(r.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(n=-n),r.handlers.scrollHandler.getScrollApi().move(n),o={x:t.deltaX,y:t.deltaY}}},dragend:function(){e.dragging&&(e.dragging=!1)},dragcancel:function(){e.dragging=!1}}}}};var Ui={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable:function(r,n){return!(!n||!e())&&Ri.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap:function(e){this.chart.componentsFromPoint(e.center).forEach((function(t){var r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)}))}}}}};var Wi={create:function(e,t,r,n,i){var o={};t=t||"vertical";var a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,u=n.measureRangeBrushKey||null,l=n.areaBrushKey||null,c=n.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},m="horizontal"===t,h=m?"y-axis":"x-axis",g=m?"x-axis":"y-axis";function y(e,t,r){if(f.gesture!==e){var n=a,i=t||f.chart;switch(f.gesture){case"majorrange":b(i,"rangeDim","rangeClear",r),n=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",r),n=u;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=l}f.gesture=e;var o="range"===e?"range":"item";f.type&&f.type!==o&&i.brush(n).clear(),f.chart=t,f.type=o}}function b(e,t,r,n){if(e){var i=e.component(t);i&&i.emit(r,n)}}var v=[],q={isSelectionEnabled:function(){return e.selectionHandler&&e.selectionHandler.isOn()},isNavigationEnabled:function(){return e.scrollHandler&&e.scrollHandler.isOn()},doEmit:b,switchTo:y,getBrushConfig:function(){return s?u?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},x={handlers:e,keys:n,isHorizontal:m,active:f,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&((v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap:function(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}]).unshift(Ui.callNavBtnGesture(q.isNavigationEnabled,c)),v.push(Ni.callLassoGesture(d,q,x)),s?u?(v.push(Vi.callDimensionRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Hi.callMeasureRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Vi.callDimensionRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Bi.callAreaRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"})):(v.push(Hi.callMeasureRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"}),v.push(Bi.callAreaRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(zi.callDragGesture(d,q,x,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function Ki(e,t,r,n,i){var o=!1;n=n||"tooltip",r=r||["self"];var a=e.brush(n),s={};function u(){o&&e.component(i).emit("hide");o=!1}return s.isOpen=function(){return o},s.closeTooltip=u,s.update=function(){var s=a.brushes(),l=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;var r={nodes:t};e.component(i).emit("show",{},r)}(l)):u()},s.toggleInterceptor=function(e){if(r.length>1){var t={},n=[];return e.forEach((function(e){t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,n.push(e))})),n}return e},s}var Yi=function(){return Ki.apply(void 0,arguments)},Gi={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);var r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};var Xi=function(e){return function(t){var r=t.h,n=t.data,i=t.style,o=function(e,t){for(var r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length),a=function(i){var o=t[i],a={rows:[]};if(e.labelData){for(var s=[],u=e.labelData,l=!1,c=0;c<u.length;c++){var p=o.data[u[c]].value;if(-2===p.qElemNo||-2===p.qElemNumber){l=!0;break}s.push(o.data[u[c]].value.qText)}if(l)return{v:void 0};a.header=e.headerResolver(s),a.rows=e.measureRows.map((function(t){var n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)})).filter((function(e){return!!e}));var d=function(e,t){var r,n,i,o=t.data.color,a=null===(r=e.colorService)||void 0===r||null===(n=r.getSettings)||void 0===n?void 0:n.call(r);if(!a||"color"===a.type||!o||!a.fieldType)return;var s=[];e.data.forEach((function(e){var r=t.data[e];r&&s.push(r.value)}));var u=function(e){for(var t=-1,r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),l=e.translator,c=a.label,p=null===(i=t.attrs)||void 0===i?void 0:i.fill,d=-1!==u?l.get("properties.dimensionLimits.others"):o.label;return{color:p,label:c,value:d}}(e,o);d&&a.rows.unshift(d),n.push(a)}},s=0;s<o;s++){var u=a(s);if("object"===w(u))return u.v}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,n),a={h:r,style:i,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(a,o)}};var $i="#".concat("dist-flow-tooltip");function Ji(){if(!document.querySelector($i)){var e=document.createElement("div");e.id="dist-flow-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 Zi(e){var t=e.key,r=void 0===t?"tooltip":t,n=e.rtl,i=e.fontFamily,o=e.filter;return{show:!0,key:r,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Ji()},beforeUpdate:function(){Ji()},destroyed:function(){var e;(e=document.querySelector($i))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector($i)},content:e.content,filter:o,extract:function(e){return e.node},direction:n?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:i,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Qi=Bn.detectTextDirection;var eo={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:function(e){return e.join(", ")},rowResolver:function(e,t){return{value:Gi.formatMeasureValue(e,t),label:e.title()}},direction:"ltr",renderer:function(e,t){var r=e.h,n=e.style,i=e.translator,o=e.rtl,a=[],s=o?"right":"left";if(t.forEach((function(e){if(e.header){var t=A(A({},n.cell),{},{textAlign:s,fontWeight:"bold",direction:Qi(e.header)});a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((function(e){var t=e.value;if(e.color){var i={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},u=r("div",{style:i});t=o?[e.value,u]:[u,e.value]}var l=o?[":",e.label]:[e.label,":"],c=A(A({},n.cell),{},{textAlign:s,direction:Qi(e.label)}),p=A(A({},n.cell),{},{textAlign:o?"left":"right",direction:Qi(e.value)});a.push(r("tr",null,r("td",{style:c},l),r("td",{style:p},t)))}))})),t.numberInExcess){var u=i.get("Object.ChartTooltip.NMore",t.numberInExcess),l=A(A({},n.cell),{},{textAlign:s,direction:Qi(u)});a.push(r("tr",null,r("td",{style:l,colSpan:2},u)))}return a}};function to(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");var n={},i=!1,o={};function a(e){e.listeners.update=function(t,r){e.action.update(t,r,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(n).forEach((function(e){u(n[e])}))}function u(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function l(){Object.keys(n).forEach((function(e){n[e].action.closeTooltip()}))}function c(){for(var e in l(),n)n[e].brush.clear()}return o.setUp=function(t){var o=M(!0,{},eo,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&u(n[o.contexts[0]]);var s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Yi(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);n[o.contexts[0]]=s,i&&a(s);var l,c=Zi({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(l=s.filterShapes,function(e){return l?l(e):function(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)}),content:Xi(s,o.dataPath)});return o.chartBuilder.getSettings().components.push(c),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((function(e){return{context:e}})),component:c}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=l,o.isOn=function(){return i},o.on=function(){i||(i=!0,Object.keys(n).forEach((function(e){a(n[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),l())},o}var ro=function(e,t,r){return to(e,t,r)};var no=".scrollHandler";function io(e,t,r,n,i){if(!e||!t||!r)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=r,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=n,this._legendKey=i}function oo(){var e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function ao(e){var t,r,n,i,o=(t=e.originalEvent,r=0,n=0,i=0,t.wheelDelta&&(r=t.wheelDelta/60),t.detail&&(r=-t.detail/3),i=r,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(i=0,n=-1*r),void 0!==t.wheelDeltaY&&(i=t.wheelDeltaY/60),void 0!==t.wheelDeltaX&&(n=-1*t.wheelDeltaX/60),{delta:r,deltaX:n,deltaY:i,x:t.pageX,y:t.pageY});if(!function(e,t,r,n){return!(!n||!r.componentsFromPoint(t).some((function(e){return e.settings.key===n}))||(r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),0))}(e,o,this._chartInstance,this._legendKey)&&!this._disabled&&this.getScrollApi()&&(e.preventDefault(),o.delta)){var a=o.delta<0?3:-3;this._scrollApi.move(a)}}function so(){if(this._disabled||this._sizeChanged)this._sizeChanged=!1;else{var e=this;this.getViewData().then((function(t){e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((function(e){}))}}io.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},io.prototype.setDisabled=function(e){this._disabled=e},io.prototype.getDisabled=function(){return this._disabled},io.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,oo.call(this))},io.prototype.getItemSize=function(){return this._itemSize},io.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||oo.call(this);return this._scrollViewSizeInItem},io.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",so.bind(this)));this._$chartElement.on("mousewheel".concat(no," DOMMouseScroll").concat(no),ao.bind(this)),this._$chartElement.on("touchstart".concat(no),(function(e){e.preventDefault()})),this._on=!0},io.prototype.isOn=function(){return this._on},io.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(no),this._on=!1},io.prototype.updateViewState=function(e){oo.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},io.prototype.onResize=function(){this._sizeChanged=!0,oo.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},io.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},io.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},io.prototype.getViewData=function(){var e=0,t=0;if(this.getScrollApi()){var r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},io.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},io.prototype.getScrollState=function(){return this.getScrollApi().getState().start},io.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};function uo(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11}function lo(e){if(!e)return{latin:0,cjk:0};var t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g),i=(t=t?t.length:0)+(r=r?r.length:0)+(n=n?n.length:0);return{latin:e.length-i,cjk:i}}function co(e,t){var r={latin:0,cjk:0};void 0===t?e.forEach((function(e){var t=lo(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((function(e){var n=lo(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk}));var n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function po(e,t,r){return e*(e<=24?t:r)}var fo={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:uo,getCharacterRatios:lo,getTotalCharacterRatios:co,getAdjustedMaxGlyphCount:function(e,t,r){var n=co(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(uo(i)+1.0909090909090908*o)},estimateLatinLabelWidth:po,estimateLabelWidth:function(e,t,r,n,i){return e*r+po(t,n,i)}},mo={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},ho=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,go=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,yo=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,bo=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,vo=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,qo=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,xo=Math.floor,Do=Math.round,So=Gt.extend({init:function(){var e,t,r,n,i,o,a,s,u,l,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof So)d=arguments[0]._r,f=arguments[0]._g,m=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p=arguments[0]))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),f=parseInt(c[2],16),m=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),f=parseInt(c[2]+c[2],16),m=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(n=(n/=100)<0?0:n>1?1:n)<=.5?2*n*t:(2-2*n)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=n-.5*o,d=u[0]+l,f=u[1]+l,m=u[2]+l,d=Do(255*d),f=Do(255*f),m=Do(255*m),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),h=parseFloat(c[7]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(n=(n/=100)<0?0:n>1?1:n)<=.5?2*n*t:(2-2*n)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=n-.5*o,d=u[0]+l,f=u[1]+l,m=u[2]+l,d=Do(255*d),f=Do(255*f),m=Do(255*m)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(i=(i/=100)<0?0:i>1?1:i)*(t=(t/=100)<0?0:t>1?1:t))*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=i-o,d=u[0]+l,f=u[1]+l,m=u[2]+l,d=Do(255*d),f=Do(255*f),m=Do(255*m),h=1}else mo[p.toLowerCase()]?(r=p.toLowerCase(),d=mo[r].r,f=mo[r].g,m=mo[r].b,h="number"==typeof mo[r].a?mo[r].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],m=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+m+h)&&(this._invalid=!0),this._r=xo(d),this._g=xo(f),this._b=xo(m),this._a=h,this._spaces={}},isInvalid:function(){return this._invalid},setAlpha:function(e){this._a=e,this._spaces={}},getAlpha:function(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=So.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=So.toRGBA(this)),this._spaces.rgba},toString:function(){return this._spaces.rgb||(this._spaces.rgb=So.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=So.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=So.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=So.toHSLA(this,e)),this._spaces.hsla},toHSV:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=So.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=So.toNumber(this)),this._spaces.num},isDark:function(){return this.isInvalid()||this.getLuminance()<125},getLuminance:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance:function(e){var t=this.toHSLA(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),n=parseFloat(r[1]),i=parseFloat(r[3]),o=parseFloat(r[5]),a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),"hsla(".concat(n,",").concat(i,",").concat(o,",").concat(a,")")},isEqual:function(e){return e instanceof So||(e=new So(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend:function(e,t){var r=xo(this._r+(e._r-this._r)*t),n=xo(this._g+(e._g-this._g)*t),i=xo(this._b+(e._b-this._b)*t),o=xo(this._a+(e._a-this._a)*t);return"rgba(".concat([r,n,i,o].join(","),")")},createShiftedColor:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var t=this.getLuminance(),r=this._g<126?1:1+this._g/512,n=this.shiftLuminance(20*(t*r<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new So(n)}});So.toRGB=function(e){if(e instanceof So)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=So.toNumber(e));var t=(65280&e)>>8,r=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(r,")")},So.toRGBA=function(e,t){if(e instanceof So)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=So.toNumber(e));var r=(65280&e)>>8,n=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(r,",").concat(n,",").concat(void 0!==t?t:e._a,")")},So.toHex=function(e){var t,r,n;return e instanceof So?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===r.length&&(r="0".concat(r)),1===n.length&&(n="0".concat(n)),"#".concat([t,r,n].join(""))):("string"==typeof e&&(e=So.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===r.length&&(r="0".concat(r)),1===n.length&&(n="0".concat(n)),"#".concat(t).concat(r).concat(n))},So.toHSL=function(e,t){var r,n,i,o=0;"string"==typeof e&&(e=new So(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=Math.max(a,s,u),c=Math.min(a,s,u);if(n=t?.21*a+.72*s+.07*u:(l+c)/2,l===c)r=0,o=0;else{switch(i=l-c,r=n>.5?i/(2-l-c):i/(l+c),l){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsl(".concat(360*o,",").concat(100*r,",").concat(100*n,")")},So.toHSLA=function(e,t){var r,n,i,o=0;"string"==typeof e&&(e=new So(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=e._a,c=Math.max(a,s,u),p=Math.min(a,s,u);if(n=t?.21*a+.72*s+.07*u:(c+p)/2,c===p)r=0,o=0;else{switch(i=c-p,r=n>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsla(".concat(360*o,",").concat(100*r,",").concat(100*n,",").concat(l,")")},So.toHSVComponents=function(e){var t,r,n=0;"string"==typeof e&&(e=new So(e));var i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),u=Math.min(i,o,a),l=s;if(s===u)t=0,n=0;else{switch(t=0===(r=s-u)?0:r/l,s){case i:n=(o-a)/r+(o<a?6:0);break;case o:n=(a-i)/r+2;break;case a:n=(i-o)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*l}},So.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof So)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(r=parseInt(e[1],16),n=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(r<<16)+(n<<8)+i},So.blend=function(e,t,r){var n=(16711680&(e=So.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=So.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},So.getBlend=function(e,t,r){var n=e._r+(t._r-e._r)*r,i=e._g+(t._g-e._g)*r,o=e._b+(t._b-e._b)*r,a=e._a+(t._a-e._a)*r;return new So(n,i,o,a)},So.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(ho.test(e)||go.test(e)||yo.test(e)||bo.test(e)||vo.test(e)||qo.test(e)||mo[e.toLowerCase()])},So.getBestContrast=function(e,t,r){var n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},So.getContrast=function(e,t){if(e&&t){var r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}},So.isDark=function(){var e={getLuminance:So.prototype.getLuminance,isInvalid:So.prototype.isInvalid};return So.prototype.init.apply(e,[].slice.call(arguments)),So.prototype.isDark.call(e)},So.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};var Co={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse:function(e){var t=new So(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey:function(e){var t=new So(e);return 0===t.getAlpha()?this.DARK_GREY:So.getBestContrast(t,new So(Co.LIGHT_GREY),new So(Co.DARK_GREY))},getBestContrast:function(e,t,r){return So.getBestContrast(new So(e),new So(t),new So(r))},getContrastingTransparent:function(e){var t=new So(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};function Eo(e,t){return t=t?"".concat(t,"."):"",vt(e,"".concat(t,"qHyperCube.qDimensionInfo.length"))>1}function Mo(e,t){if(t=t?"".concat(t,"."):"",vt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.length")))return vt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qSubNodes.length"),0)+vt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qDown"),0)+vt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qUp"),0);var r=vt(e,"".concat(t,"qHyperCube.qEffectiveInterColumnSortOrder.0"));return Io(vt(e,"".concat(t,"qHyperCube.qDimensionInfo.").concat(r)))}function Io(e){return e.qCardinalities.qHypercubeCardinal}var Ao={getHyperCube:function(e,t){return e&&(e=t?vt(e,t):e)&&e.qHyperCube?e.qHyperCube:null},hasSecondDimension:Eo,hasSecondMeasure:function(e,t){return t=t?"".concat(t,"."):"",vt(e,"".concat(t,"qHyperCube.qMeasureInfo.length"))>1},getStackedCubeSizeOf2Dims:Mo,getStackedCubeSizeOfMax2Dims:function(e,t){return Eo(e,t)?Mo(e,t):function(e,t){return t=t?"".concat(t,"."):"",vt(e,"".concat(t,"qHyperCube.qSize.qcy"))}(e,t)},getOuterDimensionSizeOfMax2Dims:function(e,t){return Eo(e,t)?Mo(e,t):1},getDimensionSize:Io},wo=function(){this._maxJitter=1};wo.prototype.calcMaxJitter=function(e,t,r){this._maxJitter=Math.min(e*t,r-e)},wo.prototype.getJitterValue=function(e){var t=Math.abs(pi("".concat(e))%10)/9;return this._maxJitter/2-t*this._maxJitter};var Oo={toBefore:function(e){var t=e.qUndoExclude.qHyperCube;2===t.qEffectiveInterColumnSortOrder.length&&0===t.qEffectiveInterColumnSortOrder[0]&&(t.qEffectiveInterColumnSortOrder=[1,0],t.qDimensionInfo.reverse())},toAfter:function(e){var t=e.qUndoExclude.qHyperCube;2===t.qEffectiveInterColumnSortOrder.length&&1===t.qEffectiveInterColumnSortOrder[0]&&(t.qEffectiveInterColumnSortOrder=[0,1],t.qDimensionInfo.reverse())}};var To={generateHyperCube:function(e,t,r,n){t.qUndoExclude||(t.qUndoExclude={}),t.qUndoExclude.qHyperCubeDef=M(!0,{},t.qHyperCubeDef),t.qUndoExclude.qHyperCubeDef.qDimensions.reverse(),Xr(t,"qUndoExclude.qHyperCubeDef.",t.color.point);var i=[],o=t.qUndoExclude.qHyperCubeDef.qDimensions.length,a=t.color.point&&!t.color.point.auto&&"byExpression"===t.color.point.mode;return o>0&&a&&(i=[Vr(Wr.COLOR_BY_EXPRESSION,{qExpression:vt(t,"color.point.expression.qValueExpression.qExpr")})]),t.qUndoExclude.qHyperCubeDef.qMeasures[0].qAttributeExpressions=i,Fr.hasMultipleDimensions(t)?Mr.getAllHyperCubeExpressions(t.qHyperCubeDef,e.qHyperCube,r).then((function(i){Dn.applySorting(t,e,r,i,n);var o=i.dimensions[0],a=i.dimensions[1],s=i.measures[0],u=vn.getFractileExpression(1,o,a,s),l=vn.getFractileExpression(0,o,a,s);t.qUndoExclude.qHyperCubeDef.qDimensions[0].qAttributeExpressions=[{qExpression:l,id:"minBoxValue"},{qExpression:u,id:"maxBoxValue"}]})):(t.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[1,0],Promise.resolve())}},ko=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Lo(e){var t=e.qUndoExclude.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(ko),o=n.some(ko),a=e.color.point.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function jo(e){var t,r=e.layout,n=e.localeInfo,i=e.model,o=e.picasso,a=e.environment,s=a.app,u=a.theme,l=a.translator,c=M(!0,{},r.color.point);return 2===r.qHyperCube.qDimensionInfo.length&&(0===(null==(t=c.byDimDef)?void 0:t.activeDimensionIndex)?t.activeDimensionIndex=1:1===(null==t?void 0:t.activeDimensionIndex)&&(t.activeDimensionIndex=0)),function(e){var t,r,n;return!(!e.snapshotData||null!==(t=e.snapshotData.content)&&void 0!==t&&null!==(r=t.chartData)&&void 0!==r&&r.legendDataPage||null===(n=e.qUndoExclude)||void 0===n||!n.legendData)}(r)&&(r=function(e){return(e=M({},e)).snapshotData=M({},e.snapshotData),e.snapshotData.content=M({},e.snapshotData.content),e.snapshotData.content.chartData=M({},e.snapshotData.content.chartData),e.snapshotData.content.chartData.legendDataPage=e.qUndoExclude.legendData.qDataPages,e}(r)),c.mode||(c.mode="primary"),function(e){var t,r,n,i,o=e.picasso,a=e.model,s=e.app,u=e.translator,l=e.layoutService,c=void 0===l?void 0:l,p=e.createConfig,d=void 0===p?bt:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,b=m.key,v=m.theme,q=void 0===v?void 0:v,x=m.auto,D=void 0===x?void 0:x,S=m.definitionPath,C=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),E={theme:q,key:b,localeInfo:y,layout:C,hc:null==c||null===(r=c.getHyperCube)||void 0===r?void 0:r.call(c),legendProps:null==c||null===(n=c.getLayoutValue)||void 0===n?void 0:n.call(c,"legend"),colorProps:Y(Y({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:C?mt(C):void 0})},M=dt({picasso:o,model:a,app:s,translator:u,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:yt}):yt(e)}));var I=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return M.resolveUIColor({index:t,color:r})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(S)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return I},custom:Y({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:mt}),r=ht(E,t);return M.config(r),M.getAuxiliarySettings(S).then((function(){I=!0}))}}}({app:s,model:i,picasso:o,translator:l,config:{localeInfo:n,theme:u,key:"color",definitionPath:"/qUndoExclude/qHyperCubeDef"},createConfig:function(){return{layout:r,hc:r.qUndoExclude.qHyperCube,legendProps:r.legend,colorProps:A(A({},c),{},{useBaseColors:Lo(r)})}}})}var _o=Nr.DATA_PATH,Po=Nr.HYPERCUBE_PATH,Ro=Nr.HYPERCUBE_DEF_PATH;function No(e){return Array.isArray(e)?e:e?[e]:[]}function Ho(e){return Math.min(Ao.getOuterDimensionSizeOfMax2Dims(e,_o),Nr.MAX_STACKED_VALUES)}function Fo(e,t){return{viewSize:t,max:Ho(e)}}function Bo(){var e=Nr.MAX_STACKED_VALUES>=this.layout.qUndoExclude.qHyperCube.qSize.qcy?3:1;this.backendApi.setCacheOptions({height:e*this._scrollHandler.getScrollViewSizeInItem(),width:3})}function Vo(){this.layout&&Ao.hasSecondDimension(this.layout,_o)&&(this._scrollHandler.onResize(),!!this.layout.snapshotData||Bo.call(this))}function zo(){var e=this.chartInstance.component("legend");e&&e.emit&&e.emit("resetindex")}function Uo(e,t){return vt(e,"qHyperCube.qDimensionInfo.".concat(t,".qIsOneAndOnlyOne"))||!1}var Wo=ci.extend("DistributionPlot",{namespace:".distributionPlot",init:function(e){var t=e.lasso,r=e.environment,n=e.flags,i=e.picasso,o=e.$element,a=e.backendApi,s=e.selectionsApi;this._super(i,o,r,a,s),this.flags=n,this.picasso=i,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new Ai,this._selectionHandler=Pi({model:a.model,chartInstance:this.chartInstance,selectionsApi:s,isLassoDisabled:this.isLassoDisabled.bind(this),selectPaths:["/qUndoExclude/qHyperCubeDef"],lasso:t}),this._tooltipHandler=ro(this.chartInstance,o,Nr.CHART_ID),this._scrollHandler=new io(this.chartInstance,o,this.getSlicedData.bind(this),this.onScrollCallback.bind(this),"colorLegend-cat"),this._maxBubbleScale=Nr.BUBBLE_SCALES_MAX,this._jitterTool=new wo,this.setDataPaths(["".concat(_o,"/").concat(Po)])},onScrollCallback:function(e,t,r){var n=this;this._updateColorMapData(e).then((function(){n.updateChart(e,t,r)}))},getSlicedData:function(e,t){var r=this;return this.getData(this.backendApi,this.layout[_o][Po],{top:e,height:t}).then((function(){return r.layout}))},updateScrollHandlerState:function(e){void 0!==e&&(this._disableScrolling=!!e),this._scrollHandler.setDisabled(!Ao.hasSecondDimension(this.layout,_o)||this._disableScrolling)},updateConstraints:function(e){var t=!e.active,r=!e.passive,n=!e.select&&!e.active;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"](),this._selectionHandler[n?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off(),this._selectionHandler.off()},_getPointScale:function(){return(e=this.layout).dataPoint&&e.dataPoint.bubbleScales?this.layout.dataPoint.bubbleScales/this._maxBubbleScale:1;var e},_calcBandwidth:function(e,t){var r=t.scales().dimension;this._bandwidthRatio=r?r.pxScale(e).bandwidth():1,this._bandwidthPx=e*this._bandwidthRatio},_calcPointMaxSize:function(e,t){var r=Math.min(Nr.MAX_POINT_BASE_SIZE_PX,t*Nr.POINT_BANDWIDTH_BASE_RATIO)*e;this._pointMaxSizePx=Math.max(Nr.MIN_POINT_PIXELS,r)},_calcPointSize:function(e,t){this._pointSize=e/t},_getDimAxisSettings:function(e,t){var r=No(t.trigger),n=No(t.consume),i=this.picassoElement.getBoundingClientRect()["vertical"===e.orientation?"height":"width"],o=fo.getAdjustedMaxGlyphCount(function(e){var t=e[_o][Po].qDimensionInfo,r=Ao.hasSecondDimension(e,_o)?t[0].qApprMaxGlyphCount:0;return Math.min(Nr.MAX_GLYPH_COUNT,r)}(this.layout||e),e[_o][Po].qStackedDataPages[0].qData[0].qSubNodes),a=i/4;return{brush:{trigger:r,consume:n},settings:{labels:{mode:"vertical"===e.orientation?e.dimensionAxis.label:"auto",maxGlyphCount:o,maxLengthPx:a},paddingEnd:4}}},_getBoxMarkerSettings:function(e,t){var r=this.environment.theme,n=e.color.point.auto?r.getStyle(Nr.CHART_ID,"box","fill"):r.getColorPickerColor(e.color.box.paletteColor),i=No(t.trigger),o=No(t.consume),a=this,s="qMeasureInfo/0",u="qMeasureInfo/0";Ao.hasSecondDimension(e,_o)&&e.qUndoExclude.qHyperCube.qDimensionInfo[0].qAttrExprInfo.length&&(s="qDimensionInfo/0/qAttrExprInfo/0",u="qDimensionInfo/0/qAttrExprInfo/1");var l={require:["chart"],displayOrder:1e3,settings:{chart:this,box:{fill:n,stroke:r.getStyle(Nr.CHART_ID,"box","stroke"),strokeWidth:0,width:Nr.POINT_BANDWIDTH_BASE_RATIO,maxWidthPx:Nr.MAX_POINT_BASE_SIZE_PX,minWidthPx:Nr.MIN_POINT_PIXELS+2*Nr.BOX_PADDING},minor:{scale:"measure"},orientation:e.orientation},beforeRender:function(){var e=a.layout.presentation&&a.layout.presentation.visibleComponents&&-1!==a.layout.presentation.visibleComponents.indexOf("point"),t="horizontal"===a.layout.orientation?this.rect.height:this.rect.width;a._calcBandwidth(t,this.chart),a._calcPointMaxSize(e?a._getPointScale():1,a._bandwidthPx);var r=0;a._jitter&&(a._calcPointSize(a._pointMaxSizePx,a._bandwidthPx),r=a._pointSize*a._bandwidthPx*Nr.JITTER_PARAMETER);var n=a._pointMaxSizePx+r+2*Nr.BOX_PADDING,i=n/a._bandwidthPx;this.settings.settings.box.maxWidthPx=Math.min(a._bandwidthPx-2,n),this.settings.settings.box.width=i},brush:{trigger:i,consume:o},data:{extract:{field:"qDimensionInfo/0",trackBy:function(){return-1},props:{start:{field:s,reduce:"min"},end:{field:u,reduce:"max"},elemNo:{field:"qDimensionInfo/0"}}}}};return Ao.hasSecondDimension(e,_o)&&(l.data.extract.field="qDimensionInfo/0",l.data.extract.trackBy=function(e){return e.qElemNo},l.settings.major={scale:"dimension"}),l},_getPointMarkerSettings:function(e,t,r){var n=1;e.dataPoint&&!1===e.dataPoint.border&&(n=0);var i=No(t.trigger),o=No(t.consume);this._tooltipHandler.isOn()&&(i.push(r.point.trigger),o.push.apply(o,r.point.consume));var a=this,s=this.colorService.getColor(),u={require:["chart"],displayOrder:1100,settings:{chart:this,fill:s,stroke:function(e){var t=s(e);return Co.getContrastingTransparent(t)},size:.3,strokeWidth:n,sizeLimits:{maxRelExtent:10,maxPx:Nr.MAX_POINT_BASE_SIZE_PX,minPx:Nr.MIN_POINT_PIXELS},orientation:e.orientation},beforeRender:function(){var e="horizontal"===a.layout.orientation?this.rect.height:this.rect.width;if(a._calcBandwidth(e,this.chart),a._calcPointMaxSize(a._getPointScale(),a._bandwidthPx),a._calcPointSize(a._pointMaxSizePx,a._bandwidthPx),a._jitter){var t=2*Nr.BOX_PADDING/e;a._jitterTool.calcMaxJitter(a._pointSize*a._bandwidthRatio,Nr.JITTER_PARAMETER,a._bandwidthRatio-t)}this.settings.settings.sizeLimits.maxPx=a._pointMaxSizePx,this.settings.settings.size=a._pointSize},brush:{trigger:i,consume:o},data:{extract:{field:"qDimensionInfo/0",props:A({innerElemNo:{field:"qDimensionInfo/0"},elemNo:{field:"qDimensionInfo/0"},inner:{field:"qDimensionInfo/0",value:function(e){return e}},row:{field:"qDimensionInfo/0",value:function(e){return e.qRow}},measure:{field:"qMeasureInfo/0",reduce:"first",value:function(e){return e},reduceLabel:"none"}},this.colorService.getDatumProps())}}};return Ao.hasSecondDimension(e,_o)&&(u.data.extract.props.inner.field="qDimensionInfo/1",u.data.extract.props.innerElemNo.field="qDimensionInfo/1",u.data.extract.props.row.field="qDimensionInfo/1",u.data.extract.field="qDimensionInfo/1",u.data.extract.props.outer={field:"qDimensionInfo/0",value:function(e){return e}}),this.setDataPaths(["".concat(_o,"/").concat(Po)]),u},_getPointSelectionLayerSettings:function(e){var t=M(!0,{},e,{key:"selection-point-marker",settings:{opacity:0}});return t.brush.consume.pop(),t.brush.consume.forEach((function(e){e.style.inactive=void 0,e.style.active.opacity=1})),t.brush.trigger=[],t},createChartSettings:function(e){var t=this,r=this.isRtl(),n=this.environment.theme,i=!!e.snapshotData,o=e.presentation&&e.presentation.visibleComponents,a=o&&-1!==e.presentation.visibleComponents.indexOf("point"),s=o&&-1!==e.presentation.visibleComponents.indexOf("box");this._jitter=a&&e.dataPoint&&"jitter"===e.dataPoint.displacement;var u=e[_o][Po],l=u.qDimensionInfo,c="horizontal"!==e.orientation?"y":"x",p="horizontal"!==e.orientation?"x":"y",d=ni.create({chartID:Nr.CHART_ID,theme:n,isRtl:r});if(0===u.qStackedDataPages[0].qData.length)return d.getSettings();var f={},m={},h={},g={};if(this._selectionHandler.isOn()){var y=!a&&Ao.hasSecondDimension(e,_o);this._selectionHandler.setUpStart();var b=this._selectionHandler.setUpBrush({contexts:["select-inner"],data:["innerElemNo"],isSingleSelect:Uo(e,0)},!0),v=this._selectionHandler.setUpBrush({contexts:["select-outer"],data:["elemNo"],isSingleSelect:Uo(e,1)},!0),q=this._selectionHandler.setUpBrush({dataPath:_o,contexts:["select-color"],data:["color"],startOnEmptySelection:!1},!0),x=this._selectionHandler.setUpBrush({contexts:["select-measure"],data:[c]},!0);this._selectionHandler.setUpDone(),f={trigger:M(!0,{},v.trigger,{data:[""]}),consume:[M(!0,{},v.consume,{data:[""]})]},m={trigger:y?v.trigger:null,consume:[b.consume,v.consume,x.consume]},h={trigger:b.trigger,consume:[b.consume,v.consume,x.consume,q.consume]},g={trigger:[M(!0,{},q.trigger,{data:[""]})],consume:[M(!0,{},q.consume,{data:[""]}),b.consume,v.consume]}}var D={point:{},box:{}};this._tooltipHandler.isOn()&&(D.point=this._tooltipHandler.setUp({chartBuilder:d,colorService:this.colorService,data:Ao.hasSecondDimension(e,_o)?["innerElemNo","elemNo"]:["innerElemNo"],contexts:["pointTip"],componentKey:"point-marker",environment:this.environment,attrDimPath:"/".concat(Po,"/qDimensionInfo/").concat(Ao.hasSecondDimension(e,_o)?1:0,"/qAttrDimInfo/0"),measureRows:["measure"],labelData:Ao.hasSecondDimension(e,_o)?["inner","outer"]:["inner"]}));var S=function(e,t,r){var n={};return 1===e.length?(n.isOpenDim=!1,e[0]?n.isOpenMea=!1:n.isOpenMea=!0):e[0]&&!e[1]?(n.isOpenDim=!1,n.isOpenMea=!0):!e[0]&&e[1]?(n.isOpenDim=!0,n.isOpenMea=!1):e[0]&&e[1]?(n.isOpenDim=!1,n.isOpenMea=!1):(n.isOpenDim=!0,n.isOpenMea=!0),t&&(n.isOpenMea=!1),r&&(n.isOpenDim=!1),n}(function(e){var t=[],r=e.qUndoExclude&&e.qUndoExclude.qHyperCube&&e.qUndoExclude.qHyperCube.qDimensionInfo?e.qUndoExclude.qHyperCube.qDimensionInfo:void 0;if(!r)return!1;for(var n=0;n<r.length;n++)r[n].qLocked?t.push(r[n].qLocked):t.push(!1);return t}(e),Uo(e,0),Uo(e,1)),C={scrollHandler:this._scrollHandler,selectionHandler:this._selectionHandler},E={componentKey:a?"point-marker":"box-marker",lassoBrushKey:"select-inner",dimRangeBrushKey:"select-outer",measureRangeBrushKey:"select-measure",areaBrushKey:null,legendBrushKey:"legend"};if(this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Wi.create(C,e.orientation,r,E,S),d.addPreset("dimension-measure-chart",{isRtl:r,includeDimensionAxis:Ao.hasSecondDimension(e,_o),orientation:e.orientation,selectionsEnabled:this._selectionHandler.isOn(),theme:n,measureSource:["qMeasureInfo/0"],dimensionSource:"qDimensionInfo/0",measureAxisProperties:e.measureAxis,measureTitleText:u.qMeasureInfo[0].qFallbackTitle,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:this._getDimAxisSettings(e,f),dimensionTitleText:l&&l[0]&&l[0].qFallbackTitle||"",gridlines:e.gridlines,hasNavigation:!i,isNavigationEnabledFn:function(){return t._scrollHandler.isOn()},scrollSettings:Fo(e,this._scrollHandler.getScrollViewSizeInItem()),enableLasso:!0,lasso:{brushKey:a?"select-inner":"select-outer",brushComponents:a?["point-marker"]:["box-marker"],brushData:a?["innerElemNo"]:["elemNo"]},enableDimRange:!0,dimRange:{brushKey:"select-outer",brushAxis:"horizontal"===e.orientation?"y-axis":"x-axis",brushArea:s?"box-marker":"point-marker",brushScale:"dimension"},enableMeasureRange:a,measureRange:{brushKey:"select-measure",brushAxis:"horizontal"===e.orientation?"x-axis":"y-axis",brushArea:a?"point-marker":"box-marker",brushScale:"measure",multiple:!0},brushActions:this._dependentActions.gestures,refLines:e.refLine&&e.refLine.refLines}),s){var I=this._getBoxMarkerSettings(e,m);d.addComponent("box-marker",I)}if(a){var w=this._getPointMarkerSettings(e,h,D);if(w.data.extract.props[c]={field:"qMeasureInfo/0"},w.settings[c]={scale:"measure"},Ao.hasSecondDimension(e,_o)&&(w.data.extract.props[p]={field:"qDimensionInfo/0",type:"qual"},w.settings[p]={scale:"dimension"}),this._jitter){w.settings[p]=w.settings[p]||{};var O=this._jitterTool;w.settings[p].fn=function(e){return("function"==typeof e.scale?e.scale(e.datum[p].value)+.5*e.scale.bandwidth():.5)+O.getJitterValue(e.datum.value,Nr.JITTER_PARAMETER)}}d.addComponent("point-marker",w),d.addComponent("point-marker",this._getPointSelectionLayerSettings(w)),(e.legend?!1!==e.legend.show:!e.color.point.auto&&"byDimension"===e.color.point.mode)&&this.addLegend(d,r,g)}var T=d.getSettings();return this.addSnapshotChartSettings(T,e),T.scales=A(A({},T.scales),this.colorService.getScales()),T.palettes=this.colorService.getPalettes(),T},addLegend:function(e,t,r){var n,i,o=this,a={eventName:"legend-c",key:"colorLegend",styleReference:"object.comboChart",rtl:t,settings:{item:{shape:{type:"circle",size:10}}}},s=this.colorService.getLegend(a,{actions:{interact:{enabled:function(){return o._scrollHandler.isOn()}}}}),u=s.components;(u=u.filter((function(e){return!!e}))).length>0&&(this._selectionHandler.isOn()&&(u[0].brush={consume:r.consume.map((function(e){return M(!0,e,{style:{active:null}})})),trigger:r.trigger}),u[0].layout.displayOrder=200,u[0].layout.prioOrder=50),(n=e.settings.components).push.apply(n,R(u)),(i=e.settings.interactions[0].gestures).unshift.apply(i,R(s.interactions))},resize:function(){this.layout&&(Vo.call(this),this._super())},hasValidData:function(){var e=this.layout;return e[_o]&&e[_o][Po]&&e[_o][Po].qStackedDataPages.length&&e[_o][Po].qStackedDataPages[0].qData},paint:function(){var e=!!this.layout.snapshotData;e||this.environment.options.viewState||this.updateScrollHandlerState(!1),this._orientation||(this._orientation=this.layout.orientation),this._orientation!==this.layout.orientation&&(Vo.call(this),this._orientation=this.layout.orientation);var t=this.layout;if(!this.hasValidData())return Promise.resolve();var r=this,n=this._super;return!e&&Ao.hasSecondDimension(t,_o)&&this._scrollHandler.isDataSizeChanged(vt(t,"".concat(_o,".").concat(Po,".qStackedDataPages.0.qData.0.qSubNodes.length")),Ao.getOuterDimensionSizeOfMax2Dims(t,_o))?this._scrollHandler.getViewData().finally((function(){return r._updateColorMapData(t).then((function(){return n.call(r)}))})):this._updateColorMapData(t).then((function(){return n.call(r)}))},setSnapshotData:function(e){var t=this;return T(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t._super(e),r.next=3,t.colorService.getSnapshotData();case 3:return n=r.sent,e.snapshotData.content.chartData=A(A({},e.snapshotData.content.chartData),n),e[_o][Po].qStackedDataPages=t.layout[_o][Po].qStackedDataPages,Oo.toBefore(e),r.abrupt("return",e);case 8:case"end":return r.stop()}}),r)})))()},getViewState:function(){return{scroll:Math.round(this._scrollHandler.getScrollState())}},getDisclaimerAttributes:function(e){var t=!this.flags.isEnabled("SHOW_DISCLAIMER")||!(!1===e.showDisclaimer),r=!Ao.hasSecondDimension(e,_o)&&e.qHyperCube.qSize.qcy>1e4||Ao.hasSecondDimension(e,_o)&&e.qHyperCube.qSize.qcy>3e3,n=t&&r,i=Fo(e,this._scrollHandler.getScrollViewSizeInItem());return{data:e&&e.qUndoExclude,supportedDisclaimers:{LimitedData:t&&n},options:{paddingBottom:n&&i&&i.viewSize<i.max,supportNegative:!0,explicitLimitedData:n}}},_updateColorMapData:function(e){var t=this;return T(regeneratorRuntime.mark((function r(){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t.colorService=jo({layout:e,localeInfo:t.localeInfo,model:t.backendApi.model,picasso:t.picasso,environment:t.environment}),r.next=3,t.colorService.initialize();case 3:n=t.colorService.getSettings().field,i=t.chartInstance.brush("select-color"),/qAttrDimInfo/.test(n)&&i.addKeyAlias("attrDim/qDimensionInfo/0","".concat(_o,"/").concat(Po,"/").concat(n));case 6:case"end":return r.stop()}}),r)})))()},_createColorLegendCube:function(e){var t=Ao.hasSecondDimension(this.layout,_o)?1:0;return{qDimensionInfo:[this.layout[_o][Po].qDimensionInfo[t].qAttrDimInfo[0]],qMeasureInfo:[],qDataPages:e,qMode:"S",qSize:{qcx:1,qcy:e[0].qMatrix.length}}},_updateColorData:function(){return this._updateColorMapData(this.layout)},updateDerivedProperties:function(e,t){var r=this.environment,n=r.app,i=r.translator,o=this,a=o.backendApi.model;return o._derivedProperties.addDefaultHyperCubeHash(e.qHyperCubeDef,t.qHyperCube,n,function(e){return{cube:e[Ro],sorting:e.sorting,color:{point:e.color.point}}}(e)).then((function(r){var s={layout:t,properties:e,model:a,hashData:r,generateDerivedProperties:function(e,t){return To.generateHyperCube(e,t,n,i)}};return o._derivedProperties.updateDerivedProperties(s)}))},updateData:function(e){var t=this,r=!!e.snapshotData;return t._super(e).then((function(){if(t._destroyed)return Promise.reject();if(e=t.layout,t._scrollHandler.setOptions({direction:"horizontal"===e.orientation?"vertical":"horizontal"}),r)return Oo.toAfter(e),t._updateColorMapData(e);t.updateScrollHandlerState(!0);var n=t.environment.options.viewState;return n?(t._scrollHandler.updateViewState(Ho(e)),t._scrollHandler.setScrollState(n.scroll)):(t._scrollHandler.resetScroll(),zo.call(t)),t._scrollHandler.getScrollViewSizeInItem()&&!t._cacheSizeInitialized&&(Bo.call(t),t._cacheSizeInitialized=!0),(Ao.hasSecondDimension(e,_o)?t.getSlicedData(t._scrollHandler.getScrollState(),t._scrollHandler.getScrollViewSizeInItem()):t.getData(t.backendApi,e[_o][Po],{height:e[_o][Po].qSize.qcy||1})).then((function(){return t._destroyed?Promise.reject():t._updateColorData()}))}))},isLassoDisabled:function(){var e=this.layout;return!!(e.qHyperCube.qDimensionInfo&&e.qHyperCube.qDimensionInfo.length>1&&Uo(e,0))}}),Ko={enabled:!0,delay:50};function Yo(){var e={};return e.promise=new Promise((function(t,r){e.resolve=t,e.reject=r})),e}var Go=function(){function e(t){var r=t.onSend;k(this,e),this.options={},this.ongoingRequests=[],this.queuedRequests=[],this.recentRequests=[],this.resolvedRequests=[],this._debounceTimer=null,this._latestResolvedRequestedAt=-1,this.onSend=r,this.setOptions({})}return j(e,[{key:"destroy",value:function(){this.clear(),this.recentRequests=[],this.resolvedRequests=[],this.onSend=null,this.onCancel=null}},{key:"setOptions",value:function(e){this.options=M(!0,{},Ko,this.options,e),this.enabled=this.options.enabled||!1,this.delay=this.options.delay||-1}},{key:"clear",value:function(){for(clearTimeout(this._debounceTimer);this.queuedRequests.length;)this.queuedRequests.pop().dfd.reject();for(;this.ongoingRequests.length;)this.ongoingRequests.pop().dfd.reject()}},{key:"queue",value:function(e){var t=this.enabled?this.delay:-1,r=Date.now(),n={data:e,dfd:Yo(),wrapper:Yo(),requestedAt:r},i=Math.max(this._getAvgResolutionTime(),t),o=t<1,a=this.recentRequests.length<1,s=a||r-this.recentRequests.slice(-1)[0].requestedAt>i,u=r>this._latestResolvedRequestedAt+t;return o||a||s||u?Xo.apply(this,[n,0]):Xo.apply(this,[n,Math.min(t,1e3)]),this.recentRequests.push(n),this.recentRequests.length>10&&(this.recentRequests=this.recentRequests.slice(-10)),n.dfd.promise}},{key:"updateResolutionTime",value:function(){this._latestResolvedRequestedAt=Date.now()}},{key:"_getAvgResolutionTime",value:function(){var e;return this.resolvedRequests.length&&(e=0,this.resolvedRequests.forEach((function(t){e+=t.respondedAt-t.sentAt})),e/=this.resolvedRequests.length),e}}]),e}();function Xo(e,t){var r=this;this.queuedRequests.push(e),clearTimeout(this._debounceTimer),t>=10?this._debounceTimer=setTimeout((function(){$o.call(r)}),t):$o.call(r)}function $o(){if(this.ongoingRequests.length)this.waitingForResponse=!0;else{var e=this.queuedRequests.pop();for(e&&Jo.call(this,e);this.queuedRequests.length;)(e=this.queuedRequests.shift()).dfd.reject()}}function Jo(e){this.waitingForResponse=!1,this.ongoingRequests.push(e);var t=this,r=e.wrapper;e.sentAt=Date.now(),r.promise.then((function(){var r;(t.ongoingRequests.splice(t.ongoingRequests.indexOf(e),1),e.respondedAt=Date.now(),t.resolvedRequests.push({sentAt:e.sentAt,respondedAt:e.respondedAt,requestedAt:e.requestedAt}),t.resolvedRequests.length>10&&(t.resolvedRequests=t.resolvedRequests.slice(-10)),e.requestedAt>t._latestResolvedRequestedAt)?(r=e.dfd).resolve.apply(r,arguments):e.dfd.reject();t._latestResolvedRequestedAt=e.requestedAt}),(function(){var r;t.ongoingRequests.splice(t.ongoingRequests.indexOf(e),1),e.respondedAt=Date.now(),(r=e.dfd).reject.apply(r,arguments)})).finally((function(){t.waitingForResponse&&$o.call(t)})),this.onSend(e.data,r)}var Zo=new Xt(0,0,0,0),Qo=new Xt(0,0,0,0),ea=function(){function e(){k(this,e),this.pages=[]}return j(e,[{key:"get",value:function(e){var t=this;return e.map((function(e){return t.getPage(e)}))}},{key:"getPage",value:function(e){for(var t=[],r=0;r<this.pages.length;r++){var n=this.pages[r].qArea;Zo.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Qo.set(n.qLeft,n.qTop,n.qWidth,n.qHeight);var i=Qo.intersection(Zo,!0);if(t.push({coverage:i?i.clone():new Xt(0,0,0,0),idx:r}),n.qLeft<=e.qLeft&&n.qLeft+n.qWidth>=e.qLeft+e.qWidth&&n.qTop<=e.qTop&&n.qTop+n.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[r])}return t.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),t[0].coverage.height>0&&t[0].coverage.width>0?this._extract(e,this.pages[t[0].idx]):{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qData:[]}}},{key:"destroy",value:function(){this.clear()}},{key:"isEmpty",value:function(){return!(this.pages&&this.pages[0]&&this.pages[0].qArea.qHeight&&this.pages[0].qArea.qWidth)}},{key:"clear",value:function(){this.pages=[]}},{key:"store",value:function(e){this.pages=e}},{key:"containsArea",value:function(e){for(var t=0;t<this.pages.length;t++){var r=this.pages[t].qArea;if(r.qLeft<=e.qLeft&&r.qLeft+r.qWidth>=e.qLeft+e.qWidth&&r.qTop<=e.qTop&&r.qTop+r.qHeight>=e.qTop+e.qHeight)return!0}return!1}},{key:"contains",value:function(e){var t=this;return!(!this.pages||!this.pages.length)&&0===e.filter((function(e){return!t.containsArea(e)})).length}},{key:"_extract",value:function(e,t){Zo.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Qo.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var r=Zo.intersection(Qo,!0);if(!r)return{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qData:[]};var n=Math.max(0,e.qTop-t.qArea.qTop),i=t.qData[0],o=i.qSubNodes,a={};for(var s in i)i.hasOwnProperty(s)&&(a[s]="qSubNodes"===s?o.slice(n,n+r.height):i[s]);return a.qUp+=n,a.qDown+=t.qArea.qHeight-r.height-n,{qArea:{qTop:r.y,qLeft:r.x,qWidth:r.width,qHeight:r.height},qData:[a]}}}]),e}(),ta={mode:"S",enabled:!0,debouncing:{enabled:!0,delay:50},height:250,width:250,maxTotalArea:1e4},ra=Gt.extend("CacheCube",{init:function(e,t,r,n){var i=this;this.model=e,this.responseProperty=t,this.options={},this.cubeHeight=0,this.cubeWidth=0,this.setOptions(n||{}),this.setPath(r),"K"===this.options.mode?this.cube=new ea:"P"===this.options.mode?this.cube=new or:this.cube=new Qt,this.throttle=new Go({onSend:function(e,t){var r=i._getDirections(i.throttle.recentRequests.map((function(e){return{top:e.data[0].qTop,left:e.data[0].qLeft}}))),n=i._getAreasToCache(e,r.vertical,r.horizontal);i.cacheData(n,e).then((function(e){i.cube?t.resolve(e):t.reject()}),(function(){t.reject()}))}}),this._modelBinding=function(){i.clear()},this.model.on("changed",this._modelBinding)},destroy:function(){this.cube.destroy(),this.throttle.destroy(),this.model&&this.model.removeListener&&this.model.removeListener("changed",this._modelBinding),this._modelBinding=null,delete this.model,delete this.throttle,delete this.cube},setMethodName:function(e){this.method=e},setPath:function(e){this.path=e},setCubeSize:function(e){this.cubeHeight=e.qcy,this.cubeWidth=e.qcx},setOptions:function(e){e&&(this.options=M(!0,{},ta,this.options,e),this.cacheHeight=this.options.height,this.cacheWidth=this.options.width,this.enabled=this.options.enabled||!1,this.debouncing={enabled:this.options.debouncing.enabled||!1,delay:this.options.debouncing.delay||-1})},clear:function(){this.cube&&this.cube.clear(),this.throttle&&this.throttle.clear()},set:function(e){this.clear(),e&&e.length&&this.cube.store(e)},cacheData:function(e,t){var r=function(e){return this.cube?(this.cube.store(e),this.cube.get(t)):e};return"getHyperCubeStackData"===this.method&&this.options.maxStackedValues?this.model[this.method](this.path,e,this.options.maxStackedValues).then(r.bind(this)):this.model[this.method](this.path,e).then(r.bind(this))},getData:function(e){if(!this.model)return Promise.reject();if(!this.enabled||!this.cubeHeight||!this.cubeWidth)return"getHyperCubeStackData"===this.method&&this.options.maxStackedValues?this.model[this.method](this.path,e,this.options.maxStackedValues):this.model[this.method](this.path,e);var t,r,n=[];for(t=0;t<e.length;++t)r=e[t],n.push({qTop:Math.max(Math.floor(r.qTop),0),qLeft:Math.max(r.qLeft,0),qHeight:Math.min(r.qHeight,this.cubeHeight-Math.floor(r.qTop)),qWidth:Math.min(r.qWidth,this.cubeWidth-r.qLeft)});return this.cube.contains(n)?(this.throttle.updateResolutionTime(),Promise.resolve(this.cube.get(n))):0===n[0].qTop&&this.cube.isEmpty()&&this.throttle.ongoingRequests.length+this.throttle.queuedRequests.length===0?(this.throttle.updateResolutionTime(),this.cacheData(n,n)):this.throttle.queue(n)},_getDirections:function(e){if(!e||e.length<2)return{vertical:0,horizontal:0};var t=e.slice(-2),r=t[1].top-t[0].top,n=t[1].left-t[0].left;return{vertical:r<0?-1:r>0?1:0,horizontal:n<0?-1:n>0?1:0}},_getAreasToCache:function(e,t,r){var n,i,o,a,s,u,l,c,p,d=[],f=this.cacheHeight;for(void 0===t&&(t=0),void 0===r&&(r=0),this.cacheHeight*this.cacheWidth*e.length>this.options.maxTotalArea&&(f=Math.floor(this.options.maxTotalArea/(e.length*this.cacheWidth))),n=0;n<e.length;++n)a=(i=0!==t?Math.floor(.5*Math.max(0,f-e[n].qHeight)):0)*t-i,s=(o=0!==r?Math.floor(.5*Math.max(0,this.cacheWidth-e[n].qWidth)):0)*r-o,u=0!==t?Math.max(0,Math.min(Math.max(e[n].qHeight,f),this.cubeHeight)):e[n].qHeight,l=0!==r?Math.max(0,Math.min(Math.max(e[n].qWidth,this.cacheWidth),this.cubeWidth)):e[n].qWidth,c=Math.max(0,Math.min(e[n].qTop+a,this.cubeHeight-u)),p=Math.max(0,Math.min(e[n].qLeft+s,this.cubeWidth-l)),d.push({qTop:c,qHeight:u,qLeft:p,qWidth:l});return d}}),na=Nr.DATA_PATH,ia=Nr.HYPERCUBE_DEF_PATH,oa=function(){function e(t){k(this,e),this.model=t,this.path="/".concat(na,"/").concat(ia),this.cacheCube=new ra(t,"qDataPages",this.path,{mode:"K"}),this.cacheCube.setMethodName("getHyperCubeStackData"),this.cacheCube.setOptions({maxStackedValues:Nr.MAX_STACKED_VALUES})}return j(e,[{key:"setPath",value:function(e){this.path=e}},{key:"setCacheOptions",value:function(e){this.cacheCube.setOptions(e)}},{key:"updateCache",value:function(e){var t,r;"qHyperCube"===this.dataPath?t=e&&e.qHyperCube:(r=this.dataPath.slice(0,this.dataPath.indexOf("qHyperCube")-1),t=e&&e[r]&&e[r].qHyperCube),e.qSelectionInfo.qInSelections||this.cacheCube.setCubeSize({qcx:t.qSize.qcx,qcy:Ao.getStackedCubeSizeOfMax2Dims(e,r)}),this.backendStackThrottle.clear()}},{key:"getData",value:function(e,t){var r=this.cacheCube;return t?this.model.getHyperCubeData(t,e):this.cacheCube.getData(e).then((function(e){return e[0]&&e[0].qData[0]&&e[0].qData[0].qSubNodes.some((function(e){return e.qDown>0}))&&r.clear(),e}))}}]),e}();function aa(M){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(F).forEach((function(t){e.add(F[t])}))}}(M.translator);var I=function(){var e=D();return e.renderer.prio(["canvas"]),e.use(S),e.use(C(E)),e.use(B),e.component("disclaimer",V),e}();return{qae:xr(M),ext:On(M),component:function(){var D,S,C,E,A,w,O=g(),k=(D=u(),S=l(),C=c(),E=a(),A=p(),w=d(),f((function(){return{app:D,appLayout:S,deviceType:C,options:E,theme:A,translator:w}}),[D,S,E.direction,E.freeResize,w.language(),A.name(),C])),L=y(),j=b(),_=v(),R=e(),N=function(){var o=e(),a=P(t(!1),2),s=a[0],u=a[1],l=P(t(!1),2),c=l[0],p=l[1],d=!!r().qSelectionInfo.qInSelections,f=P(t((function(){return{toggle:function(){p((function(e){return!e}))}}})),1)[0];return n((function(){o&&u(!o.select&&!o.active)}),[o]),i((function(){return{key:"lasso",label:"Lasso",icon:z,hidden:!s||!d,active:c,action:function(){p((function(e){return!e}))}}}),[d,c,s]),f.enabled=function(){return s},f.active=function(){return c},f}(),H=q(),F=P(t(),2),B=F[0],V=F[1];n((function(){var e=x(O),t=function(e,t){return t.snapshotData?new sr(t,"qUndoExclude.qHyperCube","qStackedDataPages"):new oa(e)}(_,j),r=L,n=new Wo({environment:k,lasso:N,flags:M.flags,picasso:I,$element:e,backendApi:t,selectionsApi:r});return V(n),function(){n.destroy()}}),[]);var U,W=P(s(T(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(B){e.next=2;break}return e.abrupt("return");case 2:if(B.updateEnvironment(k),B.updateConstraints(R),!!j.snapshotData){e.next=16;break}return e.next=8,_.getEffectiveProperties();case 8:return t=e.sent,e.next=11,B.updateDerivedProperties(t,j);case 11:if(!e.sent){e.next=15;break}return H.pending(),e.abrupt("return");case 15:H.restore();case 16:return e.next=18,B.updateData(j);case 18:return e.next=20,B.paint();case 20:case"end":return e.stop()}}),e)}))),[j,B,k]),2)[1];if(W)throw W;!function(t){var r=o(),n=a(),i=e(),u=P(s(T(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return t.updateConstraints(i),t.options=n,e.next=6,t.resize();case 6:case"end":return e.stop()}}),e)}))),[r.width,r.height]),2)[1];if(u)throw u}(B),U=B,m((function(e){if(U)return U.setSnapshotData(e)})),h((function(){return{getViewState:function(){if(U)return U.getViewState()}}}),[U])}}}export{aa as default};
11
+ !function(t,n){e.exports=n()}(0,(function(){return function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),q=g>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,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=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-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+q}}))}));function Ae(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Ie={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"},we=/%$/,Oe=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Te=/^\(oct\)/i,ke=/^\(dec\)/i,Le=/^\(hex\)/i,_e=/^\(bin\)/i,Pe=/^\(rom\)/i,Re=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Ne=/#|0/g;function He(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 Fe(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}function Be(e,t,n){var r;return Oe.test(t)?e=He(e,Number(/\d{2}/.exec(t)[0]),t,n):Te.test(t)?e=He(e,8,t,n):ke.test(t)?e=He(e,10,t,n):Le.test(t)?e=He(e,16,t,n):_e.test(t)?e=He(e,2,t,n):Pe.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=Fe(e,t)):t+r+e.toExponential(0)),e}function je(e,t,n){var r=Ae(e);return n?r:new RegExp(r||"",t)}function ze(e,t){return t&&(t=Ae(t)),e&&(e=Ae(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function Ve(e,t){if(!e||!e.qNumericalAbbreviation)return Ie;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}function Ue(e,t,n){var r,i,o,a,s,l,u,c,p,d=e.pattern;d.indexOf("A")>=0&&(d=d.replace("A",""),e.abbreviate=!0),p=ze(t,n),a=(o=(o=d.match(p))?o[0]:"")?d.substr(0,d.indexOf(o)):d,s=o?d.substring(d.indexOf(o)+o.length):"",o||(o=d?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(je(l,"g"),t)),u=n,n=".",u&&(o=o.replace(je(u,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var f,m=d.split(u);m[1]&&(f=m[1].match(Ne)),e.prefix=a||"",e.postfix=s||"",e.pattern=d,e.maxPrecision=f?f.length:2,e.percentage=we.test(d),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(je(t,null,!0),"|").concat(je(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var We=function(){function e(t,n,i,o,a){r(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=i||",",this.decimalDelimiter=o||".",this.type=a||"numeric",this.patternSeparator=";",this.abbreviations=Ve(t,this.patternSeparator),this.prepare()}return o(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],Re.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Re.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Re.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Ue(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Ue(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Ue(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,p="",d="",f=e;if(isNaN(e))return"".concat(f);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=Be(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&&(p=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=Me(b+=o,v)||"0",u){var q=Math.max(0,Math.min(14,u.length)),x=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%1).toFixed(q).slice(2).replace(/0+$/,"");for(s=D.length;s<x;s++)D+="0";D&&(e+=o+D)}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)/,""),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(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=Me(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+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(We,t)}function Ye(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),p=Object.create(null),d=0,f=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 d>=o&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[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),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function Ge(e,t,n,r,i){var o=Ke(i,e,t,n,r),a=Ye(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 Xe={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},$e=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Je=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ze=["January","February","March","April","May","June","July","August","September","October","November","December"],Qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],et=86400;function tt(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function nt(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}function rt(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function it(e){var t=e,n=24*rt(t),r=60*rt(n),i=60*rt(r),o=1e3*rt(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}function ot(e,t){var n,r=it(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(et*(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}}function at(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:tt("".concat(t.year).slice(-2),2),YYY:tt("".concat(t.year).slice(-3),3),def:function(e){return tt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:tt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:tt("".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 tt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return tt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return tt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return tt("".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=n.slice(0,e.length)}}}}var st=function(){function e(t,n,i){r(this,e);var o,s=t||{};s.qCalendarStrings||(s.qCalendarStrings={qLongDayNames:$e,qDayNames:Je,qLongMonthNames:Ze,qMonthNames:Qe}),this.localeInfo=s,this.locale_days=s.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=s.qCalendarStrings.qDayNames.slice(),this.locale_months=s.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=s.qCalendarStrings.qMonthNames.slice(),n||(n=(a(o={},Xe.TIME,s.qTimeFmt||"hh:mm:ss"),a(o,Xe.DATE,s.qDateFmt||"YYYY-MM-DD"),a(o,Xe.DATE_TIME,s.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[i]),this.pattern=n}return o(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=/t+/gi.test(t);e instanceof Date?n=nt(e,r):(e<0&&(e=-e,t="-".concat(t)),n=ot(e,t));var i=at(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(st,t)}var ut=864e5;function ct(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(ut*(e-Math.floor(e)))))}function pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=lt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),i=Ye(r.format.bind(r),{toKey:function(e){return"object"===n(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Xe.INTERVAL?ct(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(o){return r=lt(o,e,t),i=Ye(r.format.bind(r),{toKey:function(e){return"object"===n(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function dt(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return pt(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"),Ge(n,r,i,o,t)}function ft(){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}),p=function(e){return e.qText||""},d="dimension"===l?"first":"avg",f=dt(n,o),m={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(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:p,reduce:d,reduceLabel:"dimension"===l?"first":function(e,t){return f(t)},formatter:function(){return f},tags:function(){return n.qTags}};return m}function mt(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:ft(I({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=mt("qAttrDimInfo",t,n,a,I({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=mt("qAttrExprInfo",t,n,a,I({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=mt("qMeasureInfo",t,n,a,I({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ht(){var e,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.key,a=i.data,s=i.config,l=void 0===s?{}:s,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=a;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var d=ht.util,f={cache:u,cube:c,localeInfo:l.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:l.virtualFields},m={key:function(){return o},raw:function(){return c},field:function(e){return ue(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,m,u,d)},hierarchy:function(e){return f.hierarchy(e,m,u,d)},_cache:function(){return u}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(f.extractor=Ce,f.hierarchy=Se,f.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(f.extractor=L,f.pages=c.qDataPages,f.hierarchy=Se):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},m,u,d)};var h="S"===c.qMode?function(e){return e.qElemNumber}:void 0,g="S"===c.qMode?function(e){return e.qNum}:void 0;return(e=u.wrappedFields).push.apply(e,p(mt("qDimensionInfo",c,o,"",I({},f,{value:h,type:"dimension"})))),(n=u.wrappedFields).push.apply(n,p(mt("qMeasureInfo",c,o,"",I({},f,{value:g,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance})),function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))}(u.wrappedFields),(l.virtualFields||[]).forEach((function(e){var n=m.field(e.from),r=ft(t({meta:n.raw(),id:"".concat(o,"/").concat(e.key),sourceField:n,fieldExtractor:function(e){return f.extractor({field:e},m,u,d)},key:e.key,type:n.type(),localeInfo:f.localeInfo,value:n.value},e.override||{}));u.virtualFields.push(r)})),(r=u.allFields).push.apply(r,p(u.virtualFields)),m}var gt=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],yt=/\/qDimensionInfo(?:\/(\d+))?/,vt=/\/qMeasureInfo\/(\d+)/,bt=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,qt=/\/qAttrExprInfo\/(\d+)/,xt=/\/?qHyperCube/,Dt=/\/?qTreeData/,St=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Ct=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Et(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};xt.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=St):Dt.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Ct);var s=!0;if(yt.test(e)&&(r=+yt.exec(e)[1]),vt.test(e)&&(i=+vt.exec(e)[1]),bt.test(e)){i=-1,r=0;var l=+bt.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(qt.test(e)){var u=i;if(t){i=0;var p=ae(o,t);i+=(p.qMeasureInfo||[]).length,r>-1?(i=p.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=p.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=p.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+qt.exec(n)[1]}else r>-1?(r=-1,i=+qt.exec(n)[1]):i+=+qt.exec(n)[1]+1}return gt.forEach((function(e){var t=c(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 Mt(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=Et(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 p=r.qHyperCube,d=p.qNoOfLeftDims,f=p.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===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):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 At(e){ht.util=e.data("matrix").util,e.data("q",ht),e.formatter("q-number",Ge),e.formatter("q-time",pt)}return At.qBrushHelper=Mt,At.selections=Mt,At}(),ki={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){var n=e.brushes().filter((function(e){return"value"===e.type})),r=[];n.length&&n.forEach((function(e){r=r.concat(e.brush.values().map((function(t){return{key:e.id,value:t}})))}));return r.concat(t)},filterValues:function(e,t){var n,r,i=this,o=[],a=0,s=[];return t.forEach((function(t){t.value!==i.DIM_VALUE_NULL&&t.value!==i.DIM_VALUE_TOTAL&&(r=function(e,t){var n=t.key.indexOf("qHyperCube")+"qHyperCube".length,r=t.key.substr(0,n),i=t.key.substr(n+1);return e.dataset(r).field(i)}(e,t),(n=r&&r.raw()).qLocked?(o.push(n),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};var Li={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function _i(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");var t=e.chartInstance,n=e.selectionsApi,r=e.dataPaths||[""],i=e.selectPaths,o=e.lasso,a=[],s={propertiesToRestore:{}},l=!1,u=function(e,t,n){function r(){}return r.update=function(e,r,i){t.isActive()||t.begin(n),Ti.qBrushHelper(i).forEach((function(e){t.select(e)}))},r.toggleValues=function(r,i,o){var a=ki.brushInterceptors.filterValues(e,r),s=a.items;return t.isActive()||a.itemsAreLocked||!(o||s.length>0)||(t.begin(n),i.start(),i.emit("update",[],[])),s},r}(t,n,i),c={},p=!1;function d(e){16===e.keyCode&&e.shiftKey!==p&&(p=e.shiftKey,o.toggle())}function f(e){var t=e.keyCode;27===t?n.cancel():13===t&&n.confirm()}function m(){a.forEach((function(e){e.listeners.update=function(t,n){e.sleep||u.update(t,n,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function h(){a.forEach((function(e){e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return n.on("cleared",(function(){a.forEach((function(e){e.brush.clear(),e.dependentComponents.forEach((function(e){var n=t.component(e.id);n&&n.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();var t=this.setUpBrush(e);return l&&m(),t},c.setUpBrush=function(e){var n=M(!0,{},Li,e),i={on:"tap",action:function(t){return t.ctrlKey||e.isSingleSelect?"set":"toggle"},contexts:n.contexts,data:n.data,globalPropagation:"stop"},o={context:n.contexts[0],data:n.data,style:n.style},s=function(e,t){return{brush:t.brush(e.contexts[0]),listeners:{},dependentComponents:[],id:e.contexts[0]}}(n,t);return s.listeners.toggle=function(e){if(!l)return[];var i=function(){var e=[],n=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))}));n=[].concat.apply([],n);for(var i=0;i<n.length;i++)n[i].raw().qLocked&&e.push(n[i].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===n.length}}();return n.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:u.toggleValues(e,s.brush,n.startOnEmptySelection)},s.brush.intercept("toggle-values",s.listeners.toggle),s.brush.intercept("add-values",s.listeners.toggle),s.brush.intercept("remove-values",s.listeners.toggle),s.brush.intercept("set-values",s.listeners.toggle),s.listeners.start=function(){a.length>1&&a.forEach((function(e){e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){l&&m()},c.tearDown=function(){l&&h(),a.forEach((function(e){e.brush.removeInterceptor("toggle-values",e.listeners.toggle),e.brush.removeInterceptor("add-values",e.listeners.toggle),e.brush.removeInterceptor("remove-values",e.listeners.toggle),e.brush.removeInterceptor("set-values",e.listeners.toggle)})),a=[]},c.pauseEngineCalls=function(e){a.forEach((function(t){t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((function(n){n.id===e&&(n.sleep=!1,t&&n.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((function(n){n.id===e&&n.dependentComponents.push(t)}))},c.on=function(){if(!l){l=!0,m(),document.addEventListener("keydown",d),document.addEventListener("keyup",d);var e=function(){a.forEach((function(e){e.brush.end()})),document.removeEventListener("keyup",f),o.active()&&o.toggle()};n.on("deactivated",e),s.unbindDeactivated=function(){n.removeListener("deactivated",e)};var t=function(){document.addEventListener("keyup",f)};n.on("activated",t),s.unbindActivated=function(){n.removeListener("activated",t)}}},c.isOn=function(){return l},c.off=function(){l&&(l=!1,h(),document.removeEventListener("keydown",d),document.removeEventListener("keyup",d),document.removeEventListener("keyup",f),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return e=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))})),(e=[].concat.apply([],e)).length&&e.every((function(e){return e.raw().qLocked}));var e},c}var Pi=function(){function e(){k(this,e)}return _(e,[{key:"isOn",value:function(){return!1}},{key:"on",value:function(){console.warn("Can not turn on selections on this object")}},{key:"off",value:function(){}}]),e}(),Ri=function(e){return e.selectionsApi?_i(e):new Pi};var Ni={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return-1!==t.indexOf(e.settings.key)}))[0]},isOnComponentForLasso:function(e,t,n){return e&&n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return e.settings.key===t.keys.componentKey}))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((function(e){return e.settings.key===t}))}};var Hi={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:E.DIRECTION_ALL,threshold:1,enable:function(r,i){if(e.lassoing)return t.isSelectionEnabled();var o,a=Ni.isOnComponentForLasso(i,n,this);return t.isSelectionEnabled()&&i&&((o=n.handlers).selectionHandler.lassoState()&&!o.selectionHandler.allFieldsLocked()||e.lassoing)&&a},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart:function(r){Ni.isOnComponentForLasso(r,n,this)&&(t.switchTo("lasso",this.chart,r),e.lassoing=!0,n.handlers.selectionHandler.pauseEngineCalls(n.keys.lassoBrushKey),r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",r))},lassomove:function(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend:function(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel:function(r){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var Fi={callMeasureRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?E.DIRECTION_HORIZONTAL:E.DIRECTION_VERTICAL,event:"measurerange",enable:function(i,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();var a="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ni.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart:function(i){var o="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ni.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.measureRangeBrushKey))},measurerangemove:function(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend:function(r){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",r),e.measureSelecting=!1)},measurerangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Bi(e,t){return"x-axis"===e?"horizontal"===t?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL:"horizontal"===t?E.DIRECTION_HORIZONTAL:E.DIRECTION_VERTICAL}var ji={callAreaRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Bi(r,n.isHorizontal),event:"arearange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();var a="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ni.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart:function(i){var o="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ni.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.areaBrushKey))},arearangemove:function(r){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",r))},arearangeend:function(r){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",r),e.minoring=!1)},arearangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var zi={callDimensionRangeGesture:function(e,t,n,r){var i=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL,event:"majorrange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();var a="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ni.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart:function(i){var o="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ni.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.dimRangeBrushKey))},majorrangemove:function(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend:function(r){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",r),e.majoring=!1)},majorrangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Vi={callDragGesture:function(e,t,n,r,i){var o={};return{type:"Pan",options:{direction:n.isHorizontal?E.DIRECTION_VERTICAL:E.DIRECTION_HORIZONTAL,event:"drag",enable:function(r,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return e.settings.key===n.keys.componentKey}))[0],e.dragging)}},requireFailure:r?"lasso ".concat(t.getBrushConfig()):"",events:{dragstart:function(e){o={x:e.deltaX,y:e.deltaY};var t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove:function(t){if(e.dragging){var r=-(n.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(r=-r),n.handlers.scrollHandler.getScrollApi().move(r),o={x:t.deltaX,y:t.deltaY}}},dragend:function(){e.dragging&&(e.dragging=!1)},dragcancel:function(){e.dragging=!1}}}}};var Ui={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable:function(n,r){return!(!r||!e())&&Ni.isOnComponentForNavBtn(r,t,this)}},events:{navBtnTap:function(e){this.chart.componentsFromPoint(e.center).forEach((function(t){var n=e.target,r=n?n.getAttribute("data-action"):"";if(r)return t.emit(r)}))}}}}};var Wi={create:function(e,t,n,r,i){var o={};t=t||"vertical";var a=r.lassoBrushKey||"select",s=r.dimRangeBrushKey||null,l=r.measureRangeBrushKey||null,u=r.areaBrushKey||null,c=r.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},m="horizontal"===t,h=m?"y-axis":"x-axis",g=m?"x-axis":"y-axis";function y(e,t,n){if(f.gesture!==e){var r=a,i=t||f.chart;switch(f.gesture){case"majorrange":v(i,"rangeDim","rangeClear",n),r=s;break;case"measurerange":v(i,"rangeMeasure","rangeClear",n),r=l;break;case"arearange":v(i,"rangeMinor","areaClear",n),r=u}f.gesture=e;var o="range"===e?"range":"item";f.type&&f.type!==o&&i.brush(r).clear(),f.chart=t,f.type=o}}function v(e,t,n,r){if(e){var i=e.component(t);i&&i.emit(n,r)}}var b=[],q={isSelectionEnabled:function(){return e.selectionHandler&&e.selectionHandler.isOn()},isNavigationEnabled:function(){return e.scrollHandler&&e.scrollHandler.isOn()},doEmit:v,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},x={handlers:e,keys:r,isHorizontal:m,active:f,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&((b=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap:function(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}]).unshift(Ui.callNavBtnGesture(q.isNavigationEnabled,c)),b.push(Hi.callLassoGesture(d,q,x)),s?l?(b.push(zi.callDimensionRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(Fi.callMeasureRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(b.push(zi.callDimensionRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(ji.callAreaRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(b.push(Fi.callMeasureRangeGesture(d,q,x,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),b.push(ji.callAreaRangeGesture(d,q,x,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(b.push(Vi.callDragGesture(d,q,x,p,n)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=b,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function Ki(e,t,n,r,i){var o=!1;r=r||"tooltip",n=n||["self"];var a=e.brush(r),s={};function l(){o&&e.component(i).emit("hide");o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){var s=a.brushes(),u=e.getAffectedShapes(r,"and",n,t);s.length>=1?(o=!0,function(t){o=!0;var n={nodes:t};e.component(i).emit("show",{},n)}(u)):l()},s.toggleInterceptor=function(e){if(n.length>1){var t={},r=[];return e.forEach((function(e){t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Yi=function(){return Ki.apply(void 0,arguments)},Gi={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);var n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};var Xi=function(e){return function(t){var n=t.h,r=t.data,i=t.style,o=function(e,t){for(var n=e.chartInstance.dataset(e.dataPath),r=[],i=t.length-5,o=Math.min(5,t.length),a=function(i){var o=t[i],a={rows:[]};if(e.labelData){for(var s=[],l=e.labelData,u=!1,c=0;c<l.length;c++){var p=o.data[l[c]].value;if(-2===p.qElemNo||-2===p.qElemNumber){u=!0;break}s.push(o.data[l[c]].value.qText)}if(u)return{v:void 0};a.header=e.headerResolver(s),a.rows=e.measureRows.map((function(t){var r=o.data;return e.rowResolver(n.field(r[t].source.field),r[t],r)})).filter((function(e){return!!e}));var d=function(e,t){var n,r,i,o=t.data.color,a=null===(n=e.colorService)||void 0===n||null===(r=n.getSettings)||void 0===r?void 0:r.call(n);if(!a||"color"===a.type||!o||!a.fieldType)return;var s=[];e.data.forEach((function(e){var n=t.data[e];n&&s.push(n.value)}));var l=function(e){for(var t=-1,n=0;n<e.length;n++)-3===e[n]&&(t=n);return t}(s),u=e.translator,c=a.label,p=null===(i=t.attrs)||void 0===i?void 0:i.fill,d=-1!==l?u.get("properties.dimensionLimits.others"):o.label;return{color:p,label:c,value:d}}(e,o);d&&a.rows.unshift(d),r.push(a)}},s=0;s<o;s++){var l=a(s);if("object"===w(l))return l.v}i>0&&(r.numberInExcess=i);return r.rowCount=r[0]?r.length*r[0].rows.length:0,r}(e,r),a={h:n,style:i,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(a,o)}};var $i="#".concat("dist-flow-tooltip");function Ji(){if(!document.querySelector($i)){var e=document.createElement("div");e.id="dist-flow-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 Zi(e){var t=e.key,n=void 0===t?"tooltip":t,r=e.rtl,i=e.fontFamily,o=e.filter;return{show:!0,key:n,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Ji()},beforeUpdate:function(){Ji()},destroyed:function(){var e;(e=document.querySelector($i))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector($i)},content:e.content,filter:o,extract:function(e){return e.node},direction:r?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:i,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Qi=jr.detectTextDirection;var eo={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:function(e){return e.join(", ")},rowResolver:function(e,t){return{value:Gi.formatMeasureValue(e,t),label:e.title()}},direction:"ltr",renderer:function(e,t){var n=e.h,r=e.style,i=e.translator,o=e.rtl,a=[],s=o?"right":"left";if(t.forEach((function(e){if(e.header){var t=I(I({},r.cell),{},{textAlign:s,fontWeight:"bold",direction:Qi(e.header)});a.push(n("tr",null,n("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((function(e){var t=e.value;if(e.color){var i={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},l=n("div",{style:i});t=o?[e.value,l]:[l,e.value]}var u=o?[":",e.label]:[e.label,":"],c=I(I({},r.cell),{},{textAlign:s,direction:Qi(e.label)}),p=I(I({},r.cell),{},{textAlign:o?"left":"right",direction:Qi(e.value)});a.push(n("tr",null,n("td",{style:c},u),n("td",{style:p},t)))}))})),t.numberInExcess){var l=i.get("Object.ChartTooltip.NMore",t.numberInExcess),u=I(I({},r.cell),{},{textAlign:s,direction:Qi(l)});a.push(n("tr",null,n("td",{style:u,colSpan:2},l)))}return a}};function to(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");var r={},i=!1,o={};function a(e){e.listeners.update=function(t,n){e.action.update(t,n,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(r).forEach((function(e){l(r[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(r).forEach((function(e){r[e].action.closeTooltip()}))}function c(){for(var e in u(),r)r[e].brush.clear()}return o.setUp=function(t){var o=M(!0,{},eo,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");r[o.contexts[0]]&&i&&l(r[o.contexts[0]]);var s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Yi(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);r[o.contexts[0]]=s,i&&a(s);var u,c=Zi({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(n,"tooltip","fontFamily"),filter:(u=s.filterShapes,function(e){return u?u(e):function(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)}),content:Xi(s,o.dataPath)});return o.chartBuilder.getSettings().components.push(c),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((function(e){return{context:e}})),component:c}},o.tearDown=function(){i&&s(),r=[]},o.closeTooltip=u,o.isOn=function(){return i},o.on=function(){i||(i=!0,Object.keys(r).forEach((function(e){a(r[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var no=function(e,t,n){return to(e,t,n)};var ro=".scrollHandler";function io(e,t,n,r,i){if(!e||!t||!n)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=n,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=r,this._legendKey=i}function oo(){var e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function ao(e){var t,n,r,i,o=(t=e.originalEvent,n=0,r=0,i=0,t.wheelDelta&&(n=t.wheelDelta/60),t.detail&&(n=-t.detail/3),i=n,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(i=0,r=-1*n),void 0!==t.wheelDeltaY&&(i=t.wheelDeltaY/60),void 0!==t.wheelDeltaX&&(r=-1*t.wheelDeltaX/60),{delta:n,deltaX:r,deltaY:i,x:t.pageX,y:t.pageY});if(!function(e,t,n,r){return!(!r||!n.componentsFromPoint(t).some((function(e){return e.settings.key===r}))||(n.component(r).emit(t.delta>0?"prev":"next"),e.preventDefault(),0))}(e,o,this._chartInstance,this._legendKey)&&!this._disabled&&this.getScrollApi()&&(e.preventDefault(),o.delta)){var a=o.delta<0?3:-3;this._scrollApi.move(a)}}function so(){if(this._disabled||this._sizeChanged)this._sizeChanged=!1;else{var e=this;this.getViewData().then((function(t){e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((function(e){}))}}io.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},io.prototype.setDisabled=function(e){this._disabled=e},io.prototype.getDisabled=function(){return this._disabled},io.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,oo.call(this))},io.prototype.getItemSize=function(){return this._itemSize},io.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||oo.call(this);return this._scrollViewSizeInItem},io.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",so.bind(this)));this._$chartElement.on("mousewheel".concat(ro," DOMMouseScroll").concat(ro),ao.bind(this)),this._$chartElement.on("touchstart".concat(ro),(function(e){e.preventDefault()})),this._on=!0},io.prototype.isOn=function(){return this._on},io.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(ro),this._on=!1},io.prototype.updateViewState=function(e){oo.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},io.prototype.onResize=function(){this._sizeChanged=!0,oo.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},io.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},io.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},io.prototype.getViewData=function(){var e=0,t=0;if(this.getScrollApi()){var n=this._scrollApi.getState();e=Math.round(n.start),t=n.viewSize}return this._getSlicedDataFn(e,t)},io.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},io.prototype.getScrollState=function(){return this.getScrollApi().getState().start},io.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};function lo(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11}function uo(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}}function co(e,t){var n={latin:0,cjk:0};void 0===t?e.forEach((function(e){var t=uo(e.qText);n.latin+=t.latin,n.cjk+=t.cjk})):e.forEach((function(e){var r=uo(e[t].qText);n.latin+=r.latin,n.cjk+=r.cjk}));var r=Math.max(1,n.latin+n.cjk);return n.latinRatio=n.latin/r,n.cjkRatio=n.cjk/r,n}function po(e,t,n){return e*(e<=24?t:n)}var fo={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:lo,getCharacterRatios:uo,getTotalCharacterRatios:co,getAdjustedMaxGlyphCount:function(e,t,n){var r=co(t,n),i=r.latinRatio*e,o=r.cjkRatio*e;return Math.ceil(lo(i)+1.0909090909090908*o)},estimateLatinLabelWidth:po,estimateLabelWidth:function(e,t,n,r,i){return e*n+po(t,r,i)}},mo={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},ho=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,go=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,yo=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,vo=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,bo=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,qo=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,xo=Math.floor,Do=Math.round,So=Gt.extend({init:function(){var e,t,n,r,i,o,a,s,l,u,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof So)d=arguments[0]._r,f=arguments[0]._g,m=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p=arguments[0]))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),f=parseInt(c[2],16),m=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),f=parseInt(c[2]+c[2],16),m=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a)){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Do(255*d),f=Do(255*f),m=Do(255*m),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),h=parseFloat(c[7]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a)){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Do(255*d),f=Do(255*f),m=Do(255*m)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(i=(i/=100)<0?0:i>1?1:i)*(t=(t/=100)<0?0:t>1?1:t))*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a)){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Do(255*d),f=Do(255*f),m=Do(255*m),h=1}else mo[p.toLowerCase()]?(n=p.toLowerCase(),d=mo[n].r,f=mo[n].g,m=mo[n].b,h="number"==typeof mo[n].a?mo[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],m=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+m+h)&&(this._invalid=!0),this._r=xo(d),this._g=xo(f),this._b=xo(m),this._a=h,this._spaces={}},isInvalid:function(){return this._invalid},setAlpha:function(e){this._a=e,this._spaces={}},getAlpha:function(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=So.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=So.toRGBA(this)),this._spaces.rgba},toString:function(){return this._spaces.rgb||(this._spaces.rgb=So.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=So.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=So.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=So.toHSLA(this,e)),this._spaces.hsla},toHSV:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=So.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=So.toNumber(this)),this._spaces.num},isDark:function(){return this.isInvalid()||this.getLuminance()<125},getLuminance:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),i=parseFloat(n[3]),o=parseFloat(n[5]),a=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),"hsla(".concat(r,",").concat(i,",").concat(o,",").concat(a,")")},isEqual:function(e){return e instanceof So||(e=new So(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend:function(e,t){var n=xo(this._r+(e._r-this._r)*t),r=xo(this._g+(e._g-this._g)*t),i=xo(this._b+(e._b-this._b)*t),o=xo(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,i,o].join(","),")")},createShiftedColor:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var t=this.getLuminance(),n=this._g<126?1:1+this._g/512,r=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new So(r)}});So.toRGB=function(e){if(e instanceof So)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=So.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},So.toRGBA=function(e,t){if(e instanceof So)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=So.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},So.toHex=function(e){var t,n,r;return e instanceof So?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=So.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},So.toHSL=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new So(e));var a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)n=0,o=0;else{switch(i=u-c,n=r>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return"hsl(".concat(360*o,",").concat(100*n,",").concat(100*r,")")},So.toHSLA=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new So(e));var a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)n=0,o=0;else{switch(i=c-p,n=r>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return"hsla(".concat(360*o,",").concat(100*n,",").concat(100*r,",").concat(u,")")},So.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new So(e));var i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,r=0;else{switch(t=0===(n=s-l)?0:n/u,s){case i:r=(o-a)/n+(o<a?6:0);break;case o:r=(a-i)/n+2;break;case a:r=(i-o)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}},So.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof So)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(n=parseInt(e[1],16),r=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+i},So.blend=function(e,t,n){var r=(16711680&(e=So.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(r+(((16711680&(t=So.toNumber(t)))>>16)-r)*n<<16)+(i+(((65280&t)>>8)-i)*n<<8)+(o+((255&t)-o)*n)},So.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,i=e._g+(t._g-e._g)*n,o=e._b+(t._b-e._b)*n,a=e._a+(t._a-e._a)*n;return new So(r,i,o,a)},So.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(ho.test(e)||go.test(e)||yo.test(e)||vo.test(e)||bo.test(e)||qo.test(e)||mo[e.toLowerCase()])},So.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},So.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},So.isDark=function(){var e={getLuminance:So.prototype.getLuminance,isInvalid:So.prototype.isInvalid};return So.prototype.init.apply(e,[].slice.call(arguments)),So.prototype.isDark.call(e)},So.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};var Co={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse:function(e){var t=new So(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey:function(e){var t=new So(e);return 0===t.getAlpha()?this.DARK_GREY:So.getBestContrast(t,new So(Co.LIGHT_GREY),new So(Co.DARK_GREY))},getBestContrast:function(e,t,n){return So.getBestContrast(new So(e),new So(t),new So(n))},getContrastingTransparent:function(e){var t=new So(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};function Eo(e,t){return t=t?"".concat(t,"."):"",bt(e,"".concat(t,"qHyperCube.qDimensionInfo.length"))>1}function Mo(e,t){if(t=t?"".concat(t,"."):"",bt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.length")))return bt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qSubNodes.length"),0)+bt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qDown"),0)+bt(e,"".concat(t,"qHyperCube.qStackedDataPages.0.qData.0.qUp"),0);var n=bt(e,"".concat(t,"qHyperCube.qEffectiveInterColumnSortOrder.0"));return Ao(bt(e,"".concat(t,"qHyperCube.qDimensionInfo.").concat(n)))}function Ao(e){return e.qCardinalities.qHypercubeCardinal}var Io={getHyperCube:function(e,t){return e&&(e=t?bt(e,t):e)&&e.qHyperCube?e.qHyperCube:null},hasSecondDimension:Eo,hasSecondMeasure:function(e,t){return t=t?"".concat(t,"."):"",bt(e,"".concat(t,"qHyperCube.qMeasureInfo.length"))>1},getStackedCubeSizeOf2Dims:Mo,getStackedCubeSizeOfMax2Dims:function(e,t){return Eo(e,t)?Mo(e,t):function(e,t){return t=t?"".concat(t,"."):"",bt(e,"".concat(t,"qHyperCube.qSize.qcy"))}(e,t)},getOuterDimensionSizeOfMax2Dims:function(e,t){return Eo(e,t)?Mo(e,t):1},getDimensionSize:Ao},wo=function(){this._maxJitter=1};wo.prototype.calcMaxJitter=function(e,t,n){this._maxJitter=Math.min(e*t,n-e)},wo.prototype.getJitterValue=function(e){var t=Math.abs(pi("".concat(e))%10)/9;return this._maxJitter/2-t*this._maxJitter};var Oo={toBefore:function(e){var t=e.qUndoExclude.qHyperCube;2===t.qEffectiveInterColumnSortOrder.length&&0===t.qEffectiveInterColumnSortOrder[0]&&(t.qEffectiveInterColumnSortOrder=[1,0],t.qDimensionInfo.reverse())},toAfter:function(e){var t=e.qUndoExclude.qHyperCube;2===t.qEffectiveInterColumnSortOrder.length&&1===t.qEffectiveInterColumnSortOrder[0]&&(t.qEffectiveInterColumnSortOrder=[0,1],t.qDimensionInfo.reverse())}};var To={generateHyperCube:function(e,t,n,r){t.qUndoExclude||(t.qUndoExclude={}),t.qUndoExclude.qHyperCubeDef=M(!0,{},t.qHyperCubeDef),t.qUndoExclude.qHyperCubeDef.qDimensions.reverse(),$n(t,"qUndoExclude.qHyperCubeDef.",t.color.point);var i=[],o=t.qUndoExclude.qHyperCubeDef.qDimensions.length,a=t.color.point&&!t.color.point.auto&&"byExpression"===t.color.point.mode;return o>0&&a&&(i=[Vn(Kn.COLOR_BY_EXPRESSION,{qExpression:bt(t,"color.point.expression.qValueExpression.qExpr")})]),t.qUndoExclude.qHyperCubeDef.qMeasures[0].qAttributeExpressions=i,jn.hasMultipleDimensions(t)?An.getAllHyperCubeExpressions(t.qHyperCubeDef,e.qHyperCube,n).then((function(i){Dr.applySorting(t,e,n,i,r);var o=i.dimensions[0],a=i.dimensions[1],s=i.measures[0],l=br.getFractileExpression(1,o,a,s),u=br.getFractileExpression(0,o,a,s);t.qUndoExclude.qHyperCubeDef.qDimensions[0].qAttributeExpressions=[{qExpression:u,id:"minBoxValue"},{qExpression:l,id:"maxBoxValue"}]})):(t.qUndoExclude.qHyperCubeDef.qInterColumnSortOrder=[1,0],Promise.resolve())}},ko=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Lo(e){var t=e.qUndoExclude.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(ko),o=r.some(ko),a=e.color.point.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function _o(e){var t,n=e.layout,r=e.localeInfo,i=e.model,o=e.picasso,a=e.environment,s=a.app,l=a.theme,u=a.translator,c=M(!0,{},n.color.point);return 2===n.qHyperCube.qDimensionInfo.length&&(0===(null==(t=c.byDimDef)?void 0:t.activeDimensionIndex)?t.activeDimensionIndex=1:1===(null==t?void 0:t.activeDimensionIndex)&&(t.activeDimensionIndex=0)),function(e){var t,n,r;return!(!e.snapshotData||null!==(t=e.snapshotData.content)&&void 0!==t&&null!==(n=t.chartData)&&void 0!==n&&n.legendDataPage||null===(r=e.qUndoExclude)||void 0===r||!r.legendData)}(n)&&(n=function(e){return(e=M({},e)).snapshotData=M({},e.snapshotData),e.snapshotData.content=M({},e.snapshotData.content),e.snapshotData.content.chartData=M({},e.snapshotData.content.chartData),e.snapshotData.content.chartData.legendDataPage=e.qUndoExclude.legendData.qDataPages,e}(n)),c.mode||(c.mode="primary"),function(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,p=e.createConfig,d=void 0===p?vt:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,q=void 0===b?void 0:b,x=m.auto,D=void 0===x?void 0:x,S=m.definitionPath,C=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),E={theme:q,key:v,localeInfo:y,layout:C,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:Y(Y({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:C?mt(C):void 0})},M=dt({picasso:o,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:yt}):yt(e)}));var A=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(S)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return A},custom:Y({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:mt}),n=ht(E,t);return M.config(n),M.getAuxiliarySettings(S).then((function(){A=!0}))}}}({app:s,model:i,picasso:o,translator:u,config:{localeInfo:r,theme:l,key:"color",definitionPath:"/qUndoExclude/qHyperCubeDef"},createConfig:function(){return{layout:n,hc:n.qUndoExclude.qHyperCube,legendProps:n.legend,colorProps:I(I({},c),{},{useBaseColors:Lo(n)})}}})}var Po=Fn.DATA_PATH,Ro=Fn.HYPERCUBE_PATH,No=Fn.HYPERCUBE_DEF_PATH;function Ho(e){return Array.isArray(e)?e:e?[e]:[]}function Fo(e){return Math.min(Io.getOuterDimensionSizeOfMax2Dims(e,Po),Fn.MAX_STACKED_VALUES)}function Bo(e,t){return{viewSize:t,max:Fo(e)}}function jo(){var e=Fn.MAX_STACKED_VALUES>=this.layout.qUndoExclude.qHyperCube.qSize.qcy?3:1;this.backendApi.setCacheOptions({height:e*this._scrollHandler.getScrollViewSizeInItem(),width:3})}function zo(){this.layout&&Io.hasSecondDimension(this.layout,Po)&&(this._scrollHandler.onResize(),!!this.layout.snapshotData||jo.call(this))}function Vo(){var e=this.chartInstance.component("legend");e&&e.emit&&e.emit("resetindex")}function Uo(e,t){return bt(e,"qHyperCube.qDimensionInfo.".concat(t,".qIsOneAndOnlyOne"))||!1}var Wo=ci.extend("DistributionPlot",{namespace:".distributionPlot",init:function(e){var t=e.lasso,n=e.environment,r=e.flags,i=e.picasso,o=e.$element,a=e.backendApi,s=e.selectionsApi;this._super(i,o,n,a,s),this.flags=r,this.picasso=i,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new Ii,this._selectionHandler=Ri({model:a.model,chartInstance:this.chartInstance,selectionsApi:s,isLassoDisabled:this.isLassoDisabled.bind(this),selectPaths:["/qUndoExclude/qHyperCubeDef"],lasso:t}),this._tooltipHandler=no(this.chartInstance,o,Fn.CHART_ID),this._scrollHandler=new io(this.chartInstance,o,this.getSlicedData.bind(this),this.onScrollCallback.bind(this),"colorLegend-cat"),this._maxBubbleScale=Fn.BUBBLE_SCALES_MAX,this._jitterTool=new wo,this.setDataPaths(["".concat(Po,"/").concat(Ro)])},onScrollCallback:function(e,t,n){var r=this;this._updateColorMapData(e).then((function(){r.updateChart(e,t,n)}))},getSlicedData:function(e,t){var n=this;return this.getData(this.backendApi,this.layout[Po][Ro],{top:e,height:t}).then((function(){return n.layout}))},updateScrollHandlerState:function(e){void 0!==e&&(this._disableScrolling=!!e),this._scrollHandler.setDisabled(!Io.hasSecondDimension(this.layout,Po)||this._disableScrolling)},updateConstraints:function(e){var t=!e.active,n=!e.passive,r=!e.select&&!e.active;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[n?"on":"off"](),this._selectionHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off(),this._selectionHandler.off()},_getPointScale:function(){return(e=this.layout).dataPoint&&e.dataPoint.bubbleScales?this.layout.dataPoint.bubbleScales/this._maxBubbleScale:1;var e},_calcBandwidth:function(e,t){var n=t.scales().dimension;this._bandwidthRatio=n?n.pxScale(e).bandwidth():1,this._bandwidthPx=e*this._bandwidthRatio},_calcPointMaxSize:function(e,t){var n=Math.min(Fn.MAX_POINT_BASE_SIZE_PX,t*Fn.POINT_BANDWIDTH_BASE_RATIO)*e;this._pointMaxSizePx=Math.max(Fn.MIN_POINT_PIXELS,n)},_calcPointSize:function(e,t){this._pointSize=e/t},_getDimAxisSettings:function(e,t){var n=Ho(t.trigger),r=Ho(t.consume),i=this.picassoElement.getBoundingClientRect()["vertical"===e.orientation?"height":"width"],o=fo.getAdjustedMaxGlyphCount(function(e){var t=e[Po][Ro].qDimensionInfo,n=Io.hasSecondDimension(e,Po)?t[0].qApprMaxGlyphCount:0;return Math.min(Fn.MAX_GLYPH_COUNT,n)}(this.layout||e),e[Po][Ro].qStackedDataPages[0].qData[0].qSubNodes),a=i/4;return{brush:{trigger:n,consume:r},settings:{labels:{mode:"vertical"===e.orientation?e.dimensionAxis.label:"auto",maxGlyphCount:o,maxLengthPx:a},paddingEnd:4}}},_getBoxMarkerSettings:function(e,t){var n=this.environment.theme,r=e.color.point.auto?n.getStyle(Fn.CHART_ID,"box","fill"):n.getColorPickerColor(e.color.box.paletteColor),i=Ho(t.trigger),o=Ho(t.consume),a=this,s="qMeasureInfo/0",l="qMeasureInfo/0";Io.hasSecondDimension(e,Po)&&e.qUndoExclude.qHyperCube.qDimensionInfo[0].qAttrExprInfo.length&&(s="qDimensionInfo/0/qAttrExprInfo/0",l="qDimensionInfo/0/qAttrExprInfo/1");var u={require:["chart"],displayOrder:1e3,settings:{chart:this,box:{fill:r,stroke:n.getStyle(Fn.CHART_ID,"box","stroke"),strokeWidth:0,width:Fn.POINT_BANDWIDTH_BASE_RATIO,maxWidthPx:Fn.MAX_POINT_BASE_SIZE_PX,minWidthPx:Fn.MIN_POINT_PIXELS+2*Fn.BOX_PADDING},minor:{scale:"measure"},orientation:e.orientation},beforeRender:function(){var e=a.layout.presentation&&a.layout.presentation.visibleComponents&&-1!==a.layout.presentation.visibleComponents.indexOf("point"),t="horizontal"===a.layout.orientation?this.rect.height:this.rect.width;a._calcBandwidth(t,this.chart),a._calcPointMaxSize(e?a._getPointScale():1,a._bandwidthPx);var n=0;a._jitter&&(a._calcPointSize(a._pointMaxSizePx,a._bandwidthPx),n=a._pointSize*a._bandwidthPx*Fn.JITTER_PARAMETER);var r=a._pointMaxSizePx+n+2*Fn.BOX_PADDING,i=r/a._bandwidthPx;this.settings.settings.box.maxWidthPx=Math.min(a._bandwidthPx-2,r),this.settings.settings.box.width=i},brush:{trigger:i,consume:o},data:{extract:{field:"qDimensionInfo/0",trackBy:function(){return-1},props:{start:{field:s,reduce:"min"},end:{field:l,reduce:"max"},elemNo:{field:"qDimensionInfo/0"}}}}};return Io.hasSecondDimension(e,Po)&&(u.data.extract.field="qDimensionInfo/0",u.data.extract.trackBy=function(e){return e.qElemNo},u.settings.major={scale:"dimension"}),u},_getPointMarkerSettings:function(e,t,n){var r=1;e.dataPoint&&!1===e.dataPoint.border&&(r=0);var i=Ho(t.trigger),o=Ho(t.consume);this._tooltipHandler.isOn()&&(i.push(n.point.trigger),o.push.apply(o,n.point.consume));var a=this,s=this.colorService.getColor(),l={require:["chart"],displayOrder:1100,settings:{chart:this,fill:s,stroke:function(e){var t=s(e);return Co.getContrastingTransparent(t)},size:.3,strokeWidth:r,sizeLimits:{maxRelExtent:10,maxPx:Fn.MAX_POINT_BASE_SIZE_PX,minPx:Fn.MIN_POINT_PIXELS},orientation:e.orientation},beforeRender:function(){var e="horizontal"===a.layout.orientation?this.rect.height:this.rect.width;if(a._calcBandwidth(e,this.chart),a._calcPointMaxSize(a._getPointScale(),a._bandwidthPx),a._calcPointSize(a._pointMaxSizePx,a._bandwidthPx),a._jitter){var t=2*Fn.BOX_PADDING/e;a._jitterTool.calcMaxJitter(a._pointSize*a._bandwidthRatio,Fn.JITTER_PARAMETER,a._bandwidthRatio-t)}this.settings.settings.sizeLimits.maxPx=a._pointMaxSizePx,this.settings.settings.size=a._pointSize},brush:{trigger:i,consume:o},data:{extract:{field:"qDimensionInfo/0",props:I({innerElemNo:{field:"qDimensionInfo/0"},elemNo:{field:"qDimensionInfo/0"},inner:{field:"qDimensionInfo/0",value:function(e){return e}},row:{field:"qDimensionInfo/0",value:function(e){return e.qRow}},measure:{field:"qMeasureInfo/0",reduce:"first",value:function(e){return e},reduceLabel:"none"}},this.colorService.getDatumProps())}}};return Io.hasSecondDimension(e,Po)&&(l.data.extract.props.inner.field="qDimensionInfo/1",l.data.extract.props.innerElemNo.field="qDimensionInfo/1",l.data.extract.props.row.field="qDimensionInfo/1",l.data.extract.field="qDimensionInfo/1",l.data.extract.props.outer={field:"qDimensionInfo/0",value:function(e){return e}}),this.setDataPaths(["".concat(Po,"/").concat(Ro)]),l},_getPointSelectionLayerSettings:function(e){var t=M(!0,{},e,{key:"selection-point-marker",settings:{opacity:0}});return t.brush.consume.pop(),t.brush.consume.forEach((function(e){e.style.inactive=void 0,e.style.active.opacity=1})),t.brush.trigger=[],t},createChartSettings:function(e){var t=this,n=this.isRtl(),r=this.environment.theme,i=!!e.snapshotData,o=e.presentation&&e.presentation.visibleComponents,a=o&&-1!==e.presentation.visibleComponents.indexOf("point"),s=o&&-1!==e.presentation.visibleComponents.indexOf("box");this._jitter=a&&e.dataPoint&&"jitter"===e.dataPoint.displacement;var l=e[Po][Ro],u=l.qDimensionInfo,c="horizontal"!==e.orientation?"y":"x",p="horizontal"!==e.orientation?"x":"y",d=ri.create({chartID:Fn.CHART_ID,theme:r,isRtl:n});if(0===l.qStackedDataPages[0].qData.length)return d.getSettings();var f={},m={},h={},g={};if(this._selectionHandler.isOn()){var y=!a&&Io.hasSecondDimension(e,Po);this._selectionHandler.setUpStart();var v=this._selectionHandler.setUpBrush({contexts:["select-inner"],data:["innerElemNo"],isSingleSelect:Uo(e,0)},!0),b=this._selectionHandler.setUpBrush({contexts:["select-outer"],data:["elemNo"],isSingleSelect:Uo(e,1)},!0),q=this._selectionHandler.setUpBrush({dataPath:Po,contexts:["select-color"],data:["color"],startOnEmptySelection:!1},!0),x=this._selectionHandler.setUpBrush({contexts:["select-measure"],data:[c]},!0);this._selectionHandler.setUpDone(),f={trigger:M(!0,{},b.trigger,{data:[""]}),consume:[M(!0,{},b.consume,{data:[""]})]},m={trigger:y?b.trigger:null,consume:[v.consume,b.consume,x.consume]},h={trigger:v.trigger,consume:[v.consume,b.consume,x.consume,q.consume]},g={trigger:[M(!0,{},q.trigger,{data:[""]})],consume:[M(!0,{},q.consume,{data:[""]}),v.consume,b.consume]}}var D={point:{},box:{}};this._tooltipHandler.isOn()&&(D.point=this._tooltipHandler.setUp({chartBuilder:d,colorService:this.colorService,data:Io.hasSecondDimension(e,Po)?["innerElemNo","elemNo"]:["innerElemNo"],contexts:["pointTip"],componentKey:"point-marker",environment:this.environment,attrDimPath:"/".concat(Ro,"/qDimensionInfo/").concat(Io.hasSecondDimension(e,Po)?1:0,"/qAttrDimInfo/0"),measureRows:["measure"],labelData:Io.hasSecondDimension(e,Po)?["inner","outer"]:["inner"]}));var S=function(e,t,n){var r={};return 1===e.length?(r.isOpenDim=!1,e[0]?r.isOpenMea=!1:r.isOpenMea=!0):e[0]&&!e[1]?(r.isOpenDim=!1,r.isOpenMea=!0):!e[0]&&e[1]?(r.isOpenDim=!0,r.isOpenMea=!1):e[0]&&e[1]?(r.isOpenDim=!1,r.isOpenMea=!1):(r.isOpenDim=!0,r.isOpenMea=!0),t&&(r.isOpenMea=!1),n&&(r.isOpenDim=!1),r}(function(e){var t=[],n=e.qUndoExclude&&e.qUndoExclude.qHyperCube&&e.qUndoExclude.qHyperCube.qDimensionInfo?e.qUndoExclude.qHyperCube.qDimensionInfo:void 0;if(!n)return!1;for(var r=0;r<n.length;r++)n[r].qLocked?t.push(n[r].qLocked):t.push(!1);return t}(e),Uo(e,0),Uo(e,1)),C={scrollHandler:this._scrollHandler,selectionHandler:this._selectionHandler},E={componentKey:a?"point-marker":"box-marker",lassoBrushKey:"select-inner",dimRangeBrushKey:"select-outer",measureRangeBrushKey:"select-measure",areaBrushKey:null,legendBrushKey:"legend"};if(this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Wi.create(C,e.orientation,n,E,S),d.addPreset("dimension-measure-chart",{isRtl:n,includeDimensionAxis:Io.hasSecondDimension(e,Po),orientation:e.orientation,selectionsEnabled:this._selectionHandler.isOn(),theme:r,measureSource:["qMeasureInfo/0"],dimensionSource:"qDimensionInfo/0",measureAxisProperties:e.measureAxis,measureTitleText:l.qMeasureInfo[0].qFallbackTitle,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:this._getDimAxisSettings(e,f),dimensionTitleText:u&&u[0]&&u[0].qFallbackTitle||"",gridlines:e.gridlines,hasNavigation:!i,isNavigationEnabledFn:function(){return t._scrollHandler.isOn()},scrollSettings:Bo(e,this._scrollHandler.getScrollViewSizeInItem()),enableLasso:!0,lasso:{brushKey:a?"select-inner":"select-outer",brushComponents:a?["point-marker"]:["box-marker"],brushData:a?["innerElemNo"]:["elemNo"]},enableDimRange:!0,dimRange:{brushKey:"select-outer",brushAxis:"horizontal"===e.orientation?"y-axis":"x-axis",brushArea:s?"box-marker":"point-marker",brushScale:"dimension"},enableMeasureRange:a,measureRange:{brushKey:"select-measure",brushAxis:"horizontal"===e.orientation?"x-axis":"y-axis",brushArea:a?"point-marker":"box-marker",brushScale:"measure",multiple:!0},brushActions:this._dependentActions.gestures,refLines:e.refLine&&e.refLine.refLines}),s){var A=this._getBoxMarkerSettings(e,m);d.addComponent("box-marker",A)}if(a){var w=this._getPointMarkerSettings(e,h,D);if(w.data.extract.props[c]={field:"qMeasureInfo/0"},w.settings[c]={scale:"measure"},Io.hasSecondDimension(e,Po)&&(w.data.extract.props[p]={field:"qDimensionInfo/0",type:"qual"},w.settings[p]={scale:"dimension"}),this._jitter){w.settings[p]=w.settings[p]||{};var O=this._jitterTool;w.settings[p].fn=function(e){return("function"==typeof e.scale?e.scale(e.datum[p].value)+.5*e.scale.bandwidth():.5)+O.getJitterValue(e.datum.value,Fn.JITTER_PARAMETER)}}d.addComponent("point-marker",w),d.addComponent("point-marker",this._getPointSelectionLayerSettings(w)),(e.legend?!1!==e.legend.show:!e.color.point.auto&&"byDimension"===e.color.point.mode)&&this.addLegend(d,n,g)}var T=d.getSettings();return this.addSnapshotChartSettings(T,e),T.scales=I(I({},T.scales),this.colorService.getScales()),T.palettes=this.colorService.getPalettes(),T},addLegend:function(e,t,n){var r,i,o=this,a={eventName:"legend-c",key:"colorLegend",styleReference:"object.comboChart",rtl:t,settings:{item:{shape:{type:"circle",size:10}}}},s=this.colorService.getLegend(a,{actions:{interact:{enabled:function(){return o._scrollHandler.isOn()}}}}),l=s.components;(l=l.filter((function(e){return!!e}))).length>0&&(this._selectionHandler.isOn()&&(l[0].brush={consume:n.consume.map((function(e){return M(!0,e,{style:{active:null}})})),trigger:n.trigger}),l[0].layout.displayOrder=200,l[0].layout.prioOrder=50),(r=e.settings.components).push.apply(r,N(l)),(i=e.settings.interactions[0].gestures).unshift.apply(i,N(s.interactions))},resize:function(){this.layout&&(zo.call(this),this._super())},hasValidData:function(){var e=this.layout;return e[Po]&&e[Po][Ro]&&e[Po][Ro].qStackedDataPages.length&&e[Po][Ro].qStackedDataPages[0].qData},paint:function(){var e=!!this.layout.snapshotData;e||this.environment.options.viewState||this.updateScrollHandlerState(!1),this._orientation||(this._orientation=this.layout.orientation),this._orientation!==this.layout.orientation&&(zo.call(this),this._orientation=this.layout.orientation);var t=this.layout;if(!this.hasValidData())return Promise.resolve();var n=this,r=this._super;return!e&&Io.hasSecondDimension(t,Po)&&this._scrollHandler.isDataSizeChanged(bt(t,"".concat(Po,".").concat(Ro,".qStackedDataPages.0.qData.0.qSubNodes.length")),Io.getOuterDimensionSizeOfMax2Dims(t,Po))?this._scrollHandler.getViewData().finally((function(){return n._updateColorMapData(t).then((function(){return r.call(n)}))})):this._updateColorMapData(t).then((function(){return r.call(n)}))},setSnapshotData:function(e){var t=this;return T(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t._super(e),n.next=3,t.colorService.getSnapshotData();case 3:return r=n.sent,e.snapshotData.content.chartData=I(I({},e.snapshotData.content.chartData),r),e[Po][Ro].qStackedDataPages=t.layout[Po][Ro].qStackedDataPages,Oo.toBefore(e),n.abrupt("return",e);case 8:case"end":return n.stop()}}),n)})))()},getViewState:function(){return{scroll:Math.round(this._scrollHandler.getScrollState())}},getDisclaimerAttributes:function(e){var t=!this.flags.isEnabled("SHOW_DISCLAIMER")||!(!1===e.showDisclaimer),n=!Io.hasSecondDimension(e,Po)&&e.qHyperCube.qSize.qcy>1e4||Io.hasSecondDimension(e,Po)&&e.qHyperCube.qSize.qcy>3e3,r=t&&n,i=Bo(e,this._scrollHandler.getScrollViewSizeInItem());return{data:e&&e.qUndoExclude,supportedDisclaimers:{LimitedData:t&&r},options:{paddingBottom:r&&i&&i.viewSize<i.max,supportNegative:!0,explicitLimitedData:r}}},_updateColorMapData:function(e){var t=this;return T(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.colorService=_o({layout:e,localeInfo:t.localeInfo,model:t.backendApi.model,picasso:t.picasso,environment:t.environment}),n.next=3,t.colorService.initialize();case 3:r=t.colorService.getSettings().field,i=t.chartInstance.brush("select-color"),/qAttrDimInfo/.test(r)&&i.addKeyAlias("attrDim/qDimensionInfo/0","".concat(Po,"/").concat(Ro,"/").concat(r));case 6:case"end":return n.stop()}}),n)})))()},_createColorLegendCube:function(e){var t=Io.hasSecondDimension(this.layout,Po)?1:0;return{qDimensionInfo:[this.layout[Po][Ro].qDimensionInfo[t].qAttrDimInfo[0]],qMeasureInfo:[],qDataPages:e,qMode:"S",qSize:{qcx:1,qcy:e[0].qMatrix.length}}},_updateColorData:function(){return this._updateColorMapData(this.layout)},updateDerivedProperties:function(e,t){var n=this.environment,r=n.app,i=n.translator,o=this,a=o.backendApi.model;return o._derivedProperties.addDefaultHyperCubeHash(e.qHyperCubeDef,t.qHyperCube,r,function(e){return{cube:e[No],sorting:e.sorting,color:{point:e.color.point}}}(e)).then((function(n){var s={layout:t,properties:e,model:a,hashData:n,generateDerivedProperties:function(e,t){return To.generateHyperCube(e,t,r,i)}};return o._derivedProperties.updateDerivedProperties(s)}))},updateData:function(e){var t=this,n=!!e.snapshotData;return t._super(e).then((function(){if(t._destroyed)return Promise.reject();if(e=t.layout,t._scrollHandler.setOptions({direction:"horizontal"===e.orientation?"vertical":"horizontal"}),n)return Oo.toAfter(e),t._updateColorMapData(e);t.updateScrollHandlerState(!0);var r=t.environment.options.viewState;return r?(t._scrollHandler.updateViewState(Fo(e)),t._scrollHandler.setScrollState(r.scroll)):(t._scrollHandler.resetScroll(),Vo.call(t)),t._scrollHandler.getScrollViewSizeInItem()&&!t._cacheSizeInitialized&&(jo.call(t),t._cacheSizeInitialized=!0),(Io.hasSecondDimension(e,Po)?t.getSlicedData(t._scrollHandler.getScrollState(),t._scrollHandler.getScrollViewSizeInItem()):t.getData(t.backendApi,e[Po][Ro],{height:e[Po][Ro].qSize.qcy||1})).then((function(){return t._destroyed?Promise.reject():t._updateColorData()}))}))},isLassoDisabled:function(){var e=this.layout;return!!(e.qHyperCube.qDimensionInfo&&e.qHyperCube.qDimensionInfo.length>1&&Uo(e,0))}}),Ko={enabled:!0,delay:50};function Yo(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}var Go=function(){function e(t){var n=t.onSend;k(this,e),this.options={},this.ongoingRequests=[],this.queuedRequests=[],this.recentRequests=[],this.resolvedRequests=[],this._debounceTimer=null,this._latestResolvedRequestedAt=-1,this.onSend=n,this.setOptions({})}return _(e,[{key:"destroy",value:function(){this.clear(),this.recentRequests=[],this.resolvedRequests=[],this.onSend=null,this.onCancel=null}},{key:"setOptions",value:function(e){this.options=M(!0,{},Ko,this.options,e),this.enabled=this.options.enabled||!1,this.delay=this.options.delay||-1}},{key:"clear",value:function(){for(clearTimeout(this._debounceTimer);this.queuedRequests.length;)this.queuedRequests.pop().dfd.reject();for(;this.ongoingRequests.length;)this.ongoingRequests.pop().dfd.reject()}},{key:"queue",value:function(e){var t=this.enabled?this.delay:-1,n=Date.now(),r={data:e,dfd:Yo(),wrapper:Yo(),requestedAt:n},i=Math.max(this._getAvgResolutionTime(),t),o=t<1,a=this.recentRequests.length<1,s=a||n-this.recentRequests.slice(-1)[0].requestedAt>i,l=n>this._latestResolvedRequestedAt+t;return o||a||s||l?Xo.apply(this,[r,0]):Xo.apply(this,[r,Math.min(t,1e3)]),this.recentRequests.push(r),this.recentRequests.length>10&&(this.recentRequests=this.recentRequests.slice(-10)),r.dfd.promise}},{key:"updateResolutionTime",value:function(){this._latestResolvedRequestedAt=Date.now()}},{key:"_getAvgResolutionTime",value:function(){var e;return this.resolvedRequests.length&&(e=0,this.resolvedRequests.forEach((function(t){e+=t.respondedAt-t.sentAt})),e/=this.resolvedRequests.length),e}}]),e}();function Xo(e,t){var n=this;this.queuedRequests.push(e),clearTimeout(this._debounceTimer),t>=10?this._debounceTimer=setTimeout((function(){$o.call(n)}),t):$o.call(n)}function $o(){if(this.ongoingRequests.length)this.waitingForResponse=!0;else{var e=this.queuedRequests.pop();for(e&&Jo.call(this,e);this.queuedRequests.length;)(e=this.queuedRequests.shift()).dfd.reject()}}function Jo(e){this.waitingForResponse=!1,this.ongoingRequests.push(e);var t=this,n=e.wrapper;e.sentAt=Date.now(),n.promise.then((function(){var n;(t.ongoingRequests.splice(t.ongoingRequests.indexOf(e),1),e.respondedAt=Date.now(),t.resolvedRequests.push({sentAt:e.sentAt,respondedAt:e.respondedAt,requestedAt:e.requestedAt}),t.resolvedRequests.length>10&&(t.resolvedRequests=t.resolvedRequests.slice(-10)),e.requestedAt>t._latestResolvedRequestedAt)?(n=e.dfd).resolve.apply(n,arguments):e.dfd.reject();t._latestResolvedRequestedAt=e.requestedAt}),(function(){var n;t.ongoingRequests.splice(t.ongoingRequests.indexOf(e),1),e.respondedAt=Date.now(),(n=e.dfd).reject.apply(n,arguments)})).finally((function(){t.waitingForResponse&&$o.call(t)})),this.onSend(e.data,n)}var Zo=new Xt(0,0,0,0),Qo=new Xt(0,0,0,0),ea=function(){function e(){k(this,e),this.pages=[]}return _(e,[{key:"get",value:function(e){var t=this;return e.map((function(e){return t.getPage(e)}))}},{key:"getPage",value:function(e){for(var t=[],n=0;n<this.pages.length;n++){var r=this.pages[n].qArea;Zo.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Qo.set(r.qLeft,r.qTop,r.qWidth,r.qHeight);var i=Qo.intersection(Zo,!0);if(t.push({coverage:i?i.clone():new Xt(0,0,0,0),idx:n}),r.qLeft<=e.qLeft&&r.qLeft+r.qWidth>=e.qLeft+e.qWidth&&r.qTop<=e.qTop&&r.qTop+r.qHeight>=e.qTop+e.qHeight)return this._extract(e,this.pages[n])}return t.sort((function(e,t){return t.coverage.width*t.coverage.height-e.coverage.width*e.coverage.height})),t[0].coverage.height>0&&t[0].coverage.width>0?this._extract(e,this.pages[t[0].idx]):{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qData:[]}}},{key:"destroy",value:function(){this.clear()}},{key:"isEmpty",value:function(){return!(this.pages&&this.pages[0]&&this.pages[0].qArea.qHeight&&this.pages[0].qArea.qWidth)}},{key:"clear",value:function(){this.pages=[]}},{key:"store",value:function(e){this.pages=e}},{key:"containsArea",value:function(e){for(var t=0;t<this.pages.length;t++){var n=this.pages[t].qArea;if(n.qLeft<=e.qLeft&&n.qLeft+n.qWidth>=e.qLeft+e.qWidth&&n.qTop<=e.qTop&&n.qTop+n.qHeight>=e.qTop+e.qHeight)return!0}return!1}},{key:"contains",value:function(e){var t=this;return!(!this.pages||!this.pages.length)&&0===e.filter((function(e){return!t.containsArea(e)})).length}},{key:"_extract",value:function(e,t){Zo.set(e.qLeft,e.qTop,e.qWidth,e.qHeight),Qo.set(t.qArea.qLeft,t.qArea.qTop,t.qArea.qWidth,t.qArea.qHeight);var n=Zo.intersection(Qo,!0);if(!n)return{qArea:{qTop:e.qTop,qLeft:e.qLeft,qWidth:0,qHeight:0},qData:[]};var r=Math.max(0,e.qTop-t.qArea.qTop),i=t.qData[0],o=i.qSubNodes,a={};for(var s in i)i.hasOwnProperty(s)&&(a[s]="qSubNodes"===s?o.slice(r,r+n.height):i[s]);return a.qUp+=r,a.qDown+=t.qArea.qHeight-n.height-r,{qArea:{qTop:n.y,qLeft:n.x,qWidth:n.width,qHeight:n.height},qData:[a]}}}]),e}(),ta={mode:"S",enabled:!0,debouncing:{enabled:!0,delay:50},height:250,width:250,maxTotalArea:1e4},na=Gt.extend("CacheCube",{init:function(e,t,n,r){var i=this;this.model=e,this.responseProperty=t,this.options={},this.cubeHeight=0,this.cubeWidth=0,this.setOptions(r||{}),this.setPath(n),"K"===this.options.mode?this.cube=new ea:"P"===this.options.mode?this.cube=new an:this.cube=new Qt,this.throttle=new Go({onSend:function(e,t){var n=i._getDirections(i.throttle.recentRequests.map((function(e){return{top:e.data[0].qTop,left:e.data[0].qLeft}}))),r=i._getAreasToCache(e,n.vertical,n.horizontal);i.cacheData(r,e).then((function(e){i.cube?t.resolve(e):t.reject()}),(function(){t.reject()}))}}),this._modelBinding=function(){i.clear()},this.model.on("changed",this._modelBinding)},destroy:function(){this.cube.destroy(),this.throttle.destroy(),this.model&&this.model.removeListener&&this.model.removeListener("changed",this._modelBinding),this._modelBinding=null,delete this.model,delete this.throttle,delete this.cube},setMethodName:function(e){this.method=e},setPath:function(e){this.path=e},setCubeSize:function(e){this.cubeHeight=e.qcy,this.cubeWidth=e.qcx},setOptions:function(e){e&&(this.options=M(!0,{},ta,this.options,e),this.cacheHeight=this.options.height,this.cacheWidth=this.options.width,this.enabled=this.options.enabled||!1,this.debouncing={enabled:this.options.debouncing.enabled||!1,delay:this.options.debouncing.delay||-1})},clear:function(){this.cube&&this.cube.clear(),this.throttle&&this.throttle.clear()},set:function(e){this.clear(),e&&e.length&&this.cube.store(e)},cacheData:function(e,t){var n=function(e){return this.cube?(this.cube.store(e),this.cube.get(t)):e};return"getHyperCubeStackData"===this.method&&this.options.maxStackedValues?this.model[this.method](this.path,e,this.options.maxStackedValues).then(n.bind(this)):this.model[this.method](this.path,e).then(n.bind(this))},getData:function(e){if(!this.model)return Promise.reject();if(!this.enabled||!this.cubeHeight||!this.cubeWidth)return"getHyperCubeStackData"===this.method&&this.options.maxStackedValues?this.model[this.method](this.path,e,this.options.maxStackedValues):this.model[this.method](this.path,e);var t,n,r=[];for(t=0;t<e.length;++t)n=e[t],r.push({qTop:Math.max(Math.floor(n.qTop),0),qLeft:Math.max(n.qLeft,0),qHeight:Math.min(n.qHeight,this.cubeHeight-Math.floor(n.qTop)),qWidth:Math.min(n.qWidth,this.cubeWidth-n.qLeft)});return this.cube.contains(r)?(this.throttle.updateResolutionTime(),Promise.resolve(this.cube.get(r))):0===r[0].qTop&&this.cube.isEmpty()&&this.throttle.ongoingRequests.length+this.throttle.queuedRequests.length===0?(this.throttle.updateResolutionTime(),this.cacheData(r,r)):this.throttle.queue(r)},_getDirections:function(e){if(!e||e.length<2)return{vertical:0,horizontal:0};var t=e.slice(-2),n=t[1].top-t[0].top,r=t[1].left-t[0].left;return{vertical:n<0?-1:n>0?1:0,horizontal:r<0?-1:r>0?1:0}},_getAreasToCache:function(e,t,n){var r,i,o,a,s,l,u,c,p,d=[],f=this.cacheHeight;for(void 0===t&&(t=0),void 0===n&&(n=0),this.cacheHeight*this.cacheWidth*e.length>this.options.maxTotalArea&&(f=Math.floor(this.options.maxTotalArea/(e.length*this.cacheWidth))),r=0;r<e.length;++r)a=(i=0!==t?Math.floor(.5*Math.max(0,f-e[r].qHeight)):0)*t-i,s=(o=0!==n?Math.floor(.5*Math.max(0,this.cacheWidth-e[r].qWidth)):0)*n-o,l=0!==t?Math.max(0,Math.min(Math.max(e[r].qHeight,f),this.cubeHeight)):e[r].qHeight,u=0!==n?Math.max(0,Math.min(Math.max(e[r].qWidth,this.cacheWidth),this.cubeWidth)):e[r].qWidth,c=Math.max(0,Math.min(e[r].qTop+a,this.cubeHeight-l)),p=Math.max(0,Math.min(e[r].qLeft+s,this.cubeWidth-u)),d.push({qTop:c,qHeight:l,qLeft:p,qWidth:u});return d}}),ra=Fn.DATA_PATH,ia=Fn.HYPERCUBE_DEF_PATH,oa=function(){function e(t){k(this,e),this.model=t,this.path="/".concat(ra,"/").concat(ia),this.cacheCube=new na(t,"qDataPages",this.path,{mode:"K"}),this.cacheCube.setMethodName("getHyperCubeStackData"),this.cacheCube.setOptions({maxStackedValues:Fn.MAX_STACKED_VALUES})}return _(e,[{key:"setPath",value:function(e){this.path=e}},{key:"setCacheOptions",value:function(e){this.cacheCube.setOptions(e)}},{key:"updateCache",value:function(e){var t,n;"qHyperCube"===this.dataPath?t=e&&e.qHyperCube:(n=this.dataPath.slice(0,this.dataPath.indexOf("qHyperCube")-1),t=e&&e[n]&&e[n].qHyperCube),e.qSelectionInfo.qInSelections||this.cacheCube.setCubeSize({qcx:t.qSize.qcx,qcy:Io.getStackedCubeSizeOfMax2Dims(e,n)}),this.backendStackThrottle.clear()}},{key:"getData",value:function(e,t){var n=this.cacheCube;return t?this.model.getHyperCubeData(t,e):this.cacheCube.getData(e).then((function(e){return e[0]&&e[0].qData[0]&&e[0].qData[0].qSubNodes.some((function(e){return e.qDown>0}))&&n.clear(),e}))}}]),e}();function aa(M){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(B).forEach((function(t){e.add(B[t])}))}}(M.translator);var A=function(){var e=D();return e.renderer.prio(["canvas"]),e.use(S),e.use(C(E)),e.use(j),e.component("disclaimer",z),e}();return{qae:Dn(M),ext:Or(M),component:function(){var D,S,C,E,I,w,O=g(),k=(D=l(),S=u(),C=c(),E=a(),I=p(),w=d(),f((function(){return{app:D,appLayout:S,deviceType:C,options:E,theme:I,translator:w}}),[D,S,E.direction,E.freeResize,w.language(),I.name(),C])),L=y(),_=v(),P=b(),N=e(),H=function(){var o=e(),a=R(t(!1),2),s=a[0],l=a[1],u=R(t(!1),2),c=u[0],p=u[1],d=!!n().qSelectionInfo.qInSelections,f=R(t((function(){return{toggle:function(){p((function(e){return!e}))}}})),1)[0];return r((function(){o&&l(!o.select&&!o.active)}),[o]),i((function(){return{key:"lasso",label:"Lasso",icon:V,hidden:!s||!d,active:c,action:function(){p((function(e){return!e}))}}}),[d,c,s]),f.enabled=function(){return s},f.active=function(){return c},f}(),F=q(),B=R(t(),2),j=B[0],z=B[1];r((function(){var e=x(O),t=function(e,t){return t.snapshotData?new ln(t,"qUndoExclude.qHyperCube","qStackedDataPages"):new oa(e)}(P,_),n=L,r=new Wo({environment:k,lasso:H,flags:M.flags,picasso:A,$element:e,backendApi:t,selectionsApi:n});return z(r),function(){r.destroy()}}),[]);var U,W=R(s(T(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j){e.next=2;break}return e.abrupt("return");case 2:if(j.updateEnvironment(k),j.updateConstraints(N),!!_.snapshotData){e.next=16;break}return e.next=8,P.getEffectiveProperties();case 8:return t=e.sent,e.next=11,j.updateDerivedProperties(t,_);case 11:if(!e.sent){e.next=15;break}return F.pending(),e.abrupt("return");case 15:F.restore();case 16:return e.next=18,j.updateData(_);case 18:return e.next=20,j.paint();case 20:case"end":return e.stop()}}),e)}))),[_,j,k]),2)[1];if(W)throw W;!function(t){var n=o(),r=a(),i=e(),l=R(s(T(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return t.updateConstraints(i),t.options=r,e.next=6,t.resize();case 6:case"end":return e.stop()}}),e)}))),[n.width,n.height]),2)[1];if(l)throw l}(j),U=j,m((function(e){if(U)return U.setSnapshotData(e)})),h((function(){return{getViewState:function(){if(U)return U.getViewState()}}}),[U])}}}export{aa as default};
990
12
  //# sourceMappingURL=index.js.map