@nebula.js/sn-waterfall 0.32.2 → 0.32.4
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,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-waterfall v0.32.
|
|
2
|
+
* @nebula.js/sn-waterfall v0.32.4
|
|
3
3
|
* Copyright (c) 2022 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as f,useState as m,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";function D(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 M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){E(o,n,i,a,s,"next",e)}function s(e){E(o,n,i,a,s,"throw",e)}a(void 0)}))}}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 C(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)||I(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 k(e){return function(e){if(Array.isArray(e))return L(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(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 I(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}function L(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 N={"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 T(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 O={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),l="center"===o?n:"* ".concat(n),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 R={version:"0.32.2",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function P(e){var t=e.translator;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:function(){return t.get("Visualizations.Descriptions.Bars")}}}}function F(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _={exports:{}};window;var H=F(_.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"==S(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=2)}([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)},l=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)},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(!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"!=S(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&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){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"==S(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)},l=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)},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(!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"!=S(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&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o=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},a=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},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 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 l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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 r=e.crossAllDimensions;return 2===t&&r?"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 b(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,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),f=m(0),h=m(1),g=y(p,f),b=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.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 r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:v,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,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===x({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=m(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:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,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=x({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==S(Symbol.iterator)?function(e){return S(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":S(e)})(e)}var M=i.a.bind(null,!0),E={},A=Array.isArray;function w(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function C(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(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]=C(e[r||t])?o:e[t],e=e[r||t]}})),e}function L(e,t){var r=!0;if(w(e)&&w(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){L(e[n],t[n])||(r=!1)})),r);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!L(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?M({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);L(o,a)||k(t,i)||(C(a)?n.push({op:"add",path:s,value:o}):w(o)&&w(a)?n=n.concat(E.generate(a,o,s)):A(o)&&A(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&C(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(L(t,i))return n;if(!C(t[0])&&C(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 l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,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){C(t[i])&&!k(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=I(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(A(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(A(o)&&A(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,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")}()}(l))}else if(w(o)&&w(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!k(r,e)&&delete r[e]})),M(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 u=I(e,t.from);A(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(A(n)?n.splice(+i,1):delete n[i])}))},E.clone=function(e){return M({},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)):M(e,t)};var N=E,T=function(e,t,r){if(!e)return Promise.resolve();var n=N.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()},O="accumulation";function R(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===O)return r[n]}function P(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===O)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.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,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(r,l),d=q.getAboveComp(r,l,c,p),f=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:r,properties:n,layout:i})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(P(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(P(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=R(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=R(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(O))return!1;var o=R(t,e);return o&&!o.disabled}}}},H="movingAverage";function V(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===H)return r[n]}function z(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===H)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},B={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=q.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=q.getNumStepComp(n,u),m=q.getAboveComp(n,u,d,f);if(n.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var r=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:n,properties:i,layout:o})){var b=q.getDimComp(c,1),v=q.getDimComp(c,0),x=q.getAggrComp(y,b,v);y=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(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(z(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(z(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(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=V(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=V(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(z(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(H))return!1;var o=V(t,e);return o&&!o.disabled}}}},U="difference";function W(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===U)return r[n]}function K(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===U)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:""},$={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:r,properties:n,layout:i})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(d,f,m);d=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(K(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(K(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(K(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=W(t,e);return o&&!o.disabled}}}},Y={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},J={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},X="normalization";function Q(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)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:J.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.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:J.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}(Q(e,n).selectionScope,o)}function re(e,t,r){var n=[{value:Y.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:Y.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:Y.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}(Q(e,r).dimensionalScope,n)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DISREGARD_ALL_DIMENSIONS,selectionScope:Y.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,r){return 1===e?"{$<".concat(q.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(q.getDimDefWithWrapper(r),">"):""}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ie(t),l=oe(t,r,n),u=""===s&&""===l?"":s||l,c=ae(i,o),p=se(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Z(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DISREGARD_SELECTION,options:function(r){return re(r,t,e)}},field:{refFn:function(t){return"".concat(Z(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Q(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Z(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Q(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Z(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return te(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return(Q(t,e).dimensionalScope||0)===J.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=Q(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"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},pe=ce;function de(e){return(de="function"==typeof Symbol&&"symbol"==S(Symbol.iterator)?function(e){return S(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":S(e)})(e)}var fe={accumulation:_,movingAverage:B,difference:$,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:be,getActiveModifier:ve,initBase:pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:r,layout:n})}))},measureBase:ue,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=De(e);ke({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Oe({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:xe},{});function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,o=void 0!==n&&n,s=e.masterItem;me[t.id]=me[t.id]||{isFirstTime:!0};var l=me[t.id].isFirstTime;if(me[t.id].isFirstTime=!1,r&&"object"===de(r))return ge({model:t,properties:r});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"),be({measures:p,layout:u})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ce({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,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 ke({modifiers:De(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Se(r);var n=Re(r);return Ie({model:t}).then((function(i){return Le({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;qe(t).forEach((function(e){return function(e){var t=e.measure;if(Ce({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===de(e)&&!e.disabled){if(r++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ae(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),ge({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"===de(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Re(r);return Pe({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return qe(r).forEach((function(e){return ye(e)})),Te({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,r=e.oldProperties,n=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?i()(!0,{},n):n),Se(n);var d=Re(n);return Pe({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=qe(r)),!t.length)return Promise.resolve();if(!be({measures:t,properties:r}))return t.forEach((function(e){return ye(e)})),Promise.resolve();var l=o?void 0:Re(r);return Ie({model:n,dimensionAndFieldList:s}).then((function(e){return Le({libraryIds:l,model:n,libraryItemsProps:o}).then((function(n){t.forEach((function(t){ke({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=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,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=l,t.qDef.qDef=r.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,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:o}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[r.type].updateModifier&&fe[r.type].updateModifier(r,n.qHyperCubeDef);var a=ue.getExpression(t),s=fe[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:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||xe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&xe(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}),Ee(t)):ye(t)}))}))}))}({measures:o,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Te({oldProperties:r,newProperties:n,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 be(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return ke({modifiers:De(e),properties:r,layout:n})}))}function ve(e){var t=De(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(fe[n.type]&&!n.disabled)return n}}function xe(e){var t=ve(e);return!t||fe[t.type].enableTotalsFunction(e)}function qe(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 Me(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Se(e){qe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&Me(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]&&Me(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 Ce(e){var t=e.measure,r=e.properties,n=e.layout;return!we(t)&&ke({modifiers:De(t),properties:r,layout:n})}function ke(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})),i[e.type])}))}function Ie(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 Ne(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Te(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Ne)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):T(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Oe(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})}))}function Re(e){var t=qe(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=De(t);if(ke({modifiers:n,properties:e})){var o=we(t);o&&r.push(o),i=i||Oe({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Pe(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(me[t.id].masterItemSubscriber=me[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(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(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=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:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){i[e]||o[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(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return he({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),me[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}function i(e){return(i="function"==typeof Symbol&&"symbol"==S(Symbol.iterator)?function(e){return S(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":S(e)})(e)}r.r(t);var o={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:function(){return n(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 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)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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 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)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}var p={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:function(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},findIndexByPropertyValue:c},d=r(1),f=r.n(d),m={addDimensions:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude:function(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&&(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)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.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,r){var n,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(n=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var g=r(0),y=r.n(g);function b(e,t){var r=y()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function v(e,t){return y()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return M(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 M(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)?M(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 M(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 E(e){return function(e){if(Array.isArray(e))return A(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 A(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)?A(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 A(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 w={importCommonProperties:function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},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,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=b(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=v(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=v(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,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=x(a.max,i.dimensions.length,q),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,q),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=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&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},r,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(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},initLayoutExclude:function(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=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=E(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function C(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){o.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var k={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){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}(),a=t.qProperty,s=o.getValue(a,r||""),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}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:i,properties:a}),n||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,r=e.initialProperties,n=void 0===r?{}:r,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=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=w.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=w.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,M=v.minMeasures,S=l.defaultDimension,E=void 0===S?w.getDefaultDimension():S,A=l.defaultMeasure,k=void 0===A?w.getDefaultMeasure():A;b.qDimensions.length=0,b.qMeasures.length=0,w.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:M})&&w.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:M,newHyperCubeDef:b}),w.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:E}),w.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:M,newHyperCubeDef:b,defaultMeasure:k}),w.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),w.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),w.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),w.copyPropertyIfExist("qMaxStackedCells",y,b),w.copyPropertyIfExist("qNoOfLeftDims",y,b),w.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),w.copyPropertyOrSetDefault("qMode",y,b,"S"),w.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),w.copyPropertyOrSetDefault("qSortbyYValue",y,b),w.copyPropertyOrSetDefault("qIndentMode",y,b),w.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),w.importCommonProperties(g,t,n),h.qProperty=g;var I=o.getValue(c||{},"support.modifiers");return w.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:I}),d&&C(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&C(h.qProperty,"dynamicScript"),h}},I={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function L(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function N(e,t){return e.length!==t}var T={create:function(e,t){if(!e||!I[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},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(L(a,t,n,i),N(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"}},O={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}},R={colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>0&&O.getNumMeasures(e)<=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>0},expression:function(e){return O.getNumMeasures(e)>=1}}},P={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},F={scatterplot:P,"sn-scatter-plot":P,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)<=1},expression:function(e){return O.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>=1},expression:function(e){return O.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 O.getNumDimensions(e)>=1}}}};function _(e,t,r){if(Array.isArray(e[t])){var n=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function H(e,t){var r=T.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){_(e,"qAttributeDimensions",r),_(e,"qAttributeExpressions",r)})),t.forEach((function(e){_(e,"qAttributeDimensions",r),_(e,"qAttributeExpressions",r)}))}function V(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function z(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;H(n,i);var l=n[n.length-1];if(l){var u=r?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=T.create(T.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(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")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function j(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.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)}(r,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}(r,n))&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var B={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,r,n){var i=r?"expression":t.type,o=e.color,a=o.mode,s=O.getItemLabel(t);switch(V(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||O.wrapFieldName(t.name),key:O.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:r||s,key:r||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&&B.useMasterNumberFormat(o.formatting)}n||(o.auto=!1,o.mode=a)}function W(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=T.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return U(e,j("dimension",!!a,a||n)),!!a}function K(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&V(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=j("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,U(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;z({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}function G(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&V(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=j("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,U(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=T.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return U(e,j("measure",!!s,s||n[0])),!!s}(e,t))return;z({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}var $={changeProperty:function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(F[t]||R).colorModeOptions||R.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy:function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},updateColorBy:function(e,t){var r=o.getValue(e,"color.mode"),n=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"),[]);n?H(i,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:i})?K(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:n,colorMode:r,dimensions:i,measures:a,properties:e})?G(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),H(n,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,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,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",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r}},Y={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=k.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=T.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return T.moveByIdFromGroup(a,[],"qAttributeDimensions",u),T.moveByIdFromGroup(a,[],"qAttributeExpressions",u),T.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=k.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),f=o.getValue(p,"qHyperCubeDef.qDimensions",[]),m=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=$.getCanColorBy(p,d),y=$.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?$.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&$.addColorByExpression(p):$.switchToAutoColor(p),y&&$.updateColorBy(p,"qHyperCubeDef."),$.shouldSwitchToColorPersistent(p)&&$.changeProperty(p,"color.persistent",!0),$.deleteTotalMode(f),c}},J=["bar","marker","line"],X={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?C(r,"unsupportedAutoMinMax")||y()(r.measureAxis,t.measureAxis):C(r,"supportedAutoMinMax")||y()(r.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),J.includes(n)&&t[i].type[n]++,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,r.properties.measureAxes[t[0].axis])):y()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder:function(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}}}},Q={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=Y.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=Y.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return X.handleAutoMinMax({initialProperties:r,properties:p}),X.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:p,measureType:a}),X.setInterColumnSortOrder(p.qHyperCubeDef),c}};function Z(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=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=Z(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}function te(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Z(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}var re={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"})}},ne={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:k,colorChart:Y,axisChart:Q,quarantineProperty:h,unquarantineProperty:C,quarantineArrayProp:ee,unquarantineArrayProp:te,conditionalColoring:re,conditionalShow:ne}}]));function V(e){var t=e.dataDefinition,r=e.defaultPropertyValues,n=e.exportFormat,i=e.initialProperties,o=H.hypercube.importProperties({exportFormat:n,initialProperties:i,dataDefinition:t,defaultPropertyValues:r}),a=o.qProperty;return"all"===a.dimensionAxis.show?a.dimensionAxis.show="labels":"title"===a.dimensionAxis.show&&(a.dimensionAxis.show="none"),"all"===a.measureAxis.show?a.measureAxis.show="labels":"title"===a.measureAxis.show&&(a.measureAxis.show="none"),a.qHyperCubeDef.qMeasures.length>0&&(a.qDef.numFormatFromTemplate=a.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,a.qDef.qNumFormat=a.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,a.qHyperCubeDef.qMeasures.forEach((function(e){e.qDef.numFormatFromTemplate=a.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},a.qDef.qNumFormat)}))),a.qHyperCubeDef.qSuppressZero=!1,o}function z(e){var t=e.propertyTree,r=e.viewDataMode;return H.hypercube.exportProperties({propertyTree:t,viewDataMode:r})}var j=function(e){var t=P(e);return{properties:R,data:{targets:[t]},importProperties:function(e){var r=e.exportFormat,n=e.initialProperties;return V({dataDefinition:t,exportFormat:r,initialProperties:n})},exportProperties:z}};function B(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function U(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function W(){}var K=1/.7,G="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Y="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",J=/^#([0-9a-f]{3,8})$/,X=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),Q=new RegExp("^rgb\\("+[Y,Y,Y]+"\\)$"),Z=new RegExp("^rgba\\("+[G,G,G,$]+"\\)$"),ee=new RegExp("^rgba\\("+[Y,Y,Y,$]+"\\)$"),te=new RegExp("^hsl\\("+[$,Y,Y]+"\\)$"),re=new RegExp("^hsla\\("+[$,Y,Y,$]+"\\)$"),ne={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 ie(){return this.rgb().formatHex()}function oe(){return this.rgb().formatRgb()}function ae(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=J.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?se(t):3===r?new ce(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?le(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?le(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=X.exec(e))?new ce(t[1],t[2],t[3],1):(t=Q.exec(e))?new ce(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Z.exec(e))?le(t[1],t[2],t[3],t[4]):(t=ee.exec(e))?le(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=te.exec(e))?me(t[1],t[2]/100,t[3]/100,1):(t=re.exec(e))?me(t[1],t[2]/100,t[3]/100,t[4]):ne.hasOwnProperty(e)?se(ne[e]):"transparent"===e?new ce(NaN,NaN,NaN,0):null}function se(e){return new ce(e>>16&255,e>>8&255,255&e,1)}function le(e,t,r,n){return n<=0&&(e=t=r=NaN),new ce(e,t,r,n)}function ue(e){return e instanceof W||(e=ae(e)),e?new ce((e=e.rgb()).r,e.g,e.b,e.opacity):new ce}function ce(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function pe(){return"#"+fe(this.r)+fe(this.g)+fe(this.b)}function de(){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 fe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function me(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ge(e,t,r,n)}function he(e){if(e instanceof ge)return new ge(e.h,e.s,e.l,e.opacity);if(e instanceof W||(e=ae(e)),!e)return new ge;if(e instanceof ge)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ge(a,s,l,e.opacity)}function ge(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ye(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 be(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 ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(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 qe(e,t,r){return t&&xe(e.prototype,t),r&&xe(e,r),e}function De(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}B(W,ae,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ie,formatHex:ie,formatHsl:function(){return he(this).formatHsl()},formatRgb:oe,toString:oe}),B(ce,(function(e,t,r,n){return 1===arguments.length?ue(e):new ce(e,t,r,null==n?1:n)}),U(W,{brighter:function(e){return e=null==e?K:Math.pow(K,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ce(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:pe,formatHex:pe,formatRgb:de,toString:de})),B(ge,(function(e,t,r,n){return 1===arguments.length?he(e):new ge(e,t,r,null==n?1:n)}),U(W,{brighter:function(e){return e=null==e?K:Math.pow(K,e),new ge(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ge(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 ce(ye(e>=240?e-240:e+120,i,n),ye(e,i,n),ye(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 Me,Se=(
|
|
7
|
+
import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as f,useState as m,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";var D={"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 M(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var S={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o="center"===n?t:"* "+t,a="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=t.width+"px",r.height=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}(n,this.rect),dir:i},e("span",{ref:this.alignToRef,style:a,title:o},o))}};const w={version:"0.32.4",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function C(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E={exports:{}};window;var T=A(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"==typeof 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=2)}([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)},l=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)},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(!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"!=typeof 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&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){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"==typeof 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)},l=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)},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(!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"!=typeof 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&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o=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},a=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},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 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 l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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 r=e.crossAllDimensions;return 2===t&&r?"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 b(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,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),f=m(0),h=m(1),g=y(p,f),b=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.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 r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:v,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,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===x({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=m(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:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,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=x({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var M=i.a.bind(null,!0),S={},w=Array.isArray;function C(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function A(e){return void 0===e}function E(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(C(e)&&C(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(w(e)&&w(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}S.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?M({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);k(o,a)||E(t,i)||(A(a)?n.push({op:"add",path:s,value:o}):C(o)&&C(a)?n=n.concat(S.generate(a,o,s)):w(o)&&w(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(S.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,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])&&!E(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},S.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(w(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(w(o)&&w(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(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")}()}(l))}else if(C(o)&&C(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!E(r,e)&&delete r[e]})),M(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 u=T(e,t.from);w(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(w(n)?n.splice(+i,1):delete n[i])}))},S.clone=function(e){return M({},e)},S.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},S.updateObject=function(e,t){Object.keys(e).length?S.apply(e,S.generate(e,t)):M(e,t)};var I=S,N=function(e,t,r){if(!e)return Promise.resolve();var n=I.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()},L="accumulation";function R(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===L)return r[n]}function O(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===L)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},P={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.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,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(r,l),d=q.getAboveComp(r,l,c,p),f=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:r,properties:n,layout:i})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(O(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(O(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(O(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(O(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=R(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=R(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(O(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=R(t,e);return o&&!o.disabled}}}},_="movingAverage";function H(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function V(e,t){var r=function(e,t){var r=a(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 z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},j={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=q.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=q.getNumStepComp(n,u),m=q.getAboveComp(n,u,d,f);if(n.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var r=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:n,properties:i,layout:o})){var b=q.getDimComp(c,1),v=q.getDimComp(c,0),x=q.getAggrComp(y,b,v);y=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=H(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=H(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 q.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=H(t,e);return o&&!o.disabled}}}},U="difference";function B(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===U)return r[n]}function W(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===U)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:r,properties:n,layout:i})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(d,f,m);d=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(W(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(W(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(W(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=B(t,e);return o&&!o.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},G={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},Z="normalization";function J(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===Z)return r[n]}function X(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===Z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Q(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:G.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:G.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:G.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=Q(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=Q(t,1);t.splice(n,1)}return t}(J(e,n).selectionScope,o)}function te(e,t,r){var n=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Q(t,0);t.splice(n,1)}return t}(J(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:G.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(r),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ne(t),l=ie(t,r,n),u=""===s&&""===l?"":s||l,c=oe(i,o),p=ae(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,r.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(r){return te(r,t,e)}},field:{refFn:function(t){return"".concat(X(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 J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return J(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(X(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(J(t,e).dimensionalScope||0)===G.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(Z))return!1;var o=J(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ne,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={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"}},ue={initBase:function(e,t){(t||ue.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){ue.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"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:P,movingAverage:j,difference:Y,normalization:se},fe=(t.default={modifiers:de,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:be,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:r,layout:n})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=qe(e);Ee({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Le({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:ve},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,o=void 0!==n&&n,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,r&&"object"===pe(r))return he({model:t,properties:r});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=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,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 Ee({modifiers:qe(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Me(r);var n=Re(r);return Te({model:t}).then((function(i){return ke({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ae({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(de[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&we(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({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"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Re(r);return Oe({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return xe(r).forEach((function(e){return ge(e)})),Ne({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,r=e.oldProperties,n=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?i()(!0,{},n):n),Me(n);var d=Re(n);return Oe({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(r)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Re(r);return Te({model:n,dimensionAndFieldList:s}).then((function(e){return ke({libraryIds:l,model:n,libraryItemsProps:o}).then((function(n){t.forEach((function(t){Ee({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[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)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=l,t.qDef.qDef=r.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,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:o}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof de[r.type].updateModifier&&de[r.type].updateModifier(r,n.qHyperCubeDef);var a=le.getExpression(t),s=de[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:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ve(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ve(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}),Se(t)):ge(t)}))}))}))}({measures:o,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Ne({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ye(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({modifiers:qe(e),properties:r,layout:n})}))}function be(e){var t=qe(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(de[n.type]&&!n.disabled)return n}}function ve(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Me(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Se(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function we(e){return e.base||e.qDef&&e.qDef.base}function Ce(e){var t=we(e);return e.qLibraryId||t&&t.qLibraryId}function Ae(e){var t=e.measure,r=e.properties,n=e.layout;return!Ce(t)&&Ee({modifiers:qe(t),properties:r,layout:n})}function Ee(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function Te(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 ke(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 Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ne(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):N(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Le(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Re(e){var t=xe(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=qe(t);if(Ee({modifiers:n,properties:e})){var o=Ce(t);o&&r.push(o),i=i||Le({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Oe(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(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(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=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:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){i[e]||o[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(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}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)}r.r(t);var o={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:function(){return n(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 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)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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 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)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}var p={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:function(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},findIndexByPropertyValue:c},d=r(1),f=r.n(d),m={addDimensions:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude:function(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&&(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)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.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,r){var n,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(n=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var g=r(0),y=r.n(g);function b(e,t){var r=y()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function v(e,t){return y()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return M(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 M(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)?M(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 M(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 S(e){return function(e){if(Array.isArray(e))return w(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 w(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)?w(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 w(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 C={importCommonProperties:function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},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,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=b(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=v(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=v(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,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=x(a.max,i.dimensions.length,q),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,q),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=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&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},r,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(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},initLayoutExclude:function(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=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=S(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function A(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){o.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var E={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){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}(),a=t.qProperty,s=o.getValue(a,r||""),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}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:i,properties:a}),n||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,r=e.initialProperties,n=void 0===r?{}:r,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=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=C.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=C.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,M=v.minMeasures,S=l.defaultDimension,w=void 0===S?C.getDefaultDimension():S,E=l.defaultMeasure,T=void 0===E?C.getDefaultMeasure():E;b.qDimensions.length=0,b.qMeasures.length=0,C.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:M})&&C.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:M,newHyperCubeDef:b}),C.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),C.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:M,newHyperCubeDef:b,defaultMeasure:T}),C.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),C.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),C.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),C.copyPropertyIfExist("qMaxStackedCells",y,b),C.copyPropertyIfExist("qNoOfLeftDims",y,b),C.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),C.copyPropertyOrSetDefault("qMode",y,b,"S"),C.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),C.copyPropertyOrSetDefault("qSortbyYValue",y,b),C.copyPropertyOrSetDefault("qIndentMode",y,b),C.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),C.importCommonProperties(g,t,n),h.qProperty=g;var k=o.getValue(c||{},"support.modifiers");return C.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:k}),d&&A(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&A(h.qProperty,"dynamicScript"),h}},T={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function k(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function I(e,t){return e.length!==t}var N={create:function(e,t){if(!e||!T[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},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(k(a,t,n,i),I(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"}},L={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}},R={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.getNumMeasures(e)>=1}}},O={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},F={scatterplot:O,"sn-scatter-plot":O,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.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 L.getNumDimensions(e)>=1}}}};function P(e,t,r){if(Array.isArray(e[t])){var n=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function _(e,t){var r=N.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){P(e,"qAttributeDimensions",r),P(e,"qAttributeExpressions",r)})),t.forEach((function(e){P(e,"qAttributeDimensions",r),P(e,"qAttributeExpressions",r)}))}function H(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function V(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;_(n,i);var l=n[n.length-1];if(l){var u=r?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=N.create(N.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(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")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.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)}(r,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}(r,n))&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var j={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,r,n){var i=r?"expression":t.type,o=e.color,a=o.mode,s=L.getItemLabel(t);switch(H(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:r||s,key:r||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&&j.useMasterNumberFormat(o.formatting)}n||(o.auto=!1,o.mode=a)}function B(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=N.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return U(e,z("dimension",!!a,a||n)),!!a}function W(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=z("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,U(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;V({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}function $(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=z("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,U(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=N.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||n[0])),!!s}(e,t))return;V({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(F[t]||R).colorModeOptions||R.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy:function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},updateColorBy:function(e,t){var r=o.getValue(e,"color.mode"),n=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"),[]);n?_(i,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:i})?W(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:n,colorMode:r,dimensions:i,measures:a,properties:e})?$(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),_(n,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,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,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",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r}},K={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=E.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=N.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return N.moveByIdFromGroup(a,[],"qAttributeDimensions",u),N.moveByIdFromGroup(a,[],"qAttributeExpressions",u),N.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=E.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),f=o.getValue(p,"qHyperCubeDef.qDimensions",[]),m=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=Y.getCanColorBy(p,d),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&Y.addColorByExpression(p):Y.switchToAutoColor(p),y&&Y.updateColorBy(p,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(p)&&Y.changeProperty(p,"color.persistent",!0),Y.deleteTotalMode(f),c}},G=["bar","marker","line"],Z={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?A(r,"unsupportedAutoMinMax")||y()(r.measureAxis,t.measureAxis):A(r,"supportedAutoMinMax")||y()(r.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),G.includes(n)&&t[i].type[n]++,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,r.properties.measureAxes[t[0].axis])):y()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder:function(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}}}},J={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=K.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=K.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return Z.handleAutoMinMax({initialProperties:r,properties:p}),Z.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:p,measureType:a}),Z.setInterColumnSortOrder(p.qHyperCubeDef),c}};function X(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Q(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=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=X(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=X(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine: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"})}};t.default={hypercube:E,colorChart:K,axisChart:J,quarantineProperty:h,unquarantineProperty:A,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}]));function k({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=T.hypercube.importProperties({exportFormat:r,initialProperties:n,dataDefinition:e,defaultPropertyValues:t}),o=i.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},o.qDef.qNumFormat)}))),o.qHyperCubeDef.qSuppressZero=!1,i}function I({propertyTree:e,viewDataMode:t}){return T.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var N=e=>{const t=C(e);return{properties:w,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>k({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:I}};function L(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function R(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function O(){}var F=1/.7,P="\\s*([+-]?\\d+)\\s*",_="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",H="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",V=/^#([0-9a-f]{3,8})$/,z=new RegExp("^rgb\\("+[P,P,P]+"\\)$"),j=new RegExp("^rgb\\("+[H,H,H]+"\\)$"),U=new RegExp("^rgba\\("+[P,P,P,_]+"\\)$"),B=new RegExp("^rgba\\("+[H,H,H,_]+"\\)$"),W=new RegExp("^hsl\\("+[_,H,H]+"\\)$"),$=new RegExp("^hsla\\("+[_,H,H,_]+"\\)$"),Y={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 K(){return this.rgb().formatHex()}function G(){return this.rgb().formatRgb()}function Z(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=V.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?J(t):3===r?new ee(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?X(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?X(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=z.exec(e))?new ee(t[1],t[2],t[3],1):(t=j.exec(e))?new ee(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=U.exec(e))?X(t[1],t[2],t[3],t[4]):(t=B.exec(e))?X(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=W.exec(e))?ie(t[1],t[2]/100,t[3]/100,1):(t=$.exec(e))?ie(t[1],t[2]/100,t[3]/100,t[4]):Y.hasOwnProperty(e)?J(Y[e]):"transparent"===e?new ee(NaN,NaN,NaN,0):null}function J(e){return new ee(e>>16&255,e>>8&255,255&e,1)}function X(e,t,r,n){return n<=0&&(e=t=r=NaN),new ee(e,t,r,n)}function Q(e){return e instanceof O||(e=Z(e)),e?new ee((e=e.rgb()).r,e.g,e.b,e.opacity):new ee}function ee(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function te(){return"#"+ne(this.r)+ne(this.g)+ne(this.b)}function re(){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 ne(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ie(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ae(e,t,r,n)}function oe(e){if(e instanceof ae)return new ae(e.h,e.s,e.l,e.opacity);if(e instanceof O||(e=Z(e)),!e)return new ae;if(e instanceof ae)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ae(a,s,l,e.opacity)}function ae(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function se(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}L(O,Z,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:K,formatHex:K,formatHsl:function(){return oe(this).formatHsl()},formatRgb:G,toString:G}),L(ee,(function(e,t,r,n){return 1===arguments.length?Q(e):new ee(e,t,r,null==n?1:n)}),R(O,{brighter:function(e){return e=null==e?F:Math.pow(F,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ee(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:te,formatHex:te,formatRgb:re,toString:re})),L(ae,(function(e,t,r,n){return 1===arguments.length?oe(e):new ae(e,t,r,null==n?1:n)}),R(O,{brighter:function(e){return e=null==e?F:Math.pow(F,e),new ae(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ae(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 ee(se(e>=240?e-240:e+120,i,n),se(e,i,n),se(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 le=Math.PI/180,ue=180/Math.PI,ce=4/29,pe=6/29,de=3*pe*pe;function fe(e){if(e instanceof me)return new me(e.l,e.a,e.b,e.opacity);if(e instanceof xe)return qe(e);e instanceof ee||(e=Q(e));var t,r,n=be(e.r),i=be(e.g),o=be(e.b),a=he((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=he((.4360747*n+.3850649*i+.1430804*o)/.96422),r=he((.0139322*n+.0971045*i+.7141733*o)/.82521)),new me(116*a-16,500*(t-a),200*(a-r),e.opacity)}function me(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function he(e){return e>.008856451679035631?Math.pow(e,1/3):e/de+ce}function ge(e){return e>pe?e*e*e:de*(e-ce)}function ye(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function be(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ve(e){if(e instanceof xe)return new xe(e.h,e.c,e.l,e.opacity);if(e instanceof me||(e=fe(e)),0===e.a&&0===e.b)return new xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ue;return new xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xe(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function qe(e){if(isNaN(e.h))return new me(e.l,0,0,e.opacity);var t=e.h*le;return new me(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function De(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 Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(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 we(e,t,r){return t&&Se(e.prototype,t),r&&Se(e,r),e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}L(me,(function(e,t,r,n){return 1===arguments.length?fe(e):new me(e,t,r,null==n?1:n)}),R(O,{brighter:function(e){return new me(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new me(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new ee(ye(3.1338561*(t=.96422*ge(t))-1.6168667*(e=1*ge(e))-.4906146*(r=.82521*ge(r))),ye(-.9787684*t+1.9161415*e+.033454*r),ye(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),L(xe,(function(e,t,r,n){return 1===arguments.length?ve(e):new xe(e,t,r,null==n?1:n)}),R(O,{brighter:function(e){return new xe(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new xe(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return qe(this).rgb()}}));var Ae,Ee=(
|
|
8
8
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
-
(Me={exports:{}}).exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,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,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=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"),(!(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,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(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+x},Me.exports);function Ee(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=/%$/,Ce=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,ke=/^\(oct\)/i,Ie=/^\(dec\)/i,Le=/^\(hex\)/i,Ne=/^\(bin\)/i,Te=/^\(rom\)/i,Oe=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Re=/#|0/g;function Pe(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 Fe(e,t,r){var n=Ee(e);return r?n:new RegExp(n||"",t)}function _e(e,t,r){var n,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=r)&&(f=Ee(f)),d&&(d=Ee(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=""),l=t,t=/,/.test(r)?"¤":",",l&&(o=o.replace(Fe(l,"g"),t)),u=r,r=".",u&&(o=o.replace(Fe(u,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Re)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=we.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Fe(t,null,!0),"|").concat(Fe(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}!function(){function e(t,r,n,i,o){ve(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 Ae;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()}qe(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],Oe.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Oe.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Oe.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||_e(n.positive,t,r),n.negative&&!n.negative.isFunctional&&_e(n.negative,t,r),n.zero&&!n.zero.isFunctional&&_e(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,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,r){var n;return Ce.test(t)?e=Pe(e,Number(/\d{2}/.exec(t)[0]),t,r):ke.test(t)?e=Pe(e,8,t,r):Ie.test(t)?e=Pe(e,10,t,r):Le.test(t)?e=Pe(e,16,t,r):Ne.test(t)?e=Pe(e,2,t,r):Te.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,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.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,u?u.length:0)).split(".")[0]),v=l.split(o)[0];if(e=Se(v+=o,b)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;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(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=Se(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 He=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ve=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ze=["January","February","March","April","May","June","July","August","September","October","November","December"],je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Be(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Ue(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){ve(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:He,qDayNames:Ve,qLongMonthNames:ze,qMonthNames:je}),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=(De(i={},"T",o.qTimeFmt||"hh:mm:ss"),De(i,"D",o.qDateFmt||"YYYY-MM-DD"),De(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}qe(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*Ue(t),n=60*Ue(r),i=60*Ue(n),o=1e3*Ue(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,l=n.f,u=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)&&(u=r?r.getDay()-1:0)<0&&(u=6);var c="";return r&&(c=r.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:Be("".concat(t.year).slice(-2),2),YYY:Be("".concat(t.year).slice(-3),3),def:function(e){return Be("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Be("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Be("".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 Be("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Be("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Be("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Be("".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),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,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in l[r])if(i===e||i.toLowerCase()===e){void 0===(n=l[r][i])&&(n=l[r][i.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}))}}])}();function We(e,t,r,n,i){var o=e.color||e.qDef.color;return o&&!o.auto&&o[r]?o[r].paletteColor:{index:i,color:t.getStyle("object.waterfallChart","shape.".concat(r),"fill")||n}}var Ke={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:"object.waterfallChart",getColorForPositiveValue:function(e,t){return t.getColorPickerColor(We(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(We(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(We(e,t,"subtotal","#c3c3c3",-1))}};function Ge(e){return!e.color.auto}function $e(e){var t=e.flags,r=e.translator,n={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:Ke.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:Ke.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:Ke.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:Ke.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:function(e){return e.qDef.valueType!==Ke.valueTypes.SUBTOTAL}},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:function(){return r.get("properties.waterfall.measureOperation.subtotal")},show:function(e){return e.qDef.valueType!==Ke.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}}},i={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},o={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:Ge},a={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:Ge},s={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:Ge},l={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:M(M({},i),{},{label:function(e){var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}}),positiveValueColor:o,negativeValueColor:a,subtotalColor:s}}}},u={translation:"properties.numberFormatting",type:"items",globalChange:function(e){e.qHyperCubeDef.qMeasures.forEach((function(t){t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:n,numberFormatting:u,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show:function(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:function(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{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}}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},colors:{translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:M(M({},i),{},{translation:"properties.colors"}),positiveValueColor:o,negativeValueColor:a,subtotalColor:s}},simpleColors:l,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:function(e){return be(e,"legend.show",!0)}}}}}},measureAxis:{uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},dimensionAxis:{uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},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 Ye(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:$e(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties:function(t,r,n){n.mapProperties();var i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return V({dataDefinition:P(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:function(e,t,r){return z({propertyTree:e,viewDataMode:r})}}}Object.freeze(Ke.valueTypes),Object.freeze(Ke);var Je=/xyz/.test((function(){}))?/\b_super\b/:/.*/,Xe=function(){};Xe.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]&&Je.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};var Qe={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 Ze(){return Qe.id()}function et(e,t,r){return"y"===e?tt(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function tt(e,t){var r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var rt={getAxisDock:et,getOppositeAxisDock:function(e,t,r){return et(e,"far"===t?"near":"far",r)},getYAxisDock:tt},nt=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),it=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),ot=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function at(e){return nt.test(e)}function st(e){return it.test(e)||ot.test(e)}var lt={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(at(r=e[t]))return"ltr";if(st(r))return"rtl"}return"ltr"}};var ut={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 q(!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"),q(!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(lt.lrm,"(").concat(n,")").concat(lt.lrm):"".concat(lt.lrm,"(").concat(n,")").concat(lt.lrm):!1!==t.showLabel?r:""}},ct={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}}};ct.DEFAULT_CHART_ORIENTATION=ct.HORIZONTAL;function pt(e,t){var r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||ct.DEFAULT_CHART_ORIENTATION,a=o===ct.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=ct.SHOW_AXIS_LABELS_OPTIONS,c=ct.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),f=r.includeDimensionAxis&&u.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=q(i,ct.LAYOUTSETTINGS.measureAxis);var o=ft(t,r);e.addComponent("".concat(r,"-axis"),i,o)}(e,r,s,n),d&&function(e,t,r){var n={text:t.measureTitleText};n=q(n,ct.LAYOUTSETTINGS.measureAxisTitle);var i=function(e,t){return ft(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=q(!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=q(n,ct.LAYOUTSETTINGS.dimensionAxis);var i=mt(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent("".concat(r,"-axis"),n,i)}(e,r,l),m&&function(e,t,r){var n={text:t.dimensionTitleText};n=q(n,ct.LAYOUTSETTINGS.dimensionAxisTitle);var i=function(e,t){return mt(e,t)}(t,r);e.addComponent("".concat(r,"-axis-title"),n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){var n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===ct.HORIZONTAL?ct.VERTICAL:ct.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=q(n,ct.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=q({},ct.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",o,i),dt(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=rt.getAxisDock(r,n.dock,t.isRtl),o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,ct.LAYOUTSETTINGS.refLines);var a={key:"ref-line-labels-".concat(Ze()),require:["renderer","chart"],dock:rt.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 l=12;return o.required+l>100?o.required+l:Math.min(o.wanted+l,100)},lines:{x:[],y:[]}};a=q(a,ct.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((function(n){if(n.show){var s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=ut.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);var c=ut.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"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",ct.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{});r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeDim"};o=q(o,ct.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,mt(r,l).dock,r.isRtl);r.enableMeasureRange&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeMeasure"};o=q(o,ct.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,ft(r,s).dock,r.isRtl);r.enableAreaRange&&r.selectionsEnabled&&function(e,t,r,n,i){var o={key:"rangeMinor"};o=q(o,ct.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,mt(r,l).dock,r.isRtl);r.brushActions&&dt(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function dt(e,t){t.forEach((function(t){e.push(t)}))}function ft(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function mt(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function ht(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 q(!0,{},o,e||{})}function gt(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"),l=t.theme.getStyle(r,"axis.title","color"),u=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:rt.getAxisDock(i,n,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 q(!0,{},f,e||{})}function yt(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"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:rt.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}ht.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=ht(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},ht.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 ht(q(!0,r,e||{}),t)},gt.xAxis=function(e,t){return gt(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},gt.yAxis=function(e,t){var r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:rt.getYAxisDock(r,n)};return gt(q(!0,i,e||{}),t)},yt.xAxisTitle=function(e,t){return yt(q(!0,{key:"x-axis-title"},e||{}),t)},yt.yAxisTitle=function(e,t){var r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:rt.getYAxisDock(r,n)||"left"};return yt(q(!0,i,e||{}),t)};var bt={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 vt={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 xt(){return vt}function qt(e){var t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}xt.getLayoutModeKeys=function(){var e,t=[];for(e in vt)t.push(e);return t};var Dt={left:"left",right:"right",up:"top",down:"bottom"};function Mt(e,t,r){switch(e){case"scale":return ht(t,r);case"measure-scale":return ht.measureScale(t,r);case"dimension-scale":return ht.dimensionScale(t,r);case"axis":return gt(t,r);case"box-marker":return function(e){return q(!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 q(!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 q(!0,{},o,e||{})}(t,r);case"text":return yt(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})})),q(!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,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:bt.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:bt.getBublesAlign(a,s,l)}}};return q(!0,{},u,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,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance,p=!0,d={type:"brush-area-dir",key:"area",displayOrder:99,dock:bt.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:bt.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:r?[r]:void 0,key:e,data:o,action:"add"})})),q(!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"),l=t.theme.getStyle(r,"legend.label","color"),u=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(Dt[t.direction])].join(" ")})}}}},style:{item:{label:{fontSize:u,fontFamily:t.theme.getStyle(r,"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 q(!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"),l=t.theme.getStyle(r,"legend.label","color"),u=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:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return gt.xAxis(t,r);case"y-axis":return gt.yAxis(t,r);case"x-axis-title":return yt.xAxisTitle(t,r);case"y-axis-title":return yt.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 q(!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 q(!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 q(!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 q(!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:qt}]}}}]}};return q(!0,{},o,e||{})}(t,r);default:return}}function St(e){this.options=e||{},this.settings={dockLayout:{layoutModes:xt()},components:[],scales:{}}}St.prototype.addComponent=function(e,t,r){var n=Mt(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},St.prototype.addInteraction=function(e,t){var r=Mt("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},St.prototype.addScale=function(e,t,r){var n=Mt(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},St.prototype.getSettings=function(){return this.settings},St.prototype.getComponent=function(e){return this.settings.components.filter((function(t){return t.key===e}))[0]},St.prototype.addPreset=function(e,t){!function(e,t,r){switch(e){case"dimension-measure-chart":pt(t,r);break;default:throw Error("There is no chart preset with that type")}}(e,this,t)},St.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}))},St.create=function(e){return new St(e)},St.createComponent=Mt;var Et={CENTER:0,BOTTOM:1},At={DISCLAIMERS:[{label:"NoDataExist",alignment:Et.CENTER,default:!0},{label:"RequireNumericDimension",alignment:Et.CENTER,default:!1},{label:"OnlyNanData",alignment:Et.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:Et.CENTER,default:!1},{label:"LimitedData",alignment:Et.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:Et.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:Et.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:Et.BOTTOM,default:!1}],ALIGNMENT:Et};var wt={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,At.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 Ct(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function kt(e,t){return e&&t&&t[e]}function It(e){this.environment=e,this.clear()}Ct.prototype.isValidAndSupported=function(e,t){return kt(e.label,this.dataAttributes)&&(e.default||kt(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Ct.prototype.isAnyValidDisclaimer=function(e){var t=!1,r=this;return this.disclaimersConfig.forEach((function(n){r.isValidAndSupported(n,e)&&(t=!0)})),t},Ct.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},It.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},It._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},It.prototype.getComponentSettings=function(){var e,t,r,n,i=this.environment.translator,o=q(!0,{},this.vizAttributes.supportedDisclaimers),a=new Ct(At.DISCLAIMERS,this.dataAttributes,o);if(a.isAnyValidDisclaimer(At.ALIGNMENT.CENTER))r=a.getMessage(At.ALIGNMENT.CENTER,i),n="center";else{if(!a.isAnyValidDisclaimer(At.ALIGNMENT.BOTTOM))return;r=a.getMessage(At.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)}}},It.prototype.set=function(e){if(this.clear(),!e)throw new Error(It.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=wt.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},It.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};var Lt=Xe.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 It(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:[St.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),St.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=q(!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:be(e,t.replace(/\//g,"."))}}));this.colorService&&a.push.apply(a,k(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}}}),Nt={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}},Tt=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,Ot=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Rt=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,Pt=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,Ft=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,_t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Ht=Math.floor,Vt=Math.round,zt=Xe.extend({init:function(){var e,t,r,n,i,o,a,s,l,u,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof zt)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)),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=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Vt(255*d),f=Vt(255*f),m=Vt(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)),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=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Vt(255*d),f=Vt(255*f),m=Vt(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=Vt(255*d),f=Vt(255*f),m=Vt(255*m),h=1}else Nt[p.toLowerCase()]?(r=p.toLowerCase(),d=Nt[r].r,f=Nt[r].g,m=Nt[r].b,h="number"==typeof Nt[r].a?Nt[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=Ht(d),this._g=Ht(f),this._b=Ht(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=zt.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=zt.toRGBA(this)),this._spaces.rgba},toString:function(){return this._spaces.rgb||(this._spaces.rgb=zt.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=zt.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=zt.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=zt.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=zt.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=zt.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 zt||(e=new zt(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend:function(e,t){var r=Ht(this._r+(e._r-this._r)*t),n=Ht(this._g+(e._g-this._g)*t),i=Ht(this._b+(e._b-this._b)*t),o=Ht(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 zt(n)}});zt.toRGB=function(e){if(e instanceof zt)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=zt.toNumber(e));var t=(65280&e)>>8,r=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(r,")")},zt.toRGBA=function(e,t){if(e instanceof zt)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=zt.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,")")},zt.toHex=function(e){var t,r,n;return e instanceof zt?(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=zt.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))},zt.toHSL=function(e,t){var r,n,i,o=0;"string"==typeof e&&(e=new zt(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(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.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*r,",").concat(100*n,")")},zt.toHSLA=function(e,t){var r,n,i,o=0;"string"==typeof e&&(e=new zt(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(n=t?.21*a+.72*s+.07*l:(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-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*r,",").concat(100*n,",").concat(u,")")},zt.toHSVComponents=function(e){var t,r,n=0;"string"==typeof e&&(e=new zt(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,n=0;else{switch(t=0===(r=s-l)?0:r/u,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*u}},zt.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof zt)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},zt.blend=function(e,t,r){var n=(16711680&(e=zt.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=zt.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},zt.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 zt(n,i,o,a)},zt.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Tt.test(e)||Ot.test(e)||Rt.test(e)||Pt.test(e)||Ft.test(e)||_t.test(e)||Nt[e.toLowerCase()])},zt.getBestContrast=function(e,t,r){var n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},zt.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)}},zt.isDark=function(){var e={getLuminance:zt.prototype.getLuminance,isInvalid:zt.prototype.isInvalid};return zt.prototype.init.apply(e,[].slice.call(arguments)),zt.prototype.isDark.call(e)},zt.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};var jt={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 zt(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey:function(e){var t=new zt(e);return 0===t.getAlpha()?this.DARK_GREY:zt.getBestContrast(t,new zt(jt.LIGHT_GREY),new zt(jt.DARK_GREY))},getBestContrast:function(e,t,r){return zt.getBestContrast(new zt(e),new zt(t),new zt(r))},getContrastingTransparent:function(e){var t=new zt(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}},Bt=".scrollHandler";function Ut(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 Wt(){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 Kt(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 Gt(){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){}))}}Ut.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},Ut.prototype.setDisabled=function(e){this._disabled=e},Ut.prototype.getDisabled=function(){return this._disabled},Ut.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,Wt.call(this))},Ut.prototype.getItemSize=function(){return this._itemSize},Ut.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Wt.call(this);return this._scrollViewSizeInItem},Ut.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Gt.bind(this)));this._$chartElement.on("mousewheel".concat(Bt," DOMMouseScroll").concat(Bt),Kt.bind(this)),this._$chartElement.on("touchstart".concat(Bt),(function(e){e.preventDefault()})),this._on=!0},Ut.prototype.isOn=function(){return this._on},Ut.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(Bt),this._on=!1},Ut.prototype.updateViewState=function(e){Wt.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},Ut.prototype.onResize=function(){this._sizeChanged=!0,Wt.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},Ut.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},Ut.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},Ut.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)},Ut.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},Ut.prototype.getScrollState=function(){return this.getScrollApi().getState().start},Ut.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var $t={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 Yt={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable:function(n,i){if(e.lassoing)return t.isSelectionEnabled();var o,a=$t.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){$t.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 Jt={callMeasureRangeGesture:function(e,t,r,n){var i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.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=$t.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];$t.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 Xt(e,t){return"x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL}var Qt={callAreaRangeGesture:function(e,t,r,n){var i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Xt(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=$t.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];$t.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 Zt={callDimensionRangeGesture:function(e,t,r,n){var i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.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=$t.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];$t.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 er={callDragGesture:function(e,t,r,n,i){var o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.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 tr={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable:function(r,n){return!(!n||!e())&&$t.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 rr={create:function(e,t,r,n,i){var o={};t=t||"vertical";var a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=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=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}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=[],x={isSelectionEnabled:function(){return e.selectionHandler&&e.selectionHandler.isOn()},isNavigationEnabled:function(){return e.scrollHandler&&e.scrollHandler.isOn()},doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={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(tr.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Yt.callLassoGesture(d,x,q)),s?l?(v.push(Zt.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Jt.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Zt.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Qt.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Jt.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(Qt.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(er.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function nr(e,t,r,n,i){var o=!1;n=n||"tooltip",r=r||["self"];var a=e.brush(n),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(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;var r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},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 ir=function(){return nr.apply(void 0,arguments)},or={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 ar=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=[],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 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 l=function(e){for(var t=-1,r=0;r<e.length;r++)-3===e[r]&&(t=r);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),n.push(a)}},s=0;s<o;s++){var l=a(s);if("object"===S(l))return l.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 sr="#".concat("dist-flow-tooltip");function lr(){if(!document.querySelector(sr)){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 ur(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(){lr()},beforeUpdate:function(){lr()},destroyed:function(){var e;(e=document.querySelector(sr))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(sr)},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 cr=lt.detectTextDirection;var pr={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:function(e){return e.join(", ")},rowResolver:function(e,t){return{value:or.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=M(M({},n.cell),{},{textAlign:s,fontWeight:"bold",direction:cr(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"},l=r("div",{style:i});t=o?[e.value,l]:[l,e.value]}var u=o?[":",e.label]:[e.label,":"],c=M(M({},n.cell),{},{textAlign:s,direction:cr(e.label)}),p=M(M({},n.cell),{},{textAlign:o?"left":"right",direction:cr(e.value)});a.push(r("tr",null,r("td",{style:c},u),r("td",{style:p},t)))}))})),t.numberInExcess){var l=i.get("Object.ChartTooltip.NMore",t.numberInExcess),u=M(M({},n.cell),{},{textAlign:s,direction:cr(l)});a.push(r("tr",null,r("td",{style:u,colSpan:2},l)))}return a}};function dr(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){l(n[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(n).forEach((function(e){n[e].action.closeTooltip()}))}function c(){for(var e in u(),n)n[e].brush.clear()}return o.setUp=function(t){var o=q(!0,{},pr,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);var s=function(e,t){return{brush:t.brush(e.contexts[0]),action:ir(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 u,c=ur({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"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:ar(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=u,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),u())},o}var fr=function(e,t,r){return dr(e,t,r)};function mr(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11}function hr(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 gr(e,t){var r={latin:0,cjk:0};void 0===t?e.forEach((function(e){var t=hr(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((function(e){var n=hr(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 yr(e,t,r){return e*(e<=24?t:r)}var br={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:mr,getCharacterRatios:hr,getTotalCharacterRatios:gr,getAdjustedMaxGlyphCount:function(e,t,r){var n=gr(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(mr(i)+1.0909090909090908*o)},estimateLatinLabelWidth:yr,estimateLabelWidth:function(e,t,r,n,i){return e*r+yr(t,n,i)}};var vr={generateHyperCube:function(e,t){var r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(i){for(var o,a,s=Ke.getColorForPositiveValue(e,t),l=Ke.getColorForNegativeValue(e,t),u=Ke.getColorForSubtotal(e,t),c=function(e){return"".concat(e)},p=[],d=0,f=0,m=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0,v=0;v<i;v++)a=Number.isNaN(+n[0][v].qNum)?0:n[0][v].qNum,r[v].valueType!==Ke.valueTypes.SUBTOTAL?(o=(d=f)<(f+=a*(r[v].valueType===Ke.valueTypes.INVERSE?-1:1))?s:l,p.push([{qText:r[v].qFallbackTitle,qElemNumber:b++},{qText:o},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][v].qText}]),r[v].subtotal&&r[v].subtotal.enable&&p.push([{qText:r[v].subtotal.label||"",qElemNumber:b++},{qText:u},{qNum:0},{qNum:f},{qNum:f,qText:c(f)}])):(d=0,f=a,p.push([{qText:r[v].qFallbackTitle,qElemNumber:b++},{qText:u},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][v].qText}])),m=Math.max(m,d),h=Math.min(h,d),g=Math.max(g,f),y=Math.min(y,f);var x=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),q=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,D=e.qDef.isCustomFormatted,M={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:p.length},qMatrix:p}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:m,qNumFormat:x,qIsAutoFormat:q,isCustomFormatted:D},{qMin:y,qMax:g,qNumFormat:x,qIsAutoFormat:q,isCustomFormatted:D},{qMin:y,qMax:g,qNumFormat:x,qIsAutoFormat:q,isCustomFormatted:D}]}};e.generatedMatrix=p,e.generated=M}},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return"qDimensionInfo/".concat(e)},getGeneratedMeasurePath:function(e){return"qMeasureInfo/".concat(e)}};function xr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var qr,Dr,Mr=(1===(qr=xr).length&&(Dr=qr,qr=function(e,t){return xr(Dr(e),t)}),{left:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;qr(e[i],t)<0?r=i+1:n=i}return r},right:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;qr(e[i],t)>0?n=i:r=i+1}return r}}).right,Sr=Math.sqrt(50),Er=Math.sqrt(10),Ar=Math.sqrt(2);function wr(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=Sr?10:o>=Er?5:o>=Ar?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Sr?10:o>=Er?5:o>=Ar?2:1)}function Cr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function kr(){}function Ir(e,t){var r=new kr;if(e instanceof kr)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,i=-1,o=e.length;if(null==t)for(;++i<o;)r.set(i,e[i]);else for(;++i<o;)r.set(t(n=e[i],i,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function Lr(){}kr.prototype=Ir.prototype={constructor:kr,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var Nr=Ir.prototype;Lr.prototype={constructor:Lr,has:Nr.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Nr.remove,clear:Nr.clear,values:Nr.keys,size:Nr.size,empty:Nr.empty,each:Nr.each};var Tr=Array.prototype,Or=Tr.map,Rr=Tr.slice;function Pr(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Fr(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function _r(){}var Hr=1/.7,Vr="\\s*([+-]?\\d+)\\s*",zr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",jr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Br=/^#([0-9a-f]{3,8})$/,Ur=new RegExp("^rgb\\("+[Vr,Vr,Vr]+"\\)$"),Wr=new RegExp("^rgb\\("+[jr,jr,jr]+"\\)$"),Kr=new RegExp("^rgba\\("+[Vr,Vr,Vr,zr]+"\\)$"),Gr=new RegExp("^rgba\\("+[jr,jr,jr,zr]+"\\)$"),$r=new RegExp("^hsl\\("+[zr,jr,jr]+"\\)$"),Yr=new RegExp("^hsla\\("+[zr,jr,jr,zr]+"\\)$"),Jr={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 Xr(){return this.rgb().formatHex()}function Qr(){return this.rgb().formatRgb()}function Zr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Br.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?en(t):3===r?new on(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?tn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?tn(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=Ur.exec(e))?new on(t[1],t[2],t[3],1):(t=Wr.exec(e))?new on(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Kr.exec(e))?tn(t[1],t[2],t[3],t[4]):(t=Gr.exec(e))?tn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$r.exec(e))?un(t[1],t[2]/100,t[3]/100,1):(t=Yr.exec(e))?un(t[1],t[2]/100,t[3]/100,t[4]):Jr.hasOwnProperty(e)?en(Jr[e]):"transparent"===e?new on(NaN,NaN,NaN,0):null}function en(e){return new on(e>>16&255,e>>8&255,255&e,1)}function tn(e,t,r,n){return n<=0&&(e=t=r=NaN),new on(e,t,r,n)}function rn(e){return e instanceof _r||(e=Zr(e)),e?new on((e=e.rgb()).r,e.g,e.b,e.opacity):new on}function nn(e,t,r,n){return 1===arguments.length?rn(e):new on(e,t,r,null==n?1:n)}function on(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function an(){return"#"+ln(this.r)+ln(this.g)+ln(this.b)}function sn(){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 ln(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function un(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pn(e,t,r,n)}function cn(e){if(e instanceof pn)return new pn(e.h,e.s,e.l,e.opacity);if(e instanceof _r||(e=Zr(e)),!e)return new pn;if(e instanceof pn)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new pn(a,s,l,e.opacity)}function pn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function dn(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 fn(e){return function(){return e}}function mn(e){return 1==(e=+e)?hn: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):fn(isNaN(t)?r:t)}}function hn(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):fn(isNaN(e)?t:e)}Pr(_r,Zr,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Xr,formatHex:Xr,formatHsl:function(){return cn(this).formatHsl()},formatRgb:Qr,toString:Qr}),Pr(on,nn,Fr(_r,{brighter:function(e){return e=null==e?Hr:Math.pow(Hr,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new on(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:an,formatHex:an,formatRgb:sn,toString:sn})),Pr(pn,(function(e,t,r,n){return 1===arguments.length?cn(e):new pn(e,t,r,null==n?1:n)}),Fr(_r,{brighter:function(e){return e=null==e?Hr:Math.pow(Hr,e),new pn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new pn(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 on(dn(e>=240?e-240:e+120,i,n),dn(e,i,n),dn(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 gn=function e(t){var r=mn(t);function n(e,t){var n=r((e=nn(e)).r,(t=nn(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=hn(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);function yn(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function bn(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=En(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function vn(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function xn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function qn(e,t){var r,n={},i={};for(r in null!==e&&"object"===S(e)||(e={}),null!==t&&"object"===S(t)||(t={}),t)r in e?n[r]=En(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var Dn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(Dn.source,"g");function Sn(e,t){var r,n,i,o=Dn.lastIndex=Mn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=Dn.exec(e))&&(n=Mn.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:xn(r,n)})),o=Mn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function En(e,t){var r,n,i=S(t);return null==t||"boolean"===i?fn(t):("number"===i?xn:"string"===i?(r=Zr(t))?(t=r,gn):Sn:t instanceof Zr?gn:t instanceof Date?vn:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?bn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?qn:xn:yn))(e,t)}function An(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function wn(e){return+e}var Cn=[0,1];function kn(e){return e}function In(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function Ln(e){var t,r=e[0],n=e[e.length-1];return r>n&&(t=r,r=n,n=t),function(e){return Math.max(r,Math.min(n,e))}}function Nn(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=In(i,n),o=r(a,o)):(n=In(n,i),o=r(o,a)),function(e){return o(n(e))}}function Tn(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=In(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=Mr(e,t,1,n)-1;return o[r](i[r](t))}}function On(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Rn(e,t){return function(){var e,t,r,n,i,o,a=Cn,s=Cn,l=En,u=kn;function c(){return n=Math.min(a.length,s.length)>2?Tn:Nn,i=o=null,p}function p(t){return isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),xn)))(r)))},p.domain=function(e){return arguments.length?(a=Or.call(e,wn),u===kn||(u=Ln(a)),c()):a.slice()},p.range=function(e){return arguments.length?(s=Rr.call(e),c()):s.slice()},p.rangeRound=function(e){return s=Rr.call(e),l=An,c()},p.clamp=function(e){return arguments.length?(u=e?Ln(a):kn,p):u!==kn},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}()(e,t)}function Pn(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Fn(e){return(e=Pn(Math.abs(e)))?e[1]:NaN}var _n,Hn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vn(e){if(!(t=Hn.exec(e)))throw new Error("invalid format: "+e);var t;return new zn({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function zn(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function jn(e,t){var r=Pn(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}Vn.prototype=zn.prototype,zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Bn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return jn(100*e,t)},r:jn,s:function(e,t){var r=Pn(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(_n=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Pn(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Un(e){return e}var Wn,Kn,Gn,$n=Array.prototype.map,Yn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Jn(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?Un:(t=$n.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Un:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}($n.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=Vn(e)).fill,r=e.align,p=e.sign,d=e.symbol,f=e.zero,m=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):Bn[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===r)&&(f=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=Bn[b],D=/[defgprs%]/.test(b);function M(e){var i,o,l,d=v,M=x;if("c"===b)M=q(e)+M,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==p&&(S=!1),d=(S?"("===p?p:u:"-"===p||"("===p?"":p)+d,M=("s"===b?Yn[8+_n/3]:"")+M+(S&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){M=(46===l?a+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}h&&!f&&(e=n(e,1/0));var E=d.length+e.length+M.length,A=E<m?new Array(m-E+1).join(t):"";switch(h&&f&&(e=n(A+e,A.length?m-M.length:1/0),A=""),r){case"<":e=d+e+M+A;break;case"=":e=d+A+e+M;break;case"^":e=A.slice(0,E=A.length>>1)+d+e+M+A.slice(E);break;default:e=A+d+e+M}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:p,formatPrefix:function(e,t){var r=p(((e=Vn(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(Fn(t)/3))),i=Math.pow(10,-n),o=Yn[8+n/3];return function(e){return r(i*e)+o}}}}function Xn(e,t,r,n){var i,o=function(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=Sr?i*=10:o>=Er?i*=5:o>=Ar&&(i*=2),t<e?-i:i}(e,t,r);switch((n=Vn(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fn(t)/3)))-Fn(Math.abs(e)))}(o,a))||(n.precision=i),Gn(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fn(t)-Fn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-Fn(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Kn(n)}function Qn(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){var n,i,o,a,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t<e)&&(i=e,e=t,t=i),0===(a=wr(e,t,r))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return n&&o.reverse(),o}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return Xn(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(n=s,s=l,l=n,n=o,o=a,a=n),(n=wr(s,l,r))>0?n=wr(s=Math.floor(s/n)*n,l=Math.ceil(l/n)*n,r):n<0&&(n=wr(s=Math.ceil(s*n)/n,l=Math.floor(l*n)/n,r)),n>0?(i[o]=Math.floor(s/n)*n,i[a]=Math.ceil(l/n)*n,t(i)):n<0&&(i[o]=Math.ceil(s*n)/n,i[a]=Math.floor(l*n)/n,t(i)),e},e}function Zn(){var e=Rn(kn,kn);return e.copy=function(){return On(e,Zn())},Cr.apply(e,arguments),Qn(e)}Wn=Jn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Kn=Wn.format,Gn=Wn.formatPrefix;var ei={getMinorTicks:function(e){for(var t=e.majorTicks,r=e.minorTickCount,n=[],i=0;i<t.length-1;i++)for(var o=t[i],a=(t[i+1]-o)/(r+1),s=1;s<=r;s++)n.push(o+a*s);return n},adjustTicks:function(e){var t=e.ticks,r=e.majorTicks,n=e.minorTicks,i=e.autoMinMax,o=e.minMax,a=e.min,s=e.max,l=n[0]-r[0],u=r[0]-a;u>l&&t.unshift({value:r[0]-l,isMinor:!0});var c=s-r[r.length-1];return c>l&&t.push({value:r[r.length-1]+l,isMinor:!0}),i||(("min"===o||"minMax"===o)&&u>0&&t.unshift({value:a,isMinor:!1}),("max"===o||"minMax"===o)&&c>0&&t.push({value:s,isMinor:!1})),t},getTicks:function(e){var t=e.layout,r=e.height,n=t.measureAxis,i=n.autoMinMax,o=n.minMax,a=n.spacing,s=Math.min.apply(Math,k(t.generated.qHyperCube.qMeasureInfo.map((function(e){return e.qMin})))),l=Math.max.apply(Math,k(t.generated.qHyperCube.qMeasureInfo.map((function(e){return e.qMax}))));if(!i)switch(o){case"min":s=t.measureAxis.min;break;case"max":l=t.measureAxis.max;break;case"minMax":var u=t.measureAxis;s=u.min,l=u.max}var c=100*a,p=Math.max(1,Math.round(r/c)),d=Zn().domain([s,l]).ticks(p),f=ei.getMinorTicks({majorTicks:d,minorTickCount:1}),m=[].concat(k(d.map((function(e){return{value:e,isMinor:!1}}))),k(f.map((function(e){return{value:e,isMinor:!0}})))).sort((function(e,t){return e.value-t.value}));return ei.adjustTicks({ticks:m,majorTicks:d,minorTicks:f,autoMinMax:i,minMax:o,min:s,max:l})}},ti=Ke.chartID;function ri(e){this._scrollHandler.setDisabled(!!e)}function ni(e){var t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((function(e){t=Math.max(t,e.qFallbackTitle.length),e.valueType!==Ke.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function ii(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(br.stringWidthOverMWidth(ni(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function oi(e){var t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return or.formatMeasureValue(r,t)}function ai(e){var t=e.getStyle(ti,"value.color","default"),r=e.getStyle(ti,"value.color","dark"),n=e.getStyle(ti,"value.color","light");return{settings:{sources:[{strategy:{settings:{direction:function(e){return e.data&&e.data.end.value>e.data.start.value?"up":"down"},labels:[{placements:[{fill:t},{fill:function(e){return function(e,t,r){return jt.getBestContrast(e,t,r)}(e.data.boxColor.value,r,n)}},{position:"opposite",fill:t,justify:0}],label:oi}]}}}]}}}function si(e,t){return{viewSize:t,max:e.generatedMatrix.length}}var li=Lt.extend("WaterfallChart",{namespace:".waterfallchart",chartID:ti,init:function(e){var t=e.picasso,r=e.environment,n=e.$element;this._super(t,n,r,null,null),this._tooltipHandler=fr(this.chartInstance,n,ti),this._scrollHandler=new Ut(this.chartInstance,n,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"])},updateConstraints:function(e){var t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){var t=this,r=this.isRtl(),n=this.environment.theme,i=!!e.snapshotData,o=St.create({chartID:ti,theme:n,isRtl:r}),a=this.picassoElement.clientWidth,s=this.picassoElement.clientHeight,l={};l.box=this._tooltipHandler.setUp({chartBuilder:o,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver:function(){},rowResolver:function(e,t,r){var n=r.boxColor.value;return{value:or.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});var u={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=rr.create(u,"vertical",r,{componentKey:"box-marker"}),o.addPreset("dimension-measure-chart",{isRtl:r,orientation:"vertical",theme:n,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:ii.call(this,e),dimensionSource:vr.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:function(){return s/4}}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[vr.getGeneratedMeasurePath(0),vr.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:function(){return ei.getTicks({layout:e,height:s})}}}},hasNavigation:!i,isNavigationEnabledFn:function(){return t._scrollHandler.isOn()},scrollSettings:si(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures}),o.addComponent("box-marker",function(e,t){var r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:vr.getGeneratedDimensionPath(0),props:{start:{field:vr.getGeneratedMeasurePath(0)},end:{field:vr.getGeneratedMeasurePath(1)},measure:{field:vr.getGeneratedMeasurePath(2),reduce:"first",value:function(e){return e}},boxColor:{field:vr.getGeneratedDimensionPath(1),value:function(e){return e.qText}},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:function(e){return e}}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:function(e){return e.datum.boxColor.value},strokeWidth:0}},brush:{trigger:r,consume:n}}}(l,e)),o.addComponent("point-marker",function(e,t){var r=t.getStyle(ti,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:vr.getGeneratedDimensionPath(0),props:{x:{},y:{field:vr.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:function(t){return e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()}},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:function(e,t){return t===e.data.items.length-1?0:2}}}}(r,n)),e.legend&&!e.legend.show||o.addComponent("categorical-legend",function(e,t){var r=e.theme,n=e.translator,i=Ke.getColorForPositiveValue(t,r),o=Ke.getColorForNegativeValue(t,r),a=Ke.getColorForSubtotal(t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[n.get("waterfall.legend.positiveValue.label"),n.get("waterfall.legend.negativeValue.label"),n.get("waterfall.legend.subtotal.label")],range:[i,o,a]},style:{title:{show:!1}}}}(this.environment,e),{dock:e.legend?e.legend.dock:"auto",isRtl:r,chartWidth:a,chartHeight:s}),e.dataPoint.showLabels&&o.addComponent("labels",ai(n));var c=o.getSettings();return this.addSnapshotChartSettings(c,e),c},updateData:function(e){var t=this.environment,r=t.theme,n=t.options,i=this;return this._super(e).then((function(){if(i._destroyed)return Promise.reject();var t,o;if(!!e.snapshotData){var a=i.layout.generated.qHyperCube.qDataPages[0].qArea;t=a.qTop,o=a.qHeight,vr.generateHyperCube(i.layout,r)}else{vr.generateHyperCube(i.layout,r),ri.call(i,!0);var s=n.viewState;s?(i._scrollHandler.updateViewState(i.layout.generatedMatrix.length),i._scrollHandler.setScrollState(s.scroll),t=s.scroll):(i._scrollHandler.resetScroll(),t=0),o=i._scrollHandler.getScrollViewSizeInItem()}vr.generateSlicedHyperCube(i.layout,t,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){var e=!!this.layout.snapshotData;e||this.environment.options.viewState||ri.call(this,!1),this._tooltipHandler.closeTooltip();var t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){var n=this._super,i=this;return this._scrollHandler.getViewData().finally((function(){return n.call(i)}))}return this._super()},getSlicedData:function(e,t){return vr.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function ui(q){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((function(t){e.add(N[t])}))}}(q.translator);var D=function(){var e=y();return e.renderer.prio(["canvas"]),e.use(b),e.use(v(x)),e.use(T),e.component("disclaimer",O),e}();return{qae:j(q),ext:Ye(q),component:function(){var y,b,v,x,q,M,S,E=d(),w=(y=i(),b=o(),v=a(),x=t(),q=s(),M=l(),u((function(){return{app:y,appLayout:b,deviceType:v,options:x,theme:q,translator:M}}),[y,b,x.direction,x.freeResize,M.language(),q.name(),v])),k=f(),I=r(),L=C(m(),2),N=L[0],T=L[1];h((function(){var e=g(E),t=new li({picasso:D,environment:w,$element:e});return T(t),function(){t.destroy()}}),[]),function(){var e=C(n.apply(void 0,arguments),2)[1];if(e)throw e}(A(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=2;break}return e.abrupt("return");case 2:return N.updateEnvironment(w),N.updateConstraints(I),e.next=6,N.updateData(k);case 6:return e.next=8,N.paint();case 8:case"end":return e.stop()}}),e)}))),[k,N,w]),function(i){var o=e(),a=t(),s=r(),l=C(n(A(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return");case 2:return i.updateConstraints(s),i.options=a,e.next=6,i.resize();case 6:case"end":return e.stop()}}),e)}))),[o.width,o.height]),2)[1];if(l)throw l}(N),S=N,c((function(e){if(S)return S.setSnapshotData(e)})),p((function(){return{getViewState:function(){if(S)return S.getViewState()}}}),[S])}}}export{ui as default};
|
|
9
|
+
(Ae={exports:{}}).exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,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,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=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"),(!(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,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(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+x},Ae.exports);function Te(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var ke={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"},Ie=/%$/,Ne=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Le=/^\(oct\)/i,Re=/^\(dec\)/i,Oe=/^\(hex\)/i,Fe=/^\(bin\)/i,Pe=/^\(rom\)/i,_e=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,He=/#|0/g;function Ve(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 ze(e,t,r){var n=Te(e);return r?n:new RegExp(n||"",t)}function je(e,t,r){var n,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=r)&&(f=Te(f)),d&&(d=Te(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=""),l=t,t=/,/.test(r)?"¤":",",l&&(o=o.replace(ze(l,"g"),t)),u=r,r=".",u&&(o=o.replace(ze(u,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(He)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=Ie.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(ze(t,null,!0),"|").concat(ze(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}!function(){function e(t,r,n,i,o){Me(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 ke;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()}we(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],_e.test(e[0])&&(n.positive.isFunctional=!0),e[1]?_e.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?_e.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||je(n.positive,t,r),n.negative&&!n.negative.isFunctional&&je(n.negative,t,r),n.zero&&!n.zero.isFunctional&&je(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,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,r){var n;return Ne.test(t)?e=Ve(e,Number(/\d{2}/.exec(t)[0]),t,r):Le.test(t)?e=Ve(e,8,t,r):Re.test(t)?e=Ve(e,10,t,r):Oe.test(t)?e=Ve(e,16,t,r):Fe.test(t)?e=Ve(e,2,t,r):Pe.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,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.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,u?u.length:0)).split(".")[0]),v=l.split(o)[0];if(e=Ee(v+=o,b)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;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(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=Ee(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 Ue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Be=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],We=["January","February","March","April","May","June","July","August","September","October","November","December"],$e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ye(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Ke(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){Me(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Ue,qDayNames:Be,qLongMonthNames:We,qMonthNames:$e}),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=(Ce(i={},"T",o.qTimeFmt||"hh:mm:ss"),Ce(i,"D",o.qDateFmt||"YYYY-MM-DD"),Ce(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}we(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*Ke(t),n=60*Ke(r),i=60*Ke(n),o=1e3*Ke(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,l=n.f,u=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)&&(u=r?r.getDay()-1:0)<0&&(u=6);var c="";return r&&(c=r.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:Ye("".concat(t.year).slice(-2),2),YYY:Ye("".concat(t.year).slice(-3),3),def:function(e){return Ye("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Ye("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ye("".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 Ye("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Ye("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Ye("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Ye("".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),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,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in l[r])if(i===e||i.toLowerCase()===e){void 0===(n=l[r][i])&&(n=l[r][i.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}))}}])}();function Ge(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle("object.waterfallChart","shape."+r,"fill")||n}}return o[r].paletteColor}const Ze={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:"object.waterfallChart",getColorForPositiveValue:function(e,t){return t.getColorPickerColor(Ge(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(Ge(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(Ge(e,t,"subtotal","#c3c3c3",-1))}};function Je(e){return!e.color.auto}function Xe(e){const{flags:t,translator:r}=e,n={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:Ze.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:Ze.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:Ze.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:Ze.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==Ze.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>r.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==Ze.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},i={type:"items",translation:"properties.presentation",grouped:!0,items:{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:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},o={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},a={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:Je},s={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:Je},l={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:Je},u={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...o,label:e=>{var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:a,negativeValueColor:s,subtotalColor:l}}}},c={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach((t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:n,numberFormatting:c,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:i,colors:{translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...o,translation:"properties.colors"},positiveValueColor:a,negativeValueColor:s,subtotalColor:l}},simpleColors:u,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>De(e,"legend.show",!0)}}}}},measureAxis:{uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},dimensionAxis:{uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},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 Qe(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:Xe(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,r,n){n.mapProperties();const i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return k({dataDefinition:C(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>I({propertyTree:e,viewDataMode:r})}}Object.freeze(Ze.valueTypes),Object.freeze(Ze);const et=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,tt=function(){};tt.extend=function e(t,r){const n=this.prototype;"string"!=typeof t&&(r=t,t="Class");const i=Object.create(this.prototype);for(const e in r)i[e]="function"==typeof r[e]&&"function"==typeof n[e]&&et.test(r[e])?function(e,t){return function(){const r=this._super;this._super=n[e];const i=t.apply(this,arguments);return this._super=r,i}}(e,r[e]):r[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const rt={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=(""+r).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function nt(){return rt.id()}function it(e,t,r){return"y"===e?ot(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function ot(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var at={getAxisDock:it,getOppositeAxisDock:function(e,t,r){return it(e,"far"===t?"near":"far",r)},getYAxisDock:ot};const st=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),lt=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),ut=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function ct(e){return st.test(e)}function pt(e){return lt.test(e)||ut.test(e)}var dt={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],ct(n))return"ltr";if(pt(n))return"rtl"}return"ltr"}};var ft={lineSettings:function(e,t){var r;const 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 q(!0,n,e||{})},lineLabelSettings:function(e,t){const r=t&&t.chartID;let n=t.theme.getStyle(r,"referenceLine.label.name","color");const 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"),q(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:r}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${dt.lrm}(${r})${dt.lrm}`:`${dt.lrm}(${r})${dt.lrm}`:!1!==e.showLabel?t:""}};const mt={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}}};mt.DEFAULT_CHART_ORIENTATION=mt.HORIZONTAL;function ht(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||mt.DEFAULT_CHART_ORIENTATION,a=o===mt.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=mt.SHOW_AXIS_LABELS_OPTIONS,c=mt.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),f=r.includeDimensionAxis&&u.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((e=>e.show)),y=[];if(p&&function(e,t,r,n){let i={scale:"measure",forceBounds:n&&!n.autoMinMax&&n.showBounds};i=q(i,mt.LAYOUTSETTINGS.measureAxis);const o=yt(t,r);e.addComponent(r+"-axis",i,o)}(e,r,s,n),d&&function(e,t,r){let n={text:t.measureTitleText};n=q(n,mt.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return yt(e,t)}(t,r);e.addComponent(r+"-axis-title",n,i)}(e,r,s),function(e,t,r,n){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=q(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),f&&function(e,t,r){let n={scale:"dimension"};n=q(n,mt.LAYOUTSETTINGS.dimensionAxis);const i=bt(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent(r+"-axis",n,i)}(e,r,l),m&&function(e,t,r){let n={text:t.dimensionTitleText};n=q(n,mt.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return bt(e,t)}(t,r);e.addComponent(r+"-axis-title",n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){const n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===mt.HORIZONTAL?mt.VERTICAL:mt.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){let n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};n=q(n,mt.LAYOUTSETTINGS.gridLines),n[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}};const i={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},o=q({},mt.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",o,i),gt(t,function(e){function t(t,r){if(!r||!e())return!1;const n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some((e=>"scrollbar"===e.settings.key))}return[{type:"Tap",options:{enable:t},events:{tap(e){this.chart.component("scrollbar").emit("tap",e)}}},{type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component("scrollbar").emit("panStart",e)},pan(e){this.chart.component("scrollbar").emit("panMove",e)},panend(e){this.chart.component("scrollbar").emit("panEnd",e)},pancancel(e){this.chart.component("scrollbar").emit("panCancel",e)}}}]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=at.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,mt.LAYOUTSETTINGS.refLines);let a={key:"ref-line-labels-"+nt(),require:["renderer","chart"],dock:at.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize(){if("x"===r)return 26;const t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const r=!1!==e.label.showValue?`(${n(e.value)})`:"",i=`${e.label.text} ${r}`,o=e.label.text&&r?" "+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];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=q(a,mt.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((n=>{if(!n.show)return;const s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=ft.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=ft.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"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){const r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",mt.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{})}if(r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeDim"};o=q(o,mt.LAYOUTSETTINGS.rangeDim);const 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,bt(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,mt.LAYOUTSETTINGS.rangeMeasure);const 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,yt(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,mt.LAYOUTSETTINGS.rangeMinor);const 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,bt(r,l).dock,r.isRtl)}r.brushActions&>(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function gt(e,t){t.forEach((t=>{e.push(t)}))}function yt(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function bt(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function vt(e,t){const 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 q(!0,{},o,e||{})}function xt(e,t){const 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"),l=t.theme.getStyle(r,"axis.title","color"),u=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:at.getAxisDock(i,n,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 q(!0,{},f,e||{})}function qt(e,t){const 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"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:at.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}vt.measureScale=function(e,t){let r=(t||{}).source||[];"string"==typeof r&&(r=[r]);const n={name:"measure",component:{expand:.1,data:{fields:r.map((e=>({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));const o=vt(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},vt.dimensionScale=function(e,t){const r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return vt(q(!0,r,e||{}),t)},xt.xAxis=function(e,t){return xt(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},xt.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:at.getYAxisDock(r,n)};return xt(q(!0,i,e||{}),t)},qt.xAxisTitle=function(e,t){return qt(q(!0,{key:"x-axis-title"},e||{}),t)},qt.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:at.getYAxisDock(r,n)||"left"};return qt(q(!0,i,e||{}),t)};var Dt={getBublesAlign:function(e,t,r){let n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){const r=[];let n;return e&&r.push("@"+e),t&&r.push("@"+t),r.length&&(n=r.join(",")),n}};const Mt={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 St(){return Mt}function wt(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}St.getLayoutModeKeys=function(){const e=[];let t;for(t in Mt)e.push(t);return e};const Ct={left:"left",right:"right",up:"top",down:"bottom"};function At(e,t,r){switch(e){case"scale":return vt(t,r);case"measure-scale":return vt.measureScale(t,r);case"dimension-scale":return vt.dimensionScale(t,r);case"axis":return xt(t,r);case"box-marker":return function(e){return q(!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 q(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const 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 q(!0,{},o,e||{})}(t,r);case"text":return qt(t,r);case"lasso":return function(e,t){const 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((e=>{o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})})),q(!0,{},o,e||{})}(t,r);case"range":return function(e,t){const r=t&&t.brushKey,n=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:Dt.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:Dt.getBublesAlign(a,s,l)}}};return q(!0,{},u,e||{})}(t,r);case"range-area":return function(e,t){const 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,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Dt.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:Dt.getBublesAlign(s,l,u),label:e=>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((e=>{d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})})),q(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");const a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),l=t.theme.getStyle(r,"legend.label","color"),u=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:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon","lui-icon--triangle-"+Ct[t.direction]].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:t.theme.getStyle(r,"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 q(!0,{},p,e)}(t,r);case"sequential-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");const o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),l=t.theme.getStyle(r,"legend.label","color"),u=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}}const 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:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return xt.xAxis(t,r);case"y-axis":return xt.yAxis(t,r);case"x-axis-title":return qt.xAxisTitle(t,r);case"y-axis-title":return qt.yAxisTitle(t,r);case"grid-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return q(!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){const r=t&&t.gestures||[];return q(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return q(!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 q(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const 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:wt}]}}}]}};return q(!0,{},o,e||{})}(t,r);default:return}}function Et(e){this.options=e||{},this.settings={dockLayout:{layoutModes:St()},components:[],scales:{}}}Et.prototype.addComponent=function(e,t,r){const n=At(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},Et.prototype.addInteraction=function(e,t){const r=At("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},Et.prototype.addScale=function(e,t,r){const n=At(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},Et.prototype.getSettings=function(){return this.settings},Et.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},Et.prototype.addPreset=function(e,t){!function(e,t,r){switch(e){case"dimension-measure-chart":ht(t,r);break;default:throw Error("There is no chart preset with that type")}}(e,this,t)},Et.validateComponentKeys=function(e){const t={};return e.map((e=>{const r=e.key;return r?t[r]?"Duplicate key for component "+e.type:(t[r]=!0,null):"Missing key for component "+e.type})).filter((e=>!!e))},Et.create=function(e){return new Et(e)},Et.createComponent=At;const Tt={CENTER:0,BOTTOM:1};var kt={DISCLAIMERS:[{label:"NoDataExist",alignment:Tt.CENTER,default:!0},{label:"RequireNumericDimension",alignment:Tt.CENTER,default:!1},{label:"OnlyNanData",alignment:Tt.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:Tt.CENTER,default:!1},{label:"LimitedData",alignment:Tt.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:Tt.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:Tt.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:Tt.BOTTOM,default:!1}],ALIGNMENT:Tt};const It={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx==0,getLimitedDataAttribute(e,t){let r,n=!1;var i;return e?void 0!==t.explicitLimitedData?n=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?n=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,n=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):n=!0===t.explicitLimitedData,n},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const r=t.length;let n,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=0;n<r;n++)if(a=Math.min(a,t[n].qMin),s=Math.max(s,t[n].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,kt.DISCLAIMERS.forEach((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 Nt(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function Lt(e,t){return e&&t&&t[e]}function Rt(e){this.environment=e,this.clear()}Nt.prototype.isValidAndSupported=function(e,t){return Lt(e.label,this.dataAttributes)&&(e.default||Lt(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Nt.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},Nt.prototype.getMessage=function(e,t){let r="";const n=this;return t&&this.disclaimersConfig.forEach((i=>{n.isValidAndSupported(i,e)&&(r+=t.get("Object.Disclaimer."+i.label)+" ")})),r},Rt.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},Rt._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},Rt.prototype.getComponentSettings=function(){var e,t;const{translator:r}=this.environment,n=q(!0,{},this.vizAttributes.supportedDisclaimers),i=new Nt(kt.DISCLAIMERS,this.dataAttributes,n);let o,a;if(i.isAnyValidDisclaimer(kt.ALIGNMENT.CENTER))o=i.getMessage(kt.ALIGNMENT.CENTER,r),a="center";else{if(!i.isAnyValidDisclaimer(kt.ALIGNMENT.BOTTOM))return;o=i.getMessage(kt.ALIGNMENT.BOTTOM,r),a="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:a},settings:{label:o,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},Rt.prototype.set=function(e){if(this.clear(),!e)throw new Error(Rt.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=It.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},Rt.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const Ot=tt.extend({init(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new Rt(r),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[Et.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,r)=>function(e,t,r){let n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){const e=r.width||t.qSize.qcx,n=Math.floor(1e4/e);i={qTop:r.top||0,qLeft:r.left||0,qWidth:e,qHeight:r.height?Math.min(r.height,n):n}}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((e=>{t[n]=e}))}(e,t,r),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const 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),Et.validateComponentKeys(n.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:r}=this.environment.options;!r&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=q(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,r){var n,i;const o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:De(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),Ft={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}},Pt=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,_t=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Ht=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,Vt=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,zt=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,jt=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Ut=Math.floor,Bt=Math.round,Wt=tt.extend({init(){let e,t,r,n,i,o,a,s,l,u,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof Wt)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(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))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]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),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=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Bt(255*d),f=Bt(255*f),m=Bt(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]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),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=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Bt(255*d),f=Bt(255*f),m=Bt(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]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),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=Bt(255*d),f=Bt(255*f),m=Bt(255*m),h=1}else Ft[p.toLowerCase()]?(r=p.toLowerCase(),d=Ft[r].r,f=Ft[r].g,m=Ft[r].b,h="number"==typeof Ft[r].a?Ft[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=Ut(d),this._g=Ut(f),this._b=Ut(m),this._a=h,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=Wt.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=Wt.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=Wt.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=Wt.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=Wt.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=Wt.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=Wt.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=Wt.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const 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]);let o=parseFloat(r[5]);const a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${n},${i},${o},${a})`},isEqual(e){return e instanceof Wt||(e=new Wt(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[Ut(this._r+(e._r-this._r)*t),Ut(this._g+(e._g-this._g)*t),Ut(this._b+(e._b-this._b)*t),Ut(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const 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 Wt(n)}});Wt.toRGB=function(e){if(e instanceof Wt)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=Wt.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},Wt.toRGBA=function(e,t){if(e instanceof Wt)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=Wt.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},Wt.toHex=function(e){let t,r,n;return e instanceof Wt?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t="0"+t),1===r.length&&(r="0"+r),1===n.length&&(n="0"+n),"#"+[t,r,n].join("")):("string"==typeof e&&(e=Wt.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t="0"+t),1===r.length&&(r="0"+r),1===n.length&&(n="0"+n),`#${t}${r}${n}`)},Wt.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Wt(e));const 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(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.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(${360*o},${100*r},${100*n})`},Wt.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Wt(e));const 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(n=t?.21*a+.72*s+.07*l:(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-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(${360*o},${100*r},${100*n},${u})`},Wt.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new Wt(e));const 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,n=0;else{switch(r=s-l,t=0===r?0:r/u,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*u}},Wt.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof Wt)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(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},Wt.blend=function(e,t,r){const n=(16711680&(e=Wt.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=Wt.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},Wt.getBlend=function(e,t,r){const 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 Wt(n,i,o,a)},Wt.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Pt.test(e)||_t.test(e)||Ht.test(e)||Vt.test(e)||zt.test(e)||jt.test(e)||Ft[e.toLowerCase()])},Wt.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},Wt.getContrast=function(e,t){if(!e||!t)return;const r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},Wt.isDark=function(){const e={getLuminance:Wt.prototype.getLuminance,isInvalid:Wt.prototype.isInvalid};return Wt.prototype.init.apply(e,[].slice.call(arguments)),Wt.prototype.isDark.call(e)},Wt.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const $t={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(e){const t=new Wt(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey(e){const t=new Wt(e);return 0===t.getAlpha()?this.DARK_GREY:Wt.getBestContrast(t,new Wt($t.LIGHT_GREY),new Wt($t.DARK_GREY))},getBestContrast:(e,t,r)=>Wt.getBestContrast(new Wt(e),new Wt(t),new Wt(r)),getContrastingTransparent(e){const t=new Wt(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}},Yt=".scrollHandler";function Kt(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 Gt(){const 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 Zt(e){const t=function(e){let t=0,r=0,n=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),n=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(n=0,r=-1*t),void 0!==e.wheelDeltaY&&(n=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(r=-1*e.wheelDeltaX/60),{delta:t,deltaX:r,deltaY:n,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,r,n){if(n&&r.componentsFromPoint(t).some((e=>e.settings.key===n)))return r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const r=t.delta<0?3:-3;this._scrollApi.move(r)}function Jt(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then((t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((e=>{}))}Kt.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},Kt.prototype.setDisabled=function(e){this._disabled=e},Kt.prototype.getDisabled=function(){return this._disabled},Kt.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,Gt.call(this))},Kt.prototype.getItemSize=function(){return this._itemSize},Kt.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Gt.call(this);return this._scrollViewSizeInItem},Kt.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Jt.bind(this)));this._$chartElement.on(`mousewheel${Yt} DOMMouseScroll${Yt}`,Zt.bind(this)),this._$chartElement.on("touchstart"+Yt,(e=>{e.preventDefault()})),this._on=!0},Kt.prototype.isOn=function(){return this._on},Kt.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(Yt),this._on=!1},Kt.prototype.updateViewState=function(e){Gt.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},Kt.prototype.onResize=function(){this._sizeChanged=!0,Gt.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},Kt.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},Kt.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},Kt.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},Kt.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},Kt.prototype.getScrollState=function(){return this.getScrollApi().getState().start},Kt.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var Xt={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-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((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Qt={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable(n,i){if(e.lassoing)return t.isSelectionEnabled();const o=Xt.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((a=r.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart(n){Xt.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(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend(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(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var er={callMeasureRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Xt.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:"lasso "+i,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];Xt.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(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function tr(e,t){let r;return r="x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,r}var rr={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:tr(n,r.isHorizontal),event:"arearange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Xt.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:"lasso "+i,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];Xt.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(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var nr={callDimensionRangeGesture:function(e,t,r,n){const i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Xt.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:"lasso "+i,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];Xt.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(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var ir={callDragGesture:function(e,t,r,n,i){let o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"drag",enable(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===r.keys.componentKey))[0],e.dragging)}},requireFailure:n?"lasso "+t.getBrushConfig():"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let 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(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var or={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&Xt.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)}))}}}}};var ar={create:function(e,t,r,n,i){const o={};t=t||"vertical";const a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=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)return;let n=a;const 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=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}f.gesture=e;const 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){const i=e.component(t);i&&i.emit(r,n)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={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(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(or.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Qt.callLassoGesture(d,x,q)),s?l?(v.push(nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(rr.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(rr.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(ir.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function sr(e,t,r,n,i){let o=!1;n=n||"tooltip",r=r||["self"];const a=e.brush(n),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;const r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},s.toggleInterceptor=function(e){if(r.length>1){const t={},r=[];return e.forEach((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 lr={create:(...e)=>sr(...e)},ur={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};const cr=e=>({h:t,data:r,style:n})=>{const i=function(e,t){const r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const r=o.data[i[e]].value;if(-2===r.qElemNo||-2===r.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)})).filter((e=>!!e));const l=pr(e,o);l&&a.rows.unshift(l),n.push(a)}}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,r),o={h:t,style:n,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function pr(e,t){var r,n,i;const 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;const s=[];e.data.forEach((e=>{const r=t.data[e];r&&s.push(r.value)}));const l=function(e){let t=-1;for(let r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}function dr(){if(!document.querySelector("#dist-flow-tooltip")){const 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 fr({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){dr()},beforeUpdate(){dr()},destroyed(){!function(){const e=document.querySelector("#dist-flow-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#dist-flow-tooltip"),content:i,filter:n,extract:e=>e.node,direction:t?"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:r,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:mr}=dt;const hr={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:ur.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:r,style:n,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...n.cell,textAlign:s,fontWeight:"bold",direction:mr(e.header)};a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const n={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=r("div",{style:n});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...n.cell,textAlign:s,direction:mr(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:mr(e.value)};a.push(r("tr",null,r("td",{style:l},i),r("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...n.cell,textAlign:s,direction:mr(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function gr(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");let n={},i=!1;const 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((e=>{l(n[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(n).forEach((e=>{n[e].action.closeTooltip()}))}function c(){u();for(const e in n)n[e].brush.clear()}return o.setUp=function(t){const o=q(!0,{},hr,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:lr.create(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);const u=fr({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:cr(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(n).forEach((e=>{a(n[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var yr={create:(e,t,r)=>gr(e,t,r)};function br(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11}function vr(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}}function xr(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=vr(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=vr(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk}));const n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function qr(e,t,r){return e*(e<=24?t:r)}var Dr={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:br,getCharacterRatios:vr,getTotalCharacterRatios:xr,getAdjustedMaxGlyphCount:function(e,t,r){const n=xr(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(br(i)+1.0909090909090908*o)},estimateLatinLabelWidth:qr,estimateLabelWidth:function(e,t,r,n,i){return e*r+qr(t,n,i)}};var Mr={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=Ze.getColorForPositiveValue(e,t),a=Ze.getColorForNegativeValue(e,t),s=Ze.getColorForSubtotal(e,t),l=e=>""+e,u=[];let c,p,d=0,f=0,m=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0;for(let e=0;e<i;e++)p=Number.isNaN(+n[0][e].qNum)?0:n[0][e].qNum,r[e].valueType!==Ze.valueTypes.SUBTOTAL?(d=f,f+=p*(r[e].valueType===Ze.valueTypes.INVERSE?-1:1),c=d<f?o:a,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:c},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}]),r[e].subtotal&&r[e].subtotal.enable&&u.push([{qText:r[e].subtotal.label||"",qElemNumber:b++},{qText:s},{qNum:0},{qNum:f},{qNum:f,qText:l(f)}])):(d=0,f=p,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:s},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}])),m=Math.max(m,d),h=Math.min(h,d),g=Math.max(g,f),y=Math.min(y,f);const v=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,q=e.qDef.isCustomFormatted,D={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:u.length},qMatrix:u}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:m,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q}]}};e.generatedMatrix=u,e.generated=D},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return"qDimensionInfo/"+e},getGeneratedMeasurePath:function(e){return"qMeasureInfo/"+e}};function Sr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var wr,Cr,Ar=(1===(wr=Sr).length&&(Cr=wr,wr=function(e,t){return Sr(Cr(e),t)}),{left:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;wr(e[i],t)<0?r=i+1:n=i}return r},right:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;wr(e[i],t)>0?n=i:r=i+1}return r}}).right,Er=Math.sqrt(50),Tr=Math.sqrt(10),kr=Math.sqrt(2);function Ir(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=Er?10:o>=Tr?5:o>=kr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Er?10:o>=Tr?5:o>=kr?2:1)}function Nr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Lr(){}function Rr(e,t){var r=new Lr;if(e instanceof Lr)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,i=-1,o=e.length;if(null==t)for(;++i<o;)r.set(i,e[i]);else for(;++i<o;)r.set(t(n=e[i],i,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function Or(){}Lr.prototype=Rr.prototype={constructor:Lr,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var Fr=Rr.prototype;Or.prototype={constructor:Or,has:Fr.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Fr.remove,clear:Fr.clear,values:Fr.keys,size:Fr.size,empty:Fr.empty,each:Fr.each};var Pr=Array.prototype,_r=Pr.map,Hr=Pr.slice;function Vr(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zr(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function jr(){}var Ur=1/.7,Br="\\s*([+-]?\\d+)\\s*",Wr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yr=/^#([0-9a-f]{3,8})$/,Kr=new RegExp("^rgb\\("+[Br,Br,Br]+"\\)$"),Gr=new RegExp("^rgb\\("+[$r,$r,$r]+"\\)$"),Zr=new RegExp("^rgba\\("+[Br,Br,Br,Wr]+"\\)$"),Jr=new RegExp("^rgba\\("+[$r,$r,$r,Wr]+"\\)$"),Xr=new RegExp("^hsl\\("+[Wr,$r,$r]+"\\)$"),Qr=new RegExp("^hsla\\("+[Wr,$r,$r,Wr]+"\\)$"),en={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 tn(){return this.rgb().formatHex()}function rn(){return this.rgb().formatRgb()}function nn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Yr.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?on(t):3===r?new un(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?an(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?an(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=Kr.exec(e))?new un(t[1],t[2],t[3],1):(t=Gr.exec(e))?new un(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Zr.exec(e))?an(t[1],t[2],t[3],t[4]):(t=Jr.exec(e))?an(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xr.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=Qr.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):en.hasOwnProperty(e)?on(en[e]):"transparent"===e?new un(NaN,NaN,NaN,0):null}function on(e){return new un(e>>16&255,e>>8&255,255&e,1)}function an(e,t,r,n){return n<=0&&(e=t=r=NaN),new un(e,t,r,n)}function sn(e){return e instanceof jr||(e=nn(e)),e?new un((e=e.rgb()).r,e.g,e.b,e.opacity):new un}function ln(e,t,r,n){return 1===arguments.length?sn(e):new un(e,t,r,null==n?1:n)}function un(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function cn(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)}function pn(){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 dn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function fn(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new hn(e,t,r,n)}function mn(e){if(e instanceof hn)return new hn(e.h,e.s,e.l,e.opacity);if(e instanceof jr||(e=nn(e)),!e)return new hn;if(e instanceof hn)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new hn(a,s,l,e.opacity)}function hn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function gn(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Vr(jr,nn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:tn,formatHex:tn,formatHsl:function(){return mn(this).formatHsl()},formatRgb:rn,toString:rn}),Vr(un,ln,zr(jr,{brighter:function(e){return e=null==e?Ur:Math.pow(Ur,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new un(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:cn,formatHex:cn,formatRgb:pn,toString:pn})),Vr(hn,(function(e,t,r,n){return 1===arguments.length?mn(e):new hn(e,t,r,null==n?1:n)}),zr(jr,{brighter:function(e){return e=null==e?Ur:Math.pow(Ur,e),new hn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new hn(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 un(gn(e>=240?e-240:e+120,i,n),gn(e,i,n),gn(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 yn=Math.PI/180,bn=180/Math.PI,vn=4/29,xn=6/29,qn=3*xn*xn;function Dn(e){if(e instanceof Mn)return new Mn(e.l,e.a,e.b,e.opacity);if(e instanceof Tn)return kn(e);e instanceof un||(e=sn(e));var t,r,n=An(e.r),i=An(e.g),o=An(e.b),a=Sn((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Sn((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Sn((.0139322*n+.0971045*i+.7141733*o)/.82521)),new Mn(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Mn(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Sn(e){return e>.008856451679035631?Math.pow(e,1/3):e/qn+vn}function wn(e){return e>xn?e*e*e:qn*(e-vn)}function Cn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function An(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function En(e){if(e instanceof Tn)return new Tn(e.h,e.c,e.l,e.opacity);if(e instanceof Mn||(e=Dn(e)),0===e.a&&0===e.b)return new Tn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*bn;return new Tn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Tn(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function kn(e){if(isNaN(e.h))return new Mn(e.l,0,0,e.opacity);var t=e.h*yn;return new Mn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Vr(Mn,(function(e,t,r,n){return 1===arguments.length?Dn(e):new Mn(e,t,r,null==n?1:n)}),zr(jr,{brighter:function(e){return new Mn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Mn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new un(Cn(3.1338561*(t=.96422*wn(t))-1.6168667*(e=1*wn(e))-.4906146*(r=.82521*wn(r))),Cn(-.9787684*t+1.9161415*e+.033454*r),Cn(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Vr(Tn,(function(e,t,r,n){return 1===arguments.length?En(e):new Tn(e,t,r,null==n?1:n)}),zr(jr,{brighter:function(e){return new Tn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Tn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return kn(this).rgb()}}));var In=-.14861,Nn=1.78277,Ln=-.29227,Rn=-.90649,On=1.97294,Fn=On*Rn,Pn=On*Nn,_n=Nn*Ln-Rn*In;function Hn(e){if(e instanceof Vn)return new Vn(e.h,e.s,e.l,e.opacity);e instanceof un||(e=sn(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(_n*n+Fn*t-Pn*r)/(_n+Fn-Pn),o=n-i,a=(On*(r-i)-Ln*o)/Rn,s=Math.sqrt(a*a+o*o)/(On*i*(1-i)),l=s?Math.atan2(a,o)*bn-120:NaN;return new Vn(l<0?l+360:l,s,i,e.opacity)}function Vn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function zn(e){return function(){return e}}function jn(e){return 1==(e=+e)?Un: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):zn(isNaN(t)?r:t)}}function Un(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):zn(isNaN(e)?t:e)}Vr(Vn,(function(e,t,r,n){return 1===arguments.length?Hn(e):new Vn(e,t,r,null==n?1:n)}),zr(jr,{brighter:function(e){return e=null==e?Ur:Math.pow(Ur,e),new Vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Vn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*yn,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new un(255*(t+r*(In*n+Nn*i)),255*(t+r*(Ln*n+Rn*i)),255*(t+r*(On*n)),this.opacity)}}));var Bn=function e(t){var r=jn(t);function n(e,t){var n=r((e=ln(e)).r,(t=ln(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Un(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);function Wn(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function $n(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=Qn(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function Yn(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Kn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Gn(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=Qn(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var Zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jn=new RegExp(Zn.source,"g");function Xn(e,t){var r,n,i,o=Zn.lastIndex=Jn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=Zn.exec(e))&&(n=Jn.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Kn(r,n)})),o=Jn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function Qn(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?zn(t):("number"===i?Kn:"string"===i?(r=nn(t))?(t=r,Bn):Xn:t instanceof nn?Bn:t instanceof Date?Yn:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?$n:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Gn:Kn:Wn))(e,t)}function ei(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ti(e){return+e}var ri=[0,1];function ni(e){return e}function ii(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function oi(e){var t,r=e[0],n=e[e.length-1];return r>n&&(t=r,r=n,n=t),function(e){return Math.max(r,Math.min(n,e))}}function ai(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=ii(i,n),o=r(a,o)):(n=ii(n,i),o=r(o,a)),function(e){return o(n(e))}}function si(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=ii(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=Ar(e,t,1,n)-1;return o[r](i[r](t))}}function li(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ui(e,t){return function(){var e,t,r,n,i,o,a=ri,s=ri,l=Qn,u=ni;function c(){return n=Math.min(a.length,s.length)>2?si:ai,i=o=null,p}function p(t){return isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),Kn)))(r)))},p.domain=function(e){return arguments.length?(a=_r.call(e,ti),u===ni||(u=oi(a)),c()):a.slice()},p.range=function(e){return arguments.length?(s=Hr.call(e),c()):s.slice()},p.rangeRound=function(e){return s=Hr.call(e),l=ei,c()},p.clamp=function(e){return arguments.length?(u=e?oi(a):ni,p):u!==ni},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}()(e,t)}function ci(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function pi(e){return(e=ci(Math.abs(e)))?e[1]:NaN}var di,fi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mi(e){if(!(t=fi.exec(e)))throw new Error("invalid format: "+e);var t;return new hi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function hi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function gi(e,t){var r=ci(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}mi.prototype=hi.prototype,hi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yi={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return gi(100*e,t)},r:gi,s:function(e,t){var r=ci(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(di=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+ci(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function bi(e){return e}var vi,xi,qi,Di=Array.prototype.map,Mi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Si(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?bi:(t=Di.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?bi:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Di.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=mi(e)).fill,r=e.align,p=e.sign,d=e.symbol,f=e.zero,m=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):yi[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===r)&&(f=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=yi[b],D=/[defgprs%]/.test(b);function M(e){var i,o,l,d=v,M=x;if("c"===b)M=q(e)+M,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==p&&(S=!1),d=(S?"("===p?p:u:"-"===p||"("===p?"":p)+d,M=("s"===b?Mi[8+di/3]:"")+M+(S&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){M=(46===l?a+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}h&&!f&&(e=n(e,1/0));var w=d.length+e.length+M.length,C=w<m?new Array(m-w+1).join(t):"";switch(h&&f&&(e=n(C+e,C.length?m-M.length:1/0),C=""),r){case"<":e=d+e+M+C;break;case"=":e=d+C+e+M;break;case"^":e=C.slice(0,w=C.length>>1)+d+e+M+C.slice(w);break;default:e=C+d+e+M}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:p,formatPrefix:function(e,t){var r=p(((e=mi(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(pi(t)/3))),i=Math.pow(10,-n),o=Mi[8+n/3];return function(e){return r(i*e)+o}}}}function wi(e,t,r,n){var i,o=function(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=Er?i*=10:o>=Tr?i*=5:o>=kr&&(i*=2),t<e?-i:i}(e,t,r);switch((n=mi(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(pi(t)/3)))-pi(Math.abs(e)))}(o,a))||(n.precision=i),qi(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pi(t)-pi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-pi(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return xi(n)}function Ci(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){var n,i,o,a,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t<e)&&(i=e,e=t,t=i),0===(a=Ir(e,t,r))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return n&&o.reverse(),o}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return wi(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(n=s,s=l,l=n,n=o,o=a,a=n),(n=Ir(s,l,r))>0?n=Ir(s=Math.floor(s/n)*n,l=Math.ceil(l/n)*n,r):n<0&&(n=Ir(s=Math.ceil(s*n)/n,l=Math.floor(l*n)/n,r)),n>0?(i[o]=Math.floor(s/n)*n,i[a]=Math.ceil(l/n)*n,t(i)):n<0&&(i[o]=Math.ceil(s*n)/n,i[a]=Math.floor(l*n)/n,t(i)),e},e}function Ai(){var e=ui(ni,ni);return e.copy=function(){return li(e,Ai())},Nr.apply(e,arguments),Ci(e)}vi=Si({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),xi=vi.format,qi=vi.formatPrefix;var Ei=new Date,Ti=new Date;function ki(e,t,r,n){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},i.round=function(e){var t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},i.range=function(r,n,o){var a,s=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r<n&&o>0))return s;do{s.push(a=new Date(+r)),t(r,o),e(r)}while(a<r&&r<n);return s},i.filter=function(r){return ki((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(i.count=function(t,n){return Ei.setTime(+t),Ti.setTime(+n),e(Ei),e(Ti),Math.floor(r(Ei,Ti))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(n?function(t){return n(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Ii=ki((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Ii.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ki((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):Ii:null};ki((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),ki((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),ki((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var Ni=ki((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function Li(e){return ki((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var Ri=Li(0),Oi=Li(1);Li(2),Li(3);var Fi=Li(4);Li(5),Li(6),ki((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var Pi=ki((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Pi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ki((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},ki((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),ki((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}));var _i=ki((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Hi(e){return ki((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Vi=Hi(0),zi=Hi(1);Hi(2),Hi(3);var ji=Hi(4);Hi(5),Hi(6),ki((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));var Ui=ki((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Bi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Wi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function $i(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}Ui.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ki((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var Yi,Ki,Gi,Zi={"-":"",_:" ",0:"0"},Ji=/^\s*\d+/,Xi=/^%/,Qi=/[\\^$*+?|[\]().{}]/g;function eo(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function to(e){return e.replace(Qi,"\\$&")}function ro(e){return new RegExp("^(?:"+e.map(to).join("|")+")","i")}function no(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function io(e,t,r){var n=Ji.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function oo(e,t,r){var n=Ji.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function ao(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function so(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function lo(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function uo(e,t,r){var n=Ji.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function co(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function po(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function fo(e,t,r){var n=Ji.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function mo(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function ho(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function go(e,t,r){var n=Ji.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function yo(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function bo(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function vo(e,t,r){var n=Ji.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xo(e,t,r){var n=Ji.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function qo(e,t,r){var n=Ji.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Do(e,t,r){var n=Xi.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Mo(e,t,r){var n=Ji.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function So(e,t,r){var n=Ji.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function wo(e,t){return eo(e.getDate(),t,2)}function Co(e,t){return eo(e.getHours(),t,2)}function Ao(e,t){return eo(e.getHours()%12||12,t,2)}function Eo(e,t){return eo(1+Ni.count(Pi(e),e),t,3)}function To(e,t){return eo(e.getMilliseconds(),t,3)}function ko(e,t){return To(e,t)+"000"}function Io(e,t){return eo(e.getMonth()+1,t,2)}function No(e,t){return eo(e.getMinutes(),t,2)}function Lo(e,t){return eo(e.getSeconds(),t,2)}function Ro(e){var t=e.getDay();return 0===t?7:t}function Oo(e,t){return eo(Ri.count(Pi(e)-1,e),t,2)}function Fo(e){var t=e.getDay();return t>=4||0===t?Fi(e):Fi.ceil(e)}function Po(e,t){return e=Fo(e),eo(Fi.count(Pi(e),e)+(4===Pi(e).getDay()),t,2)}function _o(e){return e.getDay()}function Ho(e,t){return eo(Oi.count(Pi(e)-1,e),t,2)}function Vo(e,t){return eo(e.getFullYear()%100,t,2)}function zo(e,t){return eo((e=Fo(e)).getFullYear()%100,t,2)}function jo(e,t){return eo(e.getFullYear()%1e4,t,4)}function Uo(e,t){var r=e.getDay();return eo((e=r>=4||0===r?Fi(e):Fi.ceil(e)).getFullYear()%1e4,t,4)}function Bo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+eo(t/60|0,"0",2)+eo(t%60,"0",2)}function Wo(e,t){return eo(e.getUTCDate(),t,2)}function $o(e,t){return eo(e.getUTCHours(),t,2)}function Yo(e,t){return eo(e.getUTCHours()%12||12,t,2)}function Ko(e,t){return eo(1+_i.count(Ui(e),e),t,3)}function Go(e,t){return eo(e.getUTCMilliseconds(),t,3)}function Zo(e,t){return Go(e,t)+"000"}function Jo(e,t){return eo(e.getUTCMonth()+1,t,2)}function Xo(e,t){return eo(e.getUTCMinutes(),t,2)}function Qo(e,t){return eo(e.getUTCSeconds(),t,2)}function ea(e){var t=e.getUTCDay();return 0===t?7:t}function ta(e,t){return eo(Vi.count(Ui(e)-1,e),t,2)}function ra(e){var t=e.getUTCDay();return t>=4||0===t?ji(e):ji.ceil(e)}function na(e,t){return e=ra(e),eo(ji.count(Ui(e),e)+(4===Ui(e).getUTCDay()),t,2)}function ia(e){return e.getUTCDay()}function oa(e,t){return eo(zi.count(Ui(e)-1,e),t,2)}function aa(e,t){return eo(e.getUTCFullYear()%100,t,2)}function sa(e,t){return eo((e=ra(e)).getUTCFullYear()%100,t,2)}function la(e,t){return eo(e.getUTCFullYear()%1e4,t,4)}function ua(e,t){var r=e.getUTCDay();return eo((e=r>=4||0===r?ji(e):ji.ceil(e)).getUTCFullYear()%1e4,t,4)}function ca(){return"+0000"}function pa(){return"%"}function da(e){return+e}function fa(e){return Math.floor(+e/1e3)}!function(e){Yi=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=ro(i),c=no(i),p=ro(o),d=no(o),f=ro(a),m=no(a),h=ro(s),g=no(s),y=ro(l),b=no(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:wo,e:wo,f:ko,g:zo,G:Uo,H:Co,I:Ao,j:Eo,L:To,m:Io,M:No,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:da,s:fa,S:Lo,u:Ro,U:Oo,V:Po,w:_o,W:Ho,x:null,X:null,y:Vo,Y:jo,Z:Bo,"%":pa},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Wo,e:Wo,f:Zo,g:sa,G:ua,H:$o,I:Yo,j:Ko,L:Go,m:Jo,M:Xo,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:da,s:fa,S:Qo,u:ea,U:ta,V:na,w:ia,W:oa,x:null,X:null,y:aa,Y:la,Z:ca,"%":pa},q={a:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=m[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=d[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.m=b[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return S(e,t,r,n)},d:ho,e:ho,f:qo,g:co,G:uo,H:yo,I:yo,j:go,L:xo,m:mo,M:bo,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},q:fo,Q:Mo,s:So,S:vo,u:oo,U:ao,V:so,w:io,W:lo,x:function(e,t,n){return S(e,r,t,n)},X:function(e,t,r){return S(e,n,t,r)},y:co,Y:uo,Z:po,"%":Do};function D(e,t){return function(r){var n,i,o,a=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Zi[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,i)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(r){var n,i,o=$i(1900,void 0,1);if(S(o,e,r+="",0)!=r.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(n=Wi($i(o.y,0,1))).getUTCDay(),n=i>4||0===i?zi.ceil(n):zi(n),n=_i.offset(n,7*(o.V-1)),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(i=(n=Bi($i(o.y,0,1))).getDay(),n=i>4||0===i?Oi.ceil(n):Oi(n),n=Ni.offset(n,7*(o.V-1)),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Wi($i(o.y,0,1)).getUTCDay():Bi($i(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Wi(o)):Bi(o)}}function S(e,t,r,n){for(var i,o,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in Zi?t.charAt(a++):i])||(n=o(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return v.x=D(r,v),v.X=D(n,v),v.c=D(t,v),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),Ki=Yi.utcFormat,Gi=Yi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Ki("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Gi("%Y-%m-%dT%H:%M:%S.%LZ");const ma={getMinorTicks({majorTicks:e,minorTickCount:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r},adjustTicks({ticks:e,majorTicks:t,minorTicks:r,autoMinMax:n,minMax:i,min:o,max:a}){const s=r[0]-t[0],l=t[0]-o;l>s&&e.unshift({value:t[0]-s,isMinor:!0});const u=a-t[t.length-1];return u>s&&e.push({value:t[t.length-1]+s,isMinor:!0}),n||(("min"===i||"minMax"===i)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===i||"minMax"===i)&&u>0&&e.push({value:a,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:r,minMax:n,spacing:i}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMin))),a=Math.max(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMax)));if(!r)switch(n){case"min":o=e.measureAxis.min;break;case"max":a=e.measureAxis.max;break;case"minMax":({min:o,max:a}=e.measureAxis)}const s=100*i,l=Math.max(1,Math.round(t/s)),u=Ai().domain([o,a]).ticks(l),c=ma.getMinorTicks({majorTicks:u,minorTickCount:1}),p=[...u.map((e=>({value:e,isMinor:!1}))),...c.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return ma.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},ha=Ze.chartID;function ga(e){this._scrollHandler.setDisabled(!!e)}function ya(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==Ze.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function ba(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Dr.stringWidthOverMWidth(ya(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function va(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return ur.formatMeasureValue(r,t)}function xa(e){const t=e.getStyle(ha,"value.color","default"),r=e.getStyle(ha,"value.color","dark"),n=e.getStyle(ha,"value.color","light");return{settings:{sources:[{strategy:{settings:{direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:t},{fill:e=>function(e,t,r){return $t.getBestContrast(e,t,r)}(e.data.boxColor.value,r,n)},{position:"opposite",fill:t,justify:0}],label:va}]}}}]}}}function qa(e,t){return{viewSize:t,max:e.generatedMatrix.length}}const Da=Ot.extend("WaterfallChart",{namespace:".waterfallchart",chartID:ha,init:function({picasso:e,environment:t,$element:r}){this._super(e,r,t,null,null),this._tooltipHandler=yr.create(this.chartInstance,r,ha),this._scrollHandler=new Kt(this.chartInstance,r,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"])},updateConstraints:function(e){const t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:r}=this.environment,n=!!e.snapshotData,i=Et.create({chartID:ha,theme:r,isRtl:t}),o=this.picassoElement.clientWidth,a=this.picassoElement.clientHeight,s={};s.box=this._tooltipHandler.setUp({chartBuilder:i,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,r){const n=r.boxColor.value;return{value:ur.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=ar.create(l,"vertical",t,{componentKey:"box-marker"}),i.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:r,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:ba.call(this,e),dimensionSource:Mr.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[Mr.getGeneratedMeasurePath(0),Mr.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>ma.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:qa(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:Mr.getGeneratedDimensionPath(0),props:{start:{field:Mr.getGeneratedMeasurePath(0)},end:{field:Mr.getGeneratedMeasurePath(1)},measure:{field:Mr.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:Mr.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:r,consume:n}}}(s,e)),i.addComponent("point-marker",function(e,t){const r=t.getStyle(ha,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:Mr.getGeneratedDimensionPath(0),props:{x:{},y:{field:Mr.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,r)),e.legend&&!e.legend.show||i.addComponent("categorical-legend",function(e,t){const{theme:r,translator:n}=e,i=Ze.getColorForPositiveValue(t,r),o=Ze.getColorForNegativeValue(t,r),a=Ze.getColorForSubtotal(t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[n.get("waterfall.legend.positiveValue.label"),n.get("waterfall.legend.negativeValue.label"),n.get("waterfall.legend.subtotal.label")],range:[i,o,a]},style:{title:{show:!1}}}}(this.environment,e),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a}),e.dataPoint.showLabels&&i.addComponent("labels",xa(r));const u=i.getSettings();return this.addSnapshotChartSettings(u,e),u},updateData:function(e){const{theme:t,options:r}=this.environment,n=this;return this._super(e).then((()=>{if(n._destroyed)return Promise.reject();let i,o;if(!!e.snapshotData){const e=n.layout.generated.qHyperCube.qDataPages[0].qArea;i=e.qTop,o=e.qHeight,Mr.generateHyperCube(n.layout,t)}else{Mr.generateHyperCube(n.layout,t),ga.call(n,!0);const{viewState:e}=r;e?(n._scrollHandler.updateViewState(n.layout.generatedMatrix.length),n._scrollHandler.setScrollState(e.scroll),i=e.scroll):(n._scrollHandler.resetScroll(),i=0),o=n._scrollHandler.getScrollViewSizeInItem()}Mr.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||ga.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally((()=>e.call(t)))}return this._super()},getSlicedData:function(e,t){return Mr.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function Ma(q){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(D).forEach((t=>{e.add(D[t])}))}}(q.translator);const w=function(){const e=y();return e.renderer.prio(["canvas"]),e.use(b),e.use(v(x)),e.use(M),e.component("disclaimer",S),e}();return{qae:N(q),ext:Qe(q),component(){const y=d(),b=function(){const e=i(),r=o(),n=a(),c=t(),p=s(),d=l();return u((()=>({app:e,appLayout:r,deviceType:n,options:c,theme:p,translator:d})),[e,r,c.direction,c.freeResize,d.language(),p.name(),n])}(),v=f(),x=r(),[q,D]=m();var M;h((()=>{const e=g(y),t=new Da({picasso:w,environment:b,$element:e});return D(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{q&&(q.updateEnvironment(b),q.updateConstraints(x),await q.updateData(v),await q.paint())}),[v,q,b]),function(i){const o=e(),a=t(),s=r(),[,l]=n((async()=>{i&&(i.updateConstraints(s),i.options=a,await i.resize())}),[o.width,o.height]);if(l)throw l}(q),M=q,c((e=>{if(M)return M.setSnapshotData(e)})),p((()=>({getViewState(){if(M)return M.getViewState()}})),[M])}}}export{Ma as default};
|
|
10
10
|
//# sourceMappingURL=index.js.map
|