@nebula.js/sn-pie-chart 1.11.13 → 1.11.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,67 +1,67 @@
1
1
  /*
2
- * @nebula.js/sn-pie-chart v1.11.13
2
+ * @nebula.js/sn-pie-chart v1.11.17
3
3
  * Copyright (c) 2021 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import i from"react";import{Button as o,Popover as a,List as s,ListItem as u,ListItemIcon as l,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as f,StylesProvider as d,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as v,useSelections as g,useState as y,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as S,usePlugins as M,useEmbed as E,useTheme as O,useConstraints as I,useAppLayout as T,usePromise as A,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var P={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function N(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function V(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){_(o,n,i,a,s,"next",e)}function s(e){_(o,n,i,a,s,"throw",e)}a(void 0)}))}}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(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 U(e,t,r){return t&&z(e.prototype,t),r&&z(e,r),e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(){return(W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$(e,t)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Z(e):t}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=K(e);if(t){var i=K(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return G(this,r)}}function Q(e,t,r){return(Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=K(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("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)||re(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 te(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||re(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 re(e,t){if(e){if("string"==typeof e)return ne(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)?ne(e,t):void 0}}function ne(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 ie=function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return e?e.getStyle(t,r,n):i};function oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae=Object.prototype.hasOwnProperty,se=Object.prototype.toString,ue=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ce=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===se.call(e)},pe=function(e){if(!e||"[object Object]"!==se.call(e))return!1;var t,r=ae.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ae.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ae.call(e,t)},fe=function(e,t){ue&&"__proto__"===t.name?ue(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},de=function(e,t){if("__proto__"===t){if(!ae.call(e,t))return;if(le)return le(e,t).value}return e[t]},me=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!==F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(r in t)n=de(s,r),s!==(i=de(t,r))&&(c&&i&&(pe(i)||(o=ce(i)))?(o?(o=!1,a=n&&ce(n)?n:[]):a=n&&pe(n)?n:{},fe(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&fe(s,{name:r,newValue:i}));return s},he="center",ve="bottom",ge={NoDataExist:{label:"NoDataExist",alignment:he,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:he,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:he,default:!1},LimitedData:{label:"LimitedData",alignment:ve,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ve,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ve,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ve,default:!1}};var ye=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],be={};ye.forEach((function(e){var t=ee(e,2),r=t[0],n=t[1],i=n.width,o=n.height;be[r]={width:i,height:o}}));var xe=function(){return be};function qe(e,t){return{layoutModes:xe(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?R({align:.5,preserveAspectRatio:!0},t.logicalSize):void 0}}var De=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};function Ce(e,t){var r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}function we(){if(!document.querySelector("#la-vie-tooltip")){var e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Se(e){var t=e.key;return{show:!0,key:void 0===t?"tooltip":t,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){we()},beforeUpdate:function(){we()},destroyed:function(){var e;(e=document.querySelector("#la-vie-tooltip"))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector("#la-vie-tooltip")},content:function(e){var t=e.h,r=e.data,n=e.style;return r[0].map((function(e){return t("tr",{},function(e,t){var r=t.h,n=t.style;return e.map((function(e){var t={style:R(R({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(t.colspan=e.colspan),r("td",t,e.content)}))}(e,{h:t,style:n}))}))},direction:e.rtl?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Me=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ee=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Oe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ie={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:function(e){return Me.test(e)},isRtlChar:function(e){return Ee.test(e)||Oe.test(e)},detectTextDirection:function(e){var t,r,n=e?e.length:0;for(t=0;t<n;t++){if(r=e[t],Ie.isLtrChar(r))return"ltr";if(Ie.isRtlChar(r))return"rtl"}return"ltr"}},Te={getColorSymbol:function(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})},getNodeFillColor:function(e){return e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0},getColor:function(e,t,r){var n=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(r.coloring.label&&(a.label="".concat(r.coloring.label)),"color"!==r.coloring.type&&n.fillTooltip){var s=i("fill"),u="measure"===r.coloring.fieldType;if(a.value=u&&s?s(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){var l=o(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label="".concat(l)}}return a.fill=void 0===n._fillColor?Te.getNodeFillColor(t):n._fillColor,a},getMeasure:function(e,t){var r=e(t.source.key).field(t.source.field).title();return{label:"".concat(r),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}},hideColorRow:function(e,t){return void 0===e.color.value||e.measures.some((function(e){return e.field===t.coloring.field}))},getTitleRow:function(e,t){var r=Ie.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow:function(e,t){var r=Ie.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:r},colspan:2},{}]},getFooterRow:function(e,t){return[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Ie.detectTextDirection(e)},colspan:2},{}]},getImageRow:function(e,t){var r=Ie.detectTextDirection(e.src),n=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){n.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));var o=e.imageError?"".concat(e.src,"?").concat(Math.random()):e.src;n.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:o,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]="url('".concat(e.src,"')");return[{content:[t.h("div",i,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]},getNMoreRow:function(e,t,r){var n=t?t.get("Object.ChartTooltip.NMore",e):"+".concat(e," more");return[{content:n,style:{"font-weight":"bold","text-align":r?"right":"left",direction:Ie.detectTextDirection(n)},colspan:2},{}]},getSeparatorRow:function(){return[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}]},getColorRow:function(e,t,r){var n=Ie.detectTextDirection(t.color.label),i=r?[":",t.color.label]:[t.color.label,":"],o=Ie.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":r?"right":"left",direction:n}},{content:r?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value],style:{"text-align":r?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=Ie.detectTextDirection(e.label),a=n?[":",e.label]:[e.label,":"],s=Ie.detectTextDirection(e.value);return[{content:a,style:{"text-align":n?"right":"left",direction:o}},{content:i?n?[e.value,Te.getColorSymbol(t,r)]:[Te.getColorSymbol(t,r),e.value]:[e.value],style:{"text-align":n?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Ae(e,t,r,n){var i=parseInt(ie(e,t,r,n),10);if(!isNaN(i))return i}var je=function(e){return function(t){return e.getContrastingColorTo(t.node.attrs.fill)}};function ke(e,t){return{padding:10,placements:e.simplifiedPlacements.map((function(r){return function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?ie(t,r,"label.value","color"):je(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId)})),fontSize:Ae(t,e.themeId,"label.value","fontSize"),fontFamily:ie(t,e.themeId,"label.value","fontFamily"),label:e.label}}function Le(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Pe(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ne(){}var Re="\\s*([+-]?\\d+)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ve=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),ze=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Fe]+"\\)$"),Be=new RegExp("^rgba\\("+[_e,_e,_e,Fe]+"\\)$"),We=new RegExp("^hsl\\("+[Fe,_e,_e]+"\\)$"),Ye=new RegExp("^hsla\\("+[Fe,_e,_e,Fe]+"\\)$"),Ke={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 $e(){return this.rgb().formatHex()}function Je(){return this.rgb().formatRgb()}function Ze(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ve.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ge(t):3===r?new et(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Xe(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=He.exec(e))?new et(t[1],t[2],t[3],1):(t=ze.exec(e))?new et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ue.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=We.exec(e))?it(t[1],t[2]/100,t[3]/100,1):(t=Ye.exec(e))?it(t[1],t[2]/100,t[3]/100,t[4]):Ke.hasOwnProperty(e)?Ge(Ke[e]):"transparent"===e?new et(NaN,NaN,NaN,0):null}function Ge(e){return new et(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,r,n){return n<=0&&(e=t=r=NaN),new et(e,t,r,n)}function Qe(e){return e instanceof Ne||(e=Ze(e)),e?new et((e=e.rgb()).r,e.g,e.b,e.opacity):new et}function et(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function tt(){return"#"+nt(this.r)+nt(this.g)+nt(this.b)}function rt(){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 nt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function it(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,r,n)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Ne||(e=Ze(e)),!e)return new at;if(e instanceof at)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new at(a,s,u,e.opacity)}function at(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function st(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Le(Ne,Ze,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:$e,formatHex:$e,formatHsl:function(){return ot(this).formatHsl()},formatRgb:Je,toString:Je}),Le(et,(function(e,t,r,n){return 1===arguments.length?Qe(e):new et(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new et(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new et(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:tt,formatHex:tt,formatRgb:rt,toString:rt})),Le(at,(function(e,t,r,n){return 1===arguments.length?ot(e):new at(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new at(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new at(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 et(st(e>=240?e-240:e+120,i,n),st(e,i,n),st(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 ut=Math.PI/180,lt=180/Math.PI,ct=4/29,pt=6/29,ft=3*pt*pt;function dt(e){if(e instanceof mt)return new mt(e.l,e.a,e.b,e.opacity);if(e instanceof qt)return Dt(e);e instanceof et||(e=Qe(e));var t,r,n=yt(e.r),i=yt(e.g),o=yt(e.b),a=ht((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=ht((.4360747*n+.3850649*i+.1430804*o)/.96422),r=ht((.0139322*n+.0971045*i+.7141733*o)/.82521)),new mt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function mt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function ht(e){return e>.008856451679035631?Math.pow(e,1/3):e/ft+ct}function vt(e){return e>pt?e*e*e:ft*(e-ct)}function gt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bt(e){if(e instanceof qt)return new qt(e.h,e.c,e.l,e.opacity);if(e instanceof mt||(e=dt(e)),0===e.a&&0===e.b)return new qt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*lt;return new qt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xt(e,t,r,n){return 1===arguments.length?bt(e):new qt(e,t,r,null==n?1:n)}function qt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Dt(e){if(isNaN(e.h))return new mt(e.l,0,0,e.opacity);var t=e.h*ut;return new mt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ct(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Le(mt,(function(e,t,r,n){return 1===arguments.length?dt(e):new mt(e,t,r,null==n?1:n)}),Pe(Ne,{brighter:function(e){return new mt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new mt(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 et(gt(3.1338561*(t=.96422*vt(t))-1.6168667*(e=1*vt(e))-.4906146*(r=.82521*vt(r))),gt(-.9787684*t+1.9161415*e+.033454*r),gt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Le(qt,xt,Pe(Ne,{brighter:function(e){return new qt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new qt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Dt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return Ct(e(t),r)}}(e))}(Ct);function wt(){}function St(e,t){var r=new wt;if(e instanceof wt)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 Mt(){}wt.prototype=St.prototype={constructor:wt,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 Et=St.prototype;function Ot(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function It(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Tt(){}Mt.prototype={constructor:Mt,has:Et.has,add:function(e){return this["$"+(e+="")]=e,this},remove:Et.remove,clear:Et.clear,values:Et.keys,size:Et.size,empty:Et.empty,each:Et.each};var At=1/.7,jt="\\s*([+-]?\\d+)\\s*",kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pt=/^#([0-9a-f]{3})$/,Nt=/^#([0-9a-f]{6})$/,Rt=new RegExp("^rgb\\("+[jt,jt,jt]+"\\)$"),Ft=new RegExp("^rgb\\("+[Lt,Lt,Lt]+"\\)$"),_t=new RegExp("^rgba\\("+[jt,jt,jt,kt]+"\\)$"),Vt=new RegExp("^rgba\\("+[Lt,Lt,Lt,kt]+"\\)$"),Ht=new RegExp("^hsl\\("+[kt,Lt,Lt]+"\\)$"),zt=new RegExp("^hsla\\("+[kt,Lt,Lt,kt]+"\\)$"),Ut={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 Bt(e){var t;return e=(e+"").trim().toLowerCase(),(t=Pt.exec(e))?new $t((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Nt.exec(e))?Wt(parseInt(t[1],16)):(t=Rt.exec(e))?new $t(t[1],t[2],t[3],1):(t=Ft.exec(e))?new $t(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_t.exec(e))?Yt(t[1],t[2],t[3],t[4]):(t=Vt.exec(e))?Yt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ht.exec(e))?Zt(t[1],t[2]/100,t[3]/100,1):(t=zt.exec(e))?Zt(t[1],t[2]/100,t[3]/100,t[4]):Ut.hasOwnProperty(e)?Wt(Ut[e]):"transparent"===e?new $t(NaN,NaN,NaN,0):null}function Wt(e){return new $t(e>>16&255,e>>8&255,255&e,1)}function Yt(e,t,r,n){return n<=0&&(e=t=r=NaN),new $t(e,t,r,n)}function Kt(e){return e instanceof Tt||(e=Bt(e)),e?new $t((e=e.rgb()).r,e.g,e.b,e.opacity):new $t}function $t(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Jt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xt(e,t,r,n)}function Gt(e){if(e instanceof Xt)return new Xt(e.h,e.s,e.l,e.opacity);if(e instanceof Tt||(e=Bt(e)),!e)return new Xt;if(e instanceof Xt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Xt(a,s,u,e.opacity)}function Xt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Qt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Ot(Tt,Bt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Ot($t,(function(e,t,r,n){return 1===arguments.length?Kt(e):new $t(e,t,r,null==n?1:n)}),It(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new $t(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new $t(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Jt(this.r)+Jt(this.g)+Jt(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Ot(Xt,(function(e,t,r,n){return 1===arguments.length?Gt(e):new Xt(e,t,r,null==n?1:n)}),It(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new Xt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Xt(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 $t(Qt(e>=240?e-240:e+120,i,n),Qt(e,i,n),Qt(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}}));var er=Math.PI/180,tr=180/Math.PI,rr=4/29,nr=6/29,ir=3*nr*nr;function or(e){if(e instanceof ar)return new ar(e.l,e.a,e.b,e.opacity);if(e instanceof fr){if(isNaN(e.h))return new ar(e.l,0,0,e.opacity);var t=e.h*er;return new ar(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof $t||(e=Kt(e));var r,n,i=cr(e.r),o=cr(e.g),a=cr(e.b),s=sr((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?r=n=s:(r=sr((.4360747*i+.3850649*o+.1430804*a)/.96422),n=sr((.0139322*i+.0971045*o+.7141733*a)/.82521)),new ar(116*s-16,500*(r-s),200*(s-n),e.opacity)}function ar(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function sr(e){return e>.008856451679035631?Math.pow(e,1/3):e/ir+rr}function ur(e){return e>nr?e*e*e:ir*(e-rr)}function lr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pr(e){if(e instanceof fr)return new fr(e.h,e.c,e.l,e.opacity);if(e instanceof ar||(e=or(e)),0===e.a&&0===e.b)return new fr(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*tr;return new fr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}Ot(ar,(function(e,t,r,n){return 1===arguments.length?or(e):new ar(e,t,r,null==n?1:n)}),It(Tt,{brighter:function(e){return new ar(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ar(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 $t(lr(3.1338561*(t=.96422*ur(t))-1.6168667*(e=1*ur(e))-.4906146*(r=.82521*ur(r))),lr(-.9787684*t+1.9161415*e+.033454*r),lr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Ot(fr,(function(e,t,r,n){return 1===arguments.length?pr(e):new fr(e,t,r,null==n?1:n)}),It(Tt,{brighter:function(e){return new fr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new fr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return or(this).rgb()}}));var dr=-.29227,mr=-.90649,hr=1.97294,vr=hr*mr,gr=1.78277*hr,yr=-.6557636667999999;function br(e){if(e instanceof xr)return new xr(e.h,e.s,e.l,e.opacity);e instanceof $t||(e=Kt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(yr*n+vr*t-gr*r)/(yr+vr-gr),o=n-i,a=(hr*(r-i)-dr*o)/mr,s=Math.sqrt(a*a+o*o)/(hr*i*(1-i)),u=s?Math.atan2(a,o)*tr-120:NaN;return new xr(u<0?u+360:u,s,i,e.opacity)}function xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function qr(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)]}Ot(xr,(function(e,t,r,n){return 1===arguments.length?br(e):new xr(e,t,r,null==n?1:n)}),It(Tt,{brighter:function(e){return e=null==e?At:Math.pow(At,e),new xr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new xr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*er,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new $t(255*(t+r*(-.14861*n+1.78277*i)),255*(t+r*(dr*n+mr*i)),255*(t+r*(hr*n)),this.opacity)}}));var Dr,Cr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wr(e){return new Sr(e)}function Sr(e){if(!(t=Cr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Mr(e,t){var r=qr(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")}wr.prototype=Sr.prototype,Sr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Mr(100*e,t)},r:Mr,s:function(e,t){var r=qr(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Dr=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")+qr(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 Or(e){return e}var Ir=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tr(e){var t,r,n=e.grouping&&e.thousands?(t=e.grouping,r=e.thousands,function(e,n){for(var i=e.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}):Or,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Or,s=e.percent||"%";function u(e){var t=(e=wr(e)).fill,r=e.align,u=e.sign,l=e.symbol,c=e.zero,p=e.width,f=e.comma,d=e.precision,m=e.trim,h=e.type;"n"===h?(f=!0,h="g"):Er[h]||(null==d&&(d=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var v="$"===l?i[0]:"#"===l&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",g="$"===l?i[1]:/[%p]/.test(h)?s:"",y=Er[h],b=/[defgprs%]/.test(h);function x(e){var i,s,l,x=v,q=g;if("c"===h)q=y(e)+q,e="";else{var D=(e=+e)<0;if(e=y(Math.abs(e),d),m&&(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(i>0){if(!+e[n])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===u?u:"-":"-"===u||"("===u?"":u)+x,q=("s"===h?Ir[8+Dr/3]:"")+q+(D&&"("===u?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(l=e.charCodeAt(i))||l>57){q=(46===l?o+e.slice(i+1):e.slice(i))+q,e=e.slice(0,i);break}}f&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(f&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return d=null==d?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),x.toString=function(){return e+""},x}return{format:u,formatPrefix:function(e,t){var r=u(((e=wr(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=qr(Math.abs(e)))?e[1]:NaN}(t)/3))),i=Math.pow(10,-n),o=Ir[8+n/3];return function(e){return r(i*e)+o}}}}!function(e){Tr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ar=new Date,jr=new Date;function kr(e,t,r,n){function i(t){return e(t=new Date(+t)),t}return i.floor=i,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 kr((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 Ar.setTime(+t),jr.setTime(+n),e(Ar),e(jr),Math.floor(r(Ar,jr))},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 Lr=kr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Lr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?kr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):Lr:null};kr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),kr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),kr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var Pr=kr((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 Nr(e){return kr((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 Rr=Nr(0),Fr=Nr(1);Nr(2),Nr(3);var _r=Nr(4);Nr(5),Nr(6),kr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var Vr=kr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Vr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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},kr((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()})),kr((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 Hr=kr((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 zr(e){return kr((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 Ur=zr(0),Br=zr(1);zr(2),zr(3);var Wr=zr(4);zr(5),zr(6),kr((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 Yr=kr((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 Kr(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 $r(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 Jr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Yr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?kr((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 Zr,Gr,Xr,Qr={"-":"",_:" ",0:"0"},en=/^\s*\d+/,tn=/^%/,rn=/[\\^$*+?|[\]().{}]/g;function nn(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 on(e){return e.replace(rn,"\\$&")}function an(e){return new RegExp("^(?:"+e.map(on).join("|")+")","i")}function sn(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function un(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function ln(e,t,r){var n=en.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function pn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dn(e,t,r){var n=en.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function mn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hn(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 vn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function gn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function yn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function bn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function xn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qn(e,t,r){var n=en.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Dn(e,t,r){var n=en.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Cn(e,t,r){var n=en.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wn(e,t,r){var n=tn.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Sn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Mn(e,t,r){var n=en.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function En(e,t){return nn(e.getDate(),t,2)}function On(e,t){return nn(e.getHours(),t,2)}function In(e,t){return nn(e.getHours()%12||12,t,2)}function Tn(e,t){return nn(1+Pr.count(Vr(e),e),t,3)}function An(e,t){return nn(e.getMilliseconds(),t,3)}function jn(e,t){return An(e,t)+"000"}function kn(e,t){return nn(e.getMonth()+1,t,2)}function Ln(e,t){return nn(e.getMinutes(),t,2)}function Pn(e,t){return nn(e.getSeconds(),t,2)}function Nn(e){var t=e.getDay();return 0===t?7:t}function Rn(e,t){return nn(Rr.count(Vr(e),e),t,2)}function Fn(e,t){var r=e.getDay();return e=r>=4||0===r?_r(e):_r.ceil(e),nn(_r.count(Vr(e),e)+(4===Vr(e).getDay()),t,2)}function _n(e){return e.getDay()}function Vn(e,t){return nn(Fr.count(Vr(e),e),t,2)}function Hn(e,t){return nn(e.getFullYear()%100,t,2)}function zn(e,t){return nn(e.getFullYear()%1e4,t,4)}function Un(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nn(t/60|0,"0",2)+nn(t%60,"0",2)}function Bn(e,t){return nn(e.getUTCDate(),t,2)}function Wn(e,t){return nn(e.getUTCHours(),t,2)}function Yn(e,t){return nn(e.getUTCHours()%12||12,t,2)}function Kn(e,t){return nn(1+Hr.count(Yr(e),e),t,3)}function $n(e,t){return nn(e.getUTCMilliseconds(),t,3)}function Jn(e,t){return $n(e,t)+"000"}function Zn(e,t){return nn(e.getUTCMonth()+1,t,2)}function Gn(e,t){return nn(e.getUTCMinutes(),t,2)}function Xn(e,t){return nn(e.getUTCSeconds(),t,2)}function Qn(e){var t=e.getUTCDay();return 0===t?7:t}function ei(e,t){return nn(Ur.count(Yr(e),e),t,2)}function ti(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Wr(e):Wr.ceil(e),nn(Wr.count(Yr(e),e)+(4===Yr(e).getUTCDay()),t,2)}function ri(e){return e.getUTCDay()}function ni(e,t){return nn(Br.count(Yr(e),e),t,2)}function ii(e,t){return nn(e.getUTCFullYear()%100,t,2)}function oi(e,t){return nn(e.getUTCFullYear()%1e4,t,4)}function ai(){return"+0000"}function si(){return"%"}function ui(e){return+e}function li(e){return Math.floor(+e/1e3)}!function(e){Zr=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=an(i),c=sn(i),p=an(o),f=sn(o),d=an(a),m=sn(a),h=an(s),v=sn(s),g=an(u),y=sn(u),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:En,e:En,f:jn,H:On,I:In,j:Tn,L:An,m:kn,M:Ln,p:function(e){return i[+(e.getHours()>=12)]},Q:ui,s:li,S:Pn,u:Nn,U:Rn,V:Fn,w:_n,W:Vn,x:null,X:null,y:Hn,Y:zn,Z:Un,"%":si},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Bn,e:Bn,f:Jn,H:Wn,I:Yn,j:Kn,L:$n,m:Zn,M:Gn,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:ui,s:li,S:Xn,u:Qn,U:ei,V:ti,w:ri,W:ni,x:null,X:null,y:ii,Y:oi,Z:ai,"%":si},q={a:function(e,t,r){var n=d.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=f[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=v[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return w(e,t,r,n)},d:gn,e:gn,f:Cn,H:bn,I:bn,j:yn,L:Dn,m:vn,M:xn,p:function(e,t,r){var n=l.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:Sn,s:Mn,S:qn,u:ln,U:cn,V:pn,w:un,W:fn,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:mn,Y:dn,Z:hn,"%":wn};function D(e,t){return function(r){var n,i,o,a=[],s=-1,u=0,l=e.length;for(r instanceof Date||(r=new Date(+r));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Qr[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(o=t[n])&&(n=o(r,i)),a.push(n),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function C(e,t){return function(r){var n,i,o=Jr(1900);if(w(o,e,r+="",0)!=r.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(n=$r(Jr(o.y))).getUTCDay(),n=i>4||0===i?Br.ceil(n):Br(n),n=Hr.offset(n,7*(o.V-1)),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(i=(n=t(Jr(o.y))).getDay(),n=i>4||0===i?Fr.ceil(n):Fr(n),n=Pr.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?$r(Jr(o.y)).getUTCDay():t(Jr(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,$r(o)):t(o)}}function w(e,t,r,n){for(var i,o,a=0,s=t.length,u=r.length;a<s;){if(n>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=q[i in Qr?t.charAt(a++):i])||(n=o(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Kr);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=C(e,$r);return t.toString=function(){return e},t}}}(e),Gr=Zr.utcFormat,Xr=Zr.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||Gr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Xr("%Y-%m-%dT%H:%M:%S.%LZ");var ci=me.bind(null,!0),pi={},fi=Array.isArray;function di(e){return null!=e&&!Array.isArray(e)&&"object"===F(e)}function mi(e){return void 0===e}function hi(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function vi(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=isNaN(r)?{}:[];e[r||t]=mi(e[r||t])?o:e[t],e=e[r||t]}})),e}function gi(e,t){var r=!0;if(di(e)&&di(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){gi(e[n],t[n])||(r=!1)})),r);if(fi(e)&&fi(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!gi(e[n],t[n]))return!1;return!0}return e===t}pi.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?ci({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);gi(o,a)||hi(t,i)||(mi(a)?n.push({op:"add",path:s,value:o}):di(o)&&di(a)?n=n.concat(pi.generate(a,o,s)):fi(o)&&fi(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&mi(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(gi(t,i))return n;if(!mi(t[0])&&mi(t[0].qInfo)||0===t.length)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(pi.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(n.push({op:"move",path:"".concat(r,"/").concat(u),from:"".concat(r,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){mi(t[i])&&!hi(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},pi.apply=function(e,t){t.forEach((function(t){var r,n=vi(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&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(fi(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(fi(o)&&fi(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,te(u))}else if(di(o)&&di(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!hi(r,e)&&delete r[e]})),ci(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var l=vi(e,t.from);fi(n)?n.splice(+i,0,l.splice(+a,1)[0]):(n[i]=l[a],delete l[a])}else"remove"===t.op&&(fi(n)?n.splice(+i,1):delete n[i])}))},pi.clone=function(e){return ci({},e)},pi.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},pi.updateObject=function(e,t){Object.keys(e).length?pi.apply(e,pi.generate(e,t)):ci(e,t)};var yi=[[2,4,6],[2,4],[3]],bi=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function xi(e,t,r){var n,i=e?e.length:0,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(n=1;n<i;n++)o=Math.min(o,e[n]/e[n-1]);void 0!==r&&(o=Math.min(o,r/e[i-1])),e.splice(0,0,o)}function qi(e,t,r){var n,i=e?e.length:0;for(n=0;n<i;n++)xi(e[n],t,r)}!function(){var e,t;for(qi(yi,1,10),e=0;e<bi.length;e++)if(bi[e])for(t=0;t<bi[e].length;t++)Array.isArray(bi[e][t])&&qi(bi[e][t])}();var Di={exports:{}};function Ci(){}function wi(){}wi.resetWarningCache=Ci;Di.exports=function(){function e(e,t,r,n,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wi,resetWarningCache:Ci};return r.PropTypes=r,r}();var Si=Di.exports;function Mi(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Ei(e){var t=e.d,r=e.size,n=e.style,o=void 0===n?{}:n,a=e.viewBox,s=void 0===a?"0 0 16 16":a,u=R({fontSize:Mi(r),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},o);return i.createElement("i",{style:u},i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:s,fill:"currentColor"},i.createElement("path",{d:t})))}var Oi={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},Ii={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Ti="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Ai={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},ji={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function ki(e,t,r){(function(e){var t=e.model,r=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:r}):Promise.resolve()})({model:e,properties:r}).then((function(){e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");var n=pi.generate(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))}))}function Li(e,t,r,n,i,o){e.getEffectiveProperties().then((function(a){var s=me(!0,{},a),u=s.qHyperCubeDef[n][t],l=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];l.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(l.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=l,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=u,i&&i({oldItem:u,newItem:l,oldProperties:a,newProperties:s,model:e}),ki(e,a,s)}))}function Pi(e){return"H"===e.qGrouping?e.title||"":e.qFallbackTitle||""}function Ni(e){var t=e.dir,r=e.dock,n=e.altList,i=e.model,o=e.translator,a=e.app,s=e.onChange;return 0===n.length?null:{dir:t,dock:r,getAlternatives:function(){var e=n.map((function(e){return function(e,t,r){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:r.get("Object.ErrorMessage.MissingDimension")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);var i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,a,o).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Li(i,e,t,"qDimensions",s)}}}function Ri(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/qHyperCubeDef";return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:Pi(e),drillUp:function(e){r.drillUp(n,t,e)}}}function Fi(e){var t=e.altList,r=e.app,n=e.dir,i=e.dock,o=e.model,a=e.onChange,s=e.skipAttributeExpressions,u=e.translator;return 0===t.length?null:{dir:n,dock:i,getAlternatives:function(){var e=t.map((function(e){return function(e,t,r){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((function(e){return e.getLayout()})).catch((function(){return null})).then((function(e){return e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:r.get("Object.ErrorMessage.MissingMeasure")}));var n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);var i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,r,u).then((function(t){return{id:e.qDef.cId,selected:!1,title:t}}))}));return Promise.all(e)},changeTo:function(e,t){Li(o,e,t,"qMeasures",a,s)}}}function _i(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}var Vi=["children"],Hi={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},zi=function(e){var t=e.children,r=J(e,Vi);return i.createElement(o,W({size:"small",disableRipple:!0,disableTouchRipple:!0},r),t)};function Ui(){function e(e){var t=e.title,r=e.selected,n=e.onClick,o=Ie.detectTextDirection(t);return i.createElement(u,{button:!0,onClick:n,style:{textAlign:"start"}},i.createElement(l,{style:{minWidth:32}},i.createElement(Ei,{d:r?Ti:""})),i.createElement(c,{primaryTypographyProps:{dir:o}},t))}function t(t){var r=t.alignTo,n=t.changeTo,o=t.current,u=t.dir,l=t.dock,c=t.list,p=t.onClose,f=t.show,d=c.map((function(t,r){return i.createElement(e,{key:t.id,title:t.title,onClick:function(){return n(r)}})}));return i.createElement(a,W({anchorEl:r,open:f,onClose:p},Hi[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),i.createElement(s,{dense:!0,dir:u,component:"nav"},i.createElement(e,{title:o,selected:!0,onClick:p}),d))}e.propTypes={title:Si.string.isRequired,selected:Si.bool,onClick:Si.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Si.any,changeTo:Si.func.isRequired,current:Si.string.isRequired,dir:Si.string.isRequired,dock:Si.string.isRequired,list:Si.array,onClose:Si.func.isRequired,show:Si.bool.isRequired},t.defaultProps={list:[],alignTo:null};var r=function(e){Y(n,i.Component);var r=X(n);function n(e){var t;return H(this,n),(t=r.call(this,e)).state={open:!1,inSelection:e.selections&&e.selections.isActive()},t.openPopover=t.openPopover.bind(Z(t)),t.closePopover=t.closePopover.bind(Z(t)),t.changeTo=t.changeTo.bind(Z(t)),t.alignToRef=i.createRef(),t}return U(n,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selections;t&&(this.onSelectionsActivated=function(){return e.setState({inSelection:!0})},this.onSelectionsDeactivated=function(){return e.setState({inSelection:!1})},t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated))}},{key:"componentWillUnmount",value:function(){var e=this.props.selections;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}},{key:"changeTo",value:function(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}},{key:"openPopover",value:function(){var e=this;this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((function(t){e.setState({open:!0,alternatives:t})}))}},{key:"closePopover",value:function(){this.setState({open:!1,closeTime:Date.now()})}},{key:"render",value:function(){var e=this.props,r=e.titleData,n=e.popover,o=e.translator,a=e.disabled,s=e.isDimension,u=e.padding,l=e.minWidth,c=e.hasAlternative,p=R({flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal"},this.props.style),f=r.breadcrumbs.length,d=a||this.state.inSelection,m=r.breadcrumbs.map((function(e,t){return i.createElement(zi,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:t,onClick:function(){return d?void 0:r.drillUp(f-t)},title:e},i.createElement("span",{style:p},e),i.createElement(Ei,W({},ji,{size:"small",style:{margin:"0 8px"}})))})),h=n&&!this.state.open?this.openPopover:this.closePopover,v=!n||a||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:v&&"rgba(89, 89, 89, 0.8)",height:!s&&v&&"20px",lineHeight:!s&&v&&"20px",border:!s&&v&&"none"};u&&(g.padding=u),l&&(g.minWidth=l);var y=Ie.detectTextDirection(r.text),b=i.createElement(zi,{style:g,onClick:v?void 0:h,title:r.text,tabIndex:"-1"},r.locked&&i.createElement(Ei,W({},Ii,{size:"small",title:o.get("Tooltip.selections.locked")})),i.createElement("span",{style:p,dir:y},r.text),n&&i.createElement(Ei,W({},Ai,{size:"small",style:{margin:"0 8px"}})));return i.createElement(i.Fragment,null,r.drilldown&&i.createElement(Ei,W({},Oi,{size:"small",title:o.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,i.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:c?"auto":"none"}},b),n&&i.createElement(t,{dock:n.dock,dir:n.dir,current:r.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}]),n}();function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:Si.bool.isRequired,padding:Si.string,minWidth:Si.string,titleData:Si.shape({breadcrumbs:Si.arrayOf(Si.string).isRequired,drilldown:Si.bool.isRequired,index:Si.number.isRequired,locked:Si.bool.isRequired,text:Si.string.isRequired,popoverText:Si.string.isRequired,drillUp:Si.func}).isRequired,popover:Si.shape({dir:Si.string.isRequired,dock:Si.string.isRequired,changeTo:Si.func.isRequired,getAlternatives:Si.func.isRequired}),translator:Si.shape({get:Si.func.isRequired}).isRequired,selections:Si.shape({isActive:Si.func,addListener:Si.func,removeListener:Si.func}),style:Si.shape({fontSize:Si.string,color:Si.string,fontFamily:Si.string}).isRequired,isDimension:Si.bool.isRequired,hasAlternative:Si.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||o(this.settings.settings)?28:20},render:function(){var e,t=this,a=this.settings,s=a.settings,u=s.app,l=s.disabled,c=s.explicitItemInfos,p=s.hyperCube,f=s.hyperCubeDef,d=s.isDimension,m=s.minWidth,h=s.model,v=s.onChangeToAlternative,g=s.padding,y=s.rtl,b=s.selections,x=s.skipAttributeExpressions,q=s.translator,D=a.layout.dock,C="top"!==D&&"bottom"!==D||!y?"ltr":"rtl",w=function(e,t){var r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width="".concat(t.height,"px"),r.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),r.transformOrigin="top left"):"right"===e&&(r.width="".concat(t.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),r.transformOrigin="top left"),r}(D,this.rect),S=f&&f.qLayoutExclude&&f.qLayoutExclude.qHyperCubeDef,M=S&&S[d?"qDimensions":"qMeasures"]||[],E=c||p[d?"qDimensionInfo":"qMeasureInfo"],O=d?Ni:Fi,I=d?Ri:_i,T=h&&h.colorSupport&&h.modifiers&&O({altList:M,app:u,dir:y?"rtl":"ltr",dock:n(D),model:h,onChange:v,skipAttributeExpressions:x,translator:q}),A=(e=this.settings.settings).isDimension&&De(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings),j=E.map((function(e,n){var o="number"==typeof e.explicitColumn?e.explicitColumn:n,a=I(e,o,h),s=n===E.length-1;return i.createElement(i.Fragment,{key:e.cId},i.createElement(r,{popover:T,titleData:a,model:h,translator:q,selections:b,disabled:l(),style:t.style,isDimension:d,padding:g,minWidth:m,hasAlternative:A}),!s&&i.createElement("span",null,", "))}));return i.createElement("div",{style:w,dir:C},j)}}}function Bi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>r?r:e}function Wi(e){if(e.type)return e;if("#"===e.charAt(0))return Wi(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb(".concat(r.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=e.substring(t+1,e.length-1).split(",");return{type:r,values:n=n.map((function(e){return parseFloat(e)}))}}function Yi(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function Ki(e){var t="hsl"===(e=Wi(e)).type?Wi(function(e){var t=(e=Wi(e)).values,r=t[0],n=t[1]/100,i=t[2]/100,o=n*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),Yi({type:s,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function $i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ji(){return(Ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Zi(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Gi(){return(Gi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Xi(e){return(Xi="function"==typeof Symbol&&"symbol"===F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function Qi(e){return(Qi="function"==typeof Symbol&&"symbol"===Xi(Symbol.iterator)?function(e){return Xi(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Xi(e)})(e)}function eo(e){return e&&"object"===Qi(e)&&!Array.isArray(e)}function to(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Gi({},e):e;return eo(e)&&eo(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(eo(t[i])&&i in e?n[i]=to(e[i],t[i],r):n[i]=t[i])})),n}var ro=["xs","sm","md","lg","xl"];function no(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,i=void 0===n?"px":n,o=e.step,a=void 0===o?5:o,s=Zi(e,["values","unit","step"]);function u(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function l(e,t){var n=ro.indexOf(t)+1;return n===ro.length?u(e):"@media (min-width:".concat(r[e]).concat(i,") and ")+"(max-width:".concat(r[ro[n]]-a/100).concat(i,")")}return Ji({keys:ro,values:r,up:u,down:function(e){var t=ro.indexOf(e)+1,n=r[ro[t]];return t===ro.length?u("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(i,")")},between:l,only:function(e){return l(e,e)},width:function(e){return r[e]}},s)}function io(e,t,r){var n;return Ji({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ji({paddingLeft:t(2),paddingRight:t(2)},r,$i({},e.up("sm"),Ji({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},$i(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),$i(n,e.up("sm"),{minHeight:64}),n)},r)}var oo="#7986cb",ao="#3f51b5",so="#303f9f",uo="#ff4081",lo="#f50057",co="#c51162",po={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},fo="#e57373",mo="#f44336",ho="#d32f2f",vo={black:"#000",white:"#fff"},go={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vo.white,default:po[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},yo={text:{primary:vo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:po[800],default:"#303030"},action:{active:vo.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function bo(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Wi(e),t=Bi(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return Yi(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Wi(e),t=Bi(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return Yi(e)}(e.main,1.5*n)))}function xo(e){var t=e.primary,r=void 0===t?{light:oo,main:ao,dark:so}:t,n=e.secondary,i=void 0===n?{light:uo,main:lo,dark:co}:n,o=e.error,a=void 0===o?{light:fo,main:mo,dark:ho}:o,s=e.type,u=void 0===s?"light":s,l=e.contrastThreshold,c=void 0===l?3:l,p=e.tonalOffset,f=void 0===p?.2:p,d=Zi(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Ki(e),n=Ki(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,yo.text.primary)>=c?yo.text.primary:go.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Ji({},e)).main&&e[t]&&(e.main=e[t]),bo(e,"light",r,f),bo(e,"dark",n,f),e.contrastText||(e.contrastText=m(e.main)),e}var v={dark:yo,light:go};return to(Ji({common:vo,type:u,primary:h(r),secondary:h(i,"A400","A200","A700"),error:h(a),grey:po,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:f},v[u]),d,{clone:!1})}function qo(e){return Math.round(1e5*e)/1e5}var Do={textTransform:"uppercase"};function Co(e,t){var r="function"==typeof t?t(e):t,n=r.fontFamily,i=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,o=r.fontSize,a=void 0===o?14:o,s=r.fontWeightLight,u=void 0===s?300:s,l=r.fontWeightRegular,c=void 0===l?400:l,p=r.fontWeightMedium,f=void 0===p?500:p,d=r.fontWeightBold,m=void 0===d?700:d,h=r.htmlFontSize,v=void 0===h?16:h,g=r.allVariants,y=r.pxToRem,b=Zi(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=y||function(e){return"".concat(e/v*x,"rem")},D=function(e,t,r,n,o){return Ji({fontFamily:i,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===i?{letterSpacing:"".concat(qo(n/t),"em")}:{},{},o,{},g)},C={h1:D(u,96,1,-1.5),h2:D(u,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(f,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(f,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(f,14,1.75,.4,Do),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Do)};return to(Ji({htmlFontSize:v,pxToRem:q,round:qo,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:c,fontWeightMedium:f,fontWeightBold:m},C),b,{clone:!1})}function wo(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var So=["none",wo(0,2,1,-1,0,1,1,0,0,1,3,0),wo(0,3,1,-2,0,2,2,0,0,1,5,0),wo(0,3,3,-2,0,3,4,0,0,1,8,0),wo(0,2,4,-1,0,4,5,0,0,1,10,0),wo(0,3,5,-1,0,5,8,0,0,1,14,0),wo(0,3,5,-1,0,6,10,0,0,1,18,0),wo(0,4,5,-2,0,7,10,1,0,2,16,1),wo(0,5,5,-3,0,8,10,1,0,3,14,2),wo(0,5,6,-3,0,9,12,1,0,3,16,2),wo(0,6,6,-3,0,10,14,1,0,4,18,3),wo(0,6,7,-4,0,11,15,1,0,4,20,3),wo(0,7,8,-4,0,12,17,2,0,5,22,4),wo(0,7,8,-4,0,13,19,2,0,5,24,4),wo(0,7,9,-4,0,14,21,2,0,5,26,4),wo(0,8,9,-5,0,15,22,2,0,6,28,5),wo(0,8,10,-5,0,16,24,2,0,6,30,5),wo(0,8,11,-5,0,17,26,2,0,6,32,5),wo(0,9,11,-5,0,18,28,2,0,7,34,6),wo(0,9,12,-6,0,19,29,2,0,7,36,6),wo(0,10,13,-6,0,20,31,3,0,8,38,7),wo(0,10,13,-6,0,21,33,3,0,8,40,7),wo(0,10,14,-6,0,22,35,3,0,8,42,7),wo(0,11,14,-7,0,23,36,3,0,9,44,8),wo(0,11,15,-7,0,24,38,3,0,9,46,8)],Mo={borderRadius:4};function Eo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return 0===r.length?e(1):1===r.length?e(r[0]):r.map((function(t){var r=e(t);return"number"==typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var Oo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Io={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},To=function(e){return"".concat(Math.round(e),"ms")},Ao={easing:Oo,duration:Io,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?Io.standard:r,i=t.easing,o=void 0===i?Oo.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Zi(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:To(n)," ").concat(o," ").concat("string"==typeof s?s:To(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},jo={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var ko=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,i=void 0===n?{}:n,o=e.palette,a=void 0===o?{}:o,s=e.shadows,u=e.spacing,l=e.typography,c=void 0===l?{}:l,p=Zi(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),f=xo(a),d=no(r),m=Eo(u),h=Ji({breakpoints:d,direction:"ltr",mixins:io(d,m,i),overrides:{},palette:f,props:{},shadows:s||So,typography:Co(f,c),spacing:m},to({shape:Mo,transitions:Ao,zIndex:jo},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});function Lo(e,t){return i.createElement(d,{generateClassName:t},i.createElement(m,{theme:ko},e))}var Po=f({productionPrefix:"q".concat("20ea"),disableGlobal:!0,seed:""});function No(){return function(e){var t;e.renderer("react",function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,r=e.y,n=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return s.x=Number.isNaN(t)?s.x:t,s.y=Number.isNaN(r)?s.y:r,s.width=Number.isNaN(n)?s.width:n,s.height=Number.isNaN(i)?s.height:i,void 0!==o&&(s.scaleRatio.x=Number.isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=Number.isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==a&&(s.margin.left=Number.isNaN(a.left)?0:a.left,s.margin.top=Number.isNaN(a.top)?0:a.top),s}return function(){var t,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,n=void 0===r?document.createElement.bind(document):r,i=e(),o={element:function(){return t},root:function(){return t},appendTo:function(e){return t||((t=n("div")).style.position="absolute",t.style["-webkit-font-smoothing"]="antialiased",t.style["-moz-osx-font-smoothing"]="antialiased",t.style.pointerEvents="none"),e.appendChild(t),t},render:function(e){if(!t)return!1;var r=i.scaleRatio.x,n=i.scaleRatio.y;return t.style.left="".concat(Math.round(i.margin.left+i.x*r),"px"),t.style.top="".concat(Math.round(i.margin.top+i.y*n),"px"),t.style.width="".concat(Math.round(i.width),"px"),t.style.height="".concat(Math.round(i.height),"px"),t.style.transform="scale(".concat(r,", ").concat(n,")"),t.style.transformOrigin="top left",p.render(Lo(e,Po),t),!0},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){return t&&p.unmountComponentAtNode(t),o},destroy:function(){t&&t.parentElement&&(p.unmountComponentAtNode(t),t.parentElement.removeChild(t)),t=null},size:function(t){return t&&(i=e(t)),i}};return o}}()),e.component("data-title",Ui()),e.component("disclaimer",((t=function(e){Y(r,i.Component);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"render",value:function(){var e=this.props,t=e.label,r=e.spanStyle;return i.createElement(i.Fragment,null,i.createElement("span",{ref:this.alignToRef,style:r,title:t},t))}}]),r}()).propTypes={label:Si.string.isRequired,spanStyle:Si.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render:function(){var e=this.settings,r=e.settings,n=r.label,o=r.rtl,a=e.layout.dock,s="top"!==a&&"bottom"!==a||!o?"ltr":"rtl",u=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}(a,this.rect),l="center"===a?n:"* ".concat(n),c="center"!==a?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return i.createElement("div",{style:u,dir:s},i.createElement(i.Fragment,null,i.createElement(t,{label:l,spanStyle:c})))}}))}}function Ro(e){return xt(e).l<70}function Fo(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var _o={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings,n=t.component(r.component);if(!n)return[];var i=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(i.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];for(var o,a,s,u=[],l=i[i.length-1],c=0;c<i.length;c+=1){var p=i[c],f=l.attrs.fill,d=p.attrs.fill;if(o=f,a=void 0,s=void 0,((a=xt(d).l/100)>(s=xt(o).l/100)?(a+.05)/(s+.05):(s+.05)/(a+.05))<=1.2){var m=p.desc.slice,h=m.start,v=m.offset,g=p.desc.slice,y=g.innerRadius,b=g.outerRadius;if(y=Math.max(y,l.desc.slice.innerRadius),(b=Math.min(b,l.desc.slice.outerRadius))>y){var x=Fo({r:b,a:h},v),q=Fo({r:y,a:h},v);u.push({type:"line",x1:x.x,y1:x.y,x2:q.x,y2:q.y,strokeWidth:1,opacity:.4,stroke:Ro(d)?"#ccc":"#333"})}}l=p}return u}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Vo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ho(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zo(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="",n=0;n<e.length;n++){var i=e[n];r+=0===n?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),r+=" "}return t&&(r+="Z"),r}function Uo(e){var t=e.size,r=e.angle,n={x:e.x,y:e.y},i=t/2,o=e.x-i,a=e.y-i,s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];return s=s.map((function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},n=Math.cos(t),i=Math.sin(t),o=Ho(e,r);return Vo({x:n*o.x-i*o.y,y:i*o.x+n*o.y},r)}(e,r,n)})),{type:"path",fill:e.fill,d:zo(s)}}var Bo={require:["chart"],defaultSettings:{settings:{},style:{}},render:function(){return function(e){var t=e.chart,r=e.settings;if(!t.component(r.component))return[];var n=t.findShapes(r.selector).filter((function(e){return e.key===r.component}));if(n.length<2)return[];for(var i,o,a=[],s=0;s<n.length;s+=1){var u=n[s];if(u.data.radius.value<0){var l=u.desc.slice,c=l.start,p=l.end,f=l.offset,d=(c+p)/2,m=(i={r:r.offset,a:d},{x:(o=f).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),h=Uo(R({size:r.size,fill:r.fill,angle:d+Math.PI},m));h.data=R(R({},u.data),{},{_share:u.desc.share,_fillColor:u.attrs.fill}),a.push(h)}}return a}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Wo(e){return(Wo="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function Yo(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Ko(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Yo(o,n,i,a,s,"next",e)}function s(e){Yo(o,n,i,a,s,"throw",e)}a(void 0)}))}}function $o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jo(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 Zo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(r),!0).forEach((function(t){$o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Go(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||ea(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 Qo(e){return function(e){if(Array.isArray(e))return ta(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ea(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 ea(e,t){if(e){if("string"==typeof e)return ta(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)?ta(e,t):void 0}}function ta(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 ra=Object.prototype.hasOwnProperty,na=Object.prototype.toString,ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,aa=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===na.call(e)},sa=function(e){if(!e||"[object Object]"!==na.call(e))return!1;var t,r=ra.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ra.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ra.call(e,t)},ua=function(e,t){ia&&"__proto__"===t.name?ia(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},la=function(e,t){if("__proto__"===t){if(!ra.call(e,t))return;if(oa)return oa(e,t).value}return e[t]},ca=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!=F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(r in t)n=la(s,r),s!==(i=la(t,r))&&(c&&i&&(sa(i)||(o=aa(i)))?(o?(o=!1,a=n&&aa(n)?n:[]):a=n&&sa(n)?n:{},ua(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&ua(s,{name:r,newValue:i}));return s};function pa(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function fa(e,t){return{range:function(e){var r=e.resources,n=e.data,i=r.theme.palette("categorical",t);return n.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function da(e,t,r,n,i){var o,a=i.byRow,s=i.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var u=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,u)}return{}}function ma(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var i=r[n.activeDimensionIndex];n=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function ha(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function va(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ga(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ya(){}var ba=1/.7,xa="\\s*([+-]?\\d+)\\s*",qa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Da="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ca=/^#([0-9a-f]{3,8})$/,wa=new RegExp("^rgb\\("+[xa,xa,xa]+"\\)$"),Sa=new RegExp("^rgb\\("+[Da,Da,Da]+"\\)$"),Ma=new RegExp("^rgba\\("+[xa,xa,xa,qa]+"\\)$"),Ea=new RegExp("^rgba\\("+[Da,Da,Da,qa]+"\\)$"),Oa=new RegExp("^hsl\\("+[qa,Da,Da]+"\\)$"),Ia=new RegExp("^hsla\\("+[qa,Da,Da,qa]+"\\)$"),Ta={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 Aa(){return this.rgb().formatHex()}function ja(){return this.rgb().formatRgb()}function ka(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ca.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?La(t):3===r?new Fa(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Pa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Pa(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=wa.exec(e))?new Fa(t[1],t[2],t[3],1):(t=Sa.exec(e))?new Fa(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ma.exec(e))?Pa(t[1],t[2],t[3],t[4]):(t=Ea.exec(e))?Pa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Oa.exec(e))?za(t[1],t[2]/100,t[3]/100,1):(t=Ia.exec(e))?za(t[1],t[2]/100,t[3]/100,t[4]):Ta.hasOwnProperty(e)?La(Ta[e]):"transparent"===e?new Fa(NaN,NaN,NaN,0):null}function La(e){return new Fa(e>>16&255,e>>8&255,255&e,1)}function Pa(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fa(e,t,r,n)}function Na(e){return e instanceof ya||(e=ka(e)),e?new Fa((e=e.rgb()).r,e.g,e.b,e.opacity):new Fa}function Ra(e,t,r,n){return 1===arguments.length?Na(e):new Fa(e,t,r,null==n?1:n)}function Fa(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _a(){return"#"+Ha(this.r)+Ha(this.g)+Ha(this.b)}function Va(){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 Ha(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function za(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,r,n)}function Ua(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof ya||(e=ka(e)),!e)return new Ba;if(e instanceof Ba)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function Ba(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Wa(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 Ya(e){return function(){return e}}function Ka(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ya(isNaN(e)?t:e)}va(ya,ka,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Aa,formatHex:Aa,formatHsl:function(){return Ua(this).formatHsl()},formatRgb:ja,toString:ja}),va(Fa,Ra,ga(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Fa(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:_a,formatHex:_a,formatRgb:Va,toString:Va})),va(Ba,(function(e,t,r,n){return 1===arguments.length?Ua(e):new Ba(e,t,r,null==n?1:n)}),ga(ya,{brighter:function(e){return e=null==e?ba:Math.pow(ba,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ba(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 Fa(Wa(e>=240?e-240:e+120,i,n),Wa(e,i,n),Wa(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 $a=function e(t){var r=function(e){return 1==(e=+e)?Ka: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):Ya(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Ra(e)).r,(t=Ra(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ka(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),Ja=/^class(-pyramid)?/,Za=function(e,t,r,n){var i=void 0!==r.min?r.min:n.min(),o=void 0!==r.max?r.max:n.max(),a=i,s=o,u=t.limits,l={},c="percent"===t.limitType?u.map((function(e){return i+(o-i)*e})):u,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(Qo(c))),o=Math.max.apply(Math,[o].concat(Qo(c))),l.min=i,l.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))l.type="categorical",Object.assign(l,function(e){var t=e.min,r=e.max,n=e.limits,i=e.range,o=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(n[0]>r)a.push(t,r),o.push(i[0],i[0],i[0]);else{if(n[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){o.push(i[s]);break}}for(var u=0;u<n.length;u++)t<n[u]&&n[u]<r&&(a.push(n[u]),o.push(i[u]));if(n[n.length-1]<r)a.push(r),o.push(i[n.length]),o.push(i[n.length]);else{a.push(r);for(var l=0;l<n.length;l++)if(n[l]>r){o.push(i[l]),o.push(i[l]);break}}}else o.push(i[0]);return{min:t,max:r,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:p,limits:"percent"===t.limitType?c:u}));else if(t.breakTypes){var f=t.breakTypes;l.type="continuous",l.domain=[i],l.range=[p[0]];for(var d=0;d<c.length;d+=1)if(f[d]){var m=p[d],h=p[d+1],v=$a(m,h)(.5);l.range.push(v),l.domain.push(c[d]),d<c.length-1&&f[d+1]&&(l.range.push(p[d+1]),l.domain.push((c[d]+c[d+1])/2))}else l.range.push(p[d]),l.range.push(p[d+1]),l.domain.push(c[d]),l.domain.push(c[d]+Math.min(1e-6,(o-i)/1e6));l.range.push(p[p.length-1]),l.domain.push(o)}else l.domain=c,l.range=p;return l};function Ga(e,t,r,n,i){var o,a,s,u=0,l=[],c=(e-t)/(n+1);if(0===c)return 1;for(o=0;o<r.length;o+=1)a=.99*(r[o]-t),s=r[o]>e?Math.floor(e/c):r[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(l[s]?l[s]+=1:l[s]=1);for(o=0;o<l.length;o+=1)l[o]&&(u+=1);return u<=n||u>=i?Math.max(u,n):Ga(e,t,r,n+1,i)}var Xa=function(e,t,r,n){var i,o,a=t.theme,s=t.hc,u=n.f,l={mode:"field",fieldType:"measure",field:u?u.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(u){if(Number.isNaN(+u.min())||Number.isNaN(+u.max()))return{invalid:!0};(p=!("S"===(i=r.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=r.pic.extract({field:0,props:{num:{field:u.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Qo(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===r.input.autoMinMax){if(l.min=r.input.measureMin,l.max=r.input.measureMax,l.max<l.min)return{invalid:!0}}else if(u&&!p)l.min=u.min(),l.max=u.max();else if(u){if(!c.length)return{invalid:!0};l.min=Math.min.apply(Math,Qo(c)),l.max=Math.max.apply(Math,Qo(c))}if(r.input.measureScheme&&(l.palettes={quant:r.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];l.type=f&&Ja.test(f.type)?"categorical":"continuous","categorical"===l.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Qo(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===l.type){for(var d=p?Ga(l.max,l.min,c,1,o):o,m=(l.max-l.min)/d,h=[],v=0;v<d+1;v+=1)h.push(l.min+m*v);l.domain=h,l.range=function(e){for(var t=e.resources.theme.palette("quant",d),r=Math.max(1,Math.floor(t.length/d)),n=[],i=0;i<d;i+=1)n.push(t[i*r]);return[n[0]].concat(n,[n[n.length-1]])}}return l};function Qa(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function es(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function ts(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=r.indexOf(o);-1===s?(r.push(o),n.push(a.primary)):n[s]=a.primary,e[o]=null}else if(a){i.push(o);var u=r.indexOf(o);-1!==u&&(r.splice(u,1),n.splice(u,1))}}return{domain:r,range:n,exclude:i}}function rs(e,t,r,n){var i=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Qa:o,s=r.input.byMeasureDef||{activeMeasureIndex:0},u=a(r,s),l=Xa(0,{theme:n,hc:i},r,{f:u});if(l.invalid)return l;("expression"===s.type||s.activeMeasureIndex<0)&&(l.label=s.label,u&&"color.altLabel"===u.raw().labelExpRef&&(l.label=r.input.altLabel)),!l.label&&u&&(l.label=u.title());var c=s.activeMeasureIndex>=0?u:null;if(!c&&u&&void 0!==u.raw().matchMeasure&&u.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[u.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&ca(l,Za(e,p.gradient,l,c))}else l.auxiliary=s;return l}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.getCDef,o=void 0===i?ma:i,a=n.getCByField,s=void 0===a?ha:a,u=n.getPersistence,l=void 0===u?da:u,c=o(t,r),p=s(r,c),f=p?p.raw():{},d=r&&r.pic?r.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!d.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===f.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),ca(m,l(t,r,c,p,{byRow:fa,byElemNo:pa})),m}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var u=Xa(0,{hc:i,theme:o},r,{f:s});return u.invalid||(u.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),u}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var i=t.hc,o=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var u=[],l=[];"measure"===r.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){u.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?l.push(n.primary):l.push(i)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=o?o.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:u.length?{domain:u,range:l}:void 0}}if("dimension"===s){var f=[],d=[];return i.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(r);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?d.push(n.primary):d.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:d}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(r,i){return function(e){var t,r=e.cm,n=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),Zo(Zo({},r),{},{mode:"constant",type:"constant",primary:n})}(r,o,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),o=i;return Zo(Zo({},r),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(i,a,n):null}({cm:e,input:r,defaults:n,index:i,pic:t.pic})})),function(e,t){var r,n,i,o=t.translator;if(es(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=ts(e.measureOverrides,e.explicit),es(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=ts(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,r)):i}function ns(e){var t=Zo({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(n.auto=e,i):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,i):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,i):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,i):n.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ca(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=n.auto(e.layout);r.input=ca(!0,{},r.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=r.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(r.input=ca(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return n.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?n.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var o=r.pic.field(e.field);return Za(i,n.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],u=n[1]?n[1].colorMap:null;if(s){var l=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=l}return u?function(e,t,r,n){var i=n.external,o=n.field,a=Zo({},e);ca(a,pa(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,ca(a,pa(o)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ca(a,pa(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},i=0;i<e.length;i+=1)n[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var u=i.items[s],l=(u.text||u).label;n[l]&&-1===a.indexOf(u.value)&&(a.push(u.value),o.push(t.resolveUIColor(n[l])))}return a.push(-3,-2),o.push(r.others),o.push(r.nil),a},range:function(){return o}}}(t.colors,r,a)),a}(a,u,i,{external:t,field:r.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=Zo(Zo({},e),n.getDataColorSpecials())),r.settings=ca(e,rs(this,r,t,e))}return r.settings}};return i}var is=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var i=t.coloring;i&&(n.measureGradient=i.gradient)}else if("dimension"===r){var o=t[0],a=t[1];o&&(n.legendDataPage=o),a&&(n.dimValsData=a.colorMap)}return n},os=function(e){throw e.isHandled=!0,e},as=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},ss=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},us=function(e,t){var r=t.layout,n=t.model,i=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&i?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(os):Promise.reject()};function ls(e){var t=e.hc,r=e.source,n=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function cs(e){return function(t){return"object"===Wo(t.datum[e])?t.datum[e].value:void 0}}function ps(e){return"object"===Wo(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function fs(e){return-3===e.datum.value}var ds=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return r?"left":"right"},ms=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function hs(e,t){var r=e.styleReference,n=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,u=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:ds(o,n,i)},show:"function"==typeof o.show?function(){return ms(o,u,a)}:ms(o,u,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function vs(e,t,r){var n=[],i=[],o=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=hs(e,t);if(!n.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,u=e.settings,l=e.style,c=t.scaleKey,p=t.theme,f=t.scales,d={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return ca(!0,n,{type:"legend-cat",key:"".concat(i,"-cat"),scale:m in f?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(o,"legend.label","color"):void 0,fontSize:p?p.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:d[r]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:u,style:l})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,u=t.theme,l=hs(e,t);return!!l.show&&ca(!0,l,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:u?u.getStyle(n,"legend.label","color"):void 0,fontSize:u?u.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:u?u.getStyle(n,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==l.layout.dock&&"bottom"!==l.layout.dock?void 0:"right",padding:parseFloat(l.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,r&&r.navigationDisabled);return n.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=i&&null!==(n=i.interact)&&void 0!==n&&n.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=r.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,r)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===r||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:(e={},$o(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),$o(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),$o(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:i,components:n}}var gs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function ys(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=ns(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return as(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ss(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,i=t.app;return us(e,{layout:r,model:n,app:i})}));return r.getSnapshotData=is,r}({resources:e}),r={},n={},i=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},o={config:function(i){if(r=Zo({},i),n={},!r.key)throw new Error("Missing key");t.set(Zo(Zo({},e),r))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=Zo(Zo({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var r=i();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,i=[];if(r&&r.palettes&&n){var o=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||n.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,u=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(u){var l=u.colors[0]?u.colors:[[]].concat(Qo(u.colors.slice(1)));l=Array.isArray(l[0])?l.map((function(e){return e.slice().reverse()})):l.slice().reverse(),i.push({key:"quant",colors:l})}}return i}({coloring:i(),colorProps:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},u=i;if(r){var l={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Qo((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Qo((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=ls({hc:t,source:o,coloring:r}).data;if(r.legendDataset){var f=0,d={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return d[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return d[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.domain,explicit:l,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[u]=m,c&&(s["".concat(u,"Legend")]=Zo(Zo({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[u]=ca({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[u].type&&(s["".concat(u,"Range")]=ca({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var v={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=v}else if("measure"===r.mode){var g={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:l,type:"categorical-color"};s[u]=g}}return s}({hc:r.hc,coloring:i(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,i=cs(n),o=cs("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,u=e.nil,l=e.others,c=e.primary,p=e.type;return a?function(e){return fs(e)||o(e)?l:u}:r[t]?function(e){return fs(e)?l:ps(e)||-2===i(e)&&"dimension"===n||"NaN"===i(e)?u:o(e)?l:e.resources.scale(t)(i(e))||l}:"constant"===s?function(e){return fs(e)||o(e)?l:ps(e)?u:c}:"color"===p?function(e){return fs(e)||o(e)?l:ps(e)?u:i(e)||l}:null},s=a(t,n);if(t.measureOverrides){var u=cs("".concat(n,"MeasureIdx")),l=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=u(e);return l[t]?l[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(r={field:t,reduce:"first"},"color"===i.type&&(r.value=function(e){return"NaN"!==e.qNum?gs(e.qNum):e.qText&&ka(e.qText)?e.qText:c})):"dimension"===i.mode?r=void 0!==i.field?i.field:n.qDimensionInfo.length-1:"measure"===i.mode&&(r=u);var p=$o({},l,r);return n.qDimensionInfo.length>1&&(p["".concat(l,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(l,"MeasureIdx")]=u),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,o=e.viewState,a=e.chart,s=e.rtl,u=e.styleReference,l=void 0===u?"object.legend":u,c=e.settings,p=void 0===c?{}:c,f=e.style,d=void 0===f?{}:f,m=arguments.length>1?arguments[1]:void 0;return vs({eventName:t,key:n,rtl:s,viewState:o,chart:a,styleReference:l,settings:p,style:d},{legendProps:r.legendProps,scaleKey:r.key,coloring:i(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return o}var bs=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function xs(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,i=r.some(bs),o=n.some(bs),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Zo(Zo(Zo({},e),t),{},{colorProps:Zo(Zo({},e.colorProps),t.colorProps||{})});return r}var Ds=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Cs(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ds),n=e.qHyperCube.qMeasureInfo.some(Ds),i=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var ws=function(){};function Ss(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(n,o)};clearTimeout(t),t=setTimeout(s,r)}}function Ms(e){var t=e.originalArray,r=e.newArray,n=e.matchKey;return Array.isArray(t)&&t.length?(r.forEach((function(e){var r=-1;t.some((function(t,i){return t[n]&&t[n]===e[n]&&(r=i),r})),r>-1?t[r]=e:t.push(e)})),t):r}function Es(e){return(Es="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}function Os(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(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 Ts(e,t,r){return t&&Is(e.prototype,t),r&&Is(e,r),e}function As(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function js(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 ks(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?js(Object(r),!0).forEach((function(t){As(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):js(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ls(e,t){return(Ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ps(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ns(e,t,r){return(Ns=Ps()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Ls(i,r.prototype),i}).apply(null,arguments)}function Rs(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)||Fs(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 Fs(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}}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}var Vs=Object.prototype.hasOwnProperty,Hs=Object.prototype.toString,zs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,Bs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hs.call(e)},Ws=function(e){if(!e||"[object Object]"!==Hs.call(e))return!1;var t,r=Vs.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Vs.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Vs.call(e,t)},Ys=function(e,t){zs&&"__proto__"===t.name?zs(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ks=function(e,t){if("__proto__"===t){if(!Vs.call(e,t))return;if(Us)return Us(e,t).value}return e[t]},$s=function e(){var t,r,n,i,o,a,s=arguments[0],u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),(null==s||"object"!=F(s)&&"function"!=typeof s)&&(s={});u<l;++u)if(null!=(t=arguments[u]))for(r in t)n=Ks(s,r),s!==(i=Ks(t,r))&&(c&&i&&(Ws(i)||(o=Bs(i)))?(o?(o=!1,a=n&&Bs(n)?n:[]):a=n&&Ws(n)?n:{},Ys(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&Ys(s,{name:r,newValue:i}));return s};function Js(e,t,r){if(!e)return-1;var n=r.cache,i=e.origin?e.origin():null;i&&(e=i);var o=n.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<n.wrappedFields.length;u++)if(s=n.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function Zs(e,t,r){var n=r.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function Gs(e){var t=e.cache,r=e.f,n=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,p=n;if(i.field&&i.field!==r){var f=Js(i.field,o,{cache:t});if(-1===f)return;p=$s({qRow:a},f(s))}l[c]=Zs(i,p,{key:u})}function Xs(e,t,r,n){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),u=t.key(),l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=!!i[a].trackBy,h=Es(i[a].trackBy),v={},g=[],y=[],b=0;b<s.qDataPages.length;b++){var x=Js(l,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=$s({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Zs(f,C,{key:u});if(!f.filter||f.filter(C)){for(var S=0;S<d.length;S++){var M=p[d[S]],E=M.fields||[M];M.fields&&(w[d[S]]=[]);for(var O=0;O<E.length;O++)Gs({cache:r,f:l,mainCell:C,p:E[O],prop:d[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:u,target:M.fields?w[d[S]]:w,targetProp:M.fields?O:d[S]});if(M.fields){var I=w[d[S]].map((function(e){return e.value})),T=w[d[S]].map((function(e){return e.label}));w[d[S]]={value:"function"==typeof M.value?M.value(I):void 0!==M.value?M.value:I,label:"function"==typeof M.label?M.label(T):void 0!==M.label?String(M.label):String(w[d[S]].value)}}}m&&n.track({cfg:i[a],itemData:C,obj:w,target:g,tracker:v,trackType:h}),y.push(w)}}}m?o.push.apply(o,Rs(n.collect(g,{main:f,propsArr:d,props:p}))):o.push.apply(o,y)}return o}function Qs(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function eu(e,t){var r,n,i,o,a,s=new iu(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=tu);r=l.pop();)if(u&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)l.push(n=r.children[o]=new iu(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(nu)}function tu(e){return e.children}function ru(e){e.data=e.data.data}function nu(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function iu(e){this.data=e,this.depth=this.height=0,this.parent=null}function ou(e){if("function"!=typeof e)throw new Error;return e}iu.prototype=eu.prototype={constructor:iu,count:function(){return this.eachAfter(Qs)},each:function(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,r,n=this,i=[n];n=i.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return eu(this).eachBefore(ru)}};var au={depth:-1},su={};function uu(e){return e.id}function lu(e){return e.parentId}function cu(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),i=t,o=0;o<n.length;o++){if("*"===n[o]&&Array.isArray(i)){var a=[];r=n.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=cu(r,i[s]);Array.isArray(u)?a.push.apply(a,Rs(u)):a.push(u)}return a}if(!n[o]&&Array.isArray(i)){var l=new Array(i.length);r=n.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=cu(r,i[c]);return l}n[o]in i&&(i=i[n[o]])}return i}function pu(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var i=r>=0?[e[r]]:e;n.push.apply(n,Rs(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&n.push.apply(n,Rs(pu(e[o].children,t-1,r)));return n}function fu(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),i=Rs(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return pu(e.children,o-1,r)}}return!1}function du(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var i=0;i<n.length;i++)if(e(n[i]))return n[i];return!1}if("string"==typeof e){for(var o=0;o<n.length;o++)if(n[o].key()===e||n[o].title()===e)return n[o]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var mu=/^qDimensionInfo(?:\/(\d+))?/,hu=/^\/?qMeasureInfo\/(\d+)/,vu=/\/qAttrExprInfo\/(\d+)/,gu=/\/qAttrDimInfo\/(\d+)/;function yu(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function bu(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=n,p=r.qEffectiveInterColumnSortOrder,f=yu(r);return mu.test(c)&&(i=!0,o=+mu.exec(c)[1],c=n.replace(mu,"")),hu.test(c)&&("K"===r.qMode?u=+hu.exec(c)[1]:p&&-1!==p.indexOf(-1)?(u=+hu.exec(c)[1],l=0):l=+hu.exec(c)[1],c=c.replace(hu,"")),c&&(gu.exec(c)?s=+gu.exec(c)[1]:vu.exec(c)&&(a=+vu.exec(c)[1])),{fieldDepth:(i?"S"===r.qMode?f[o]:p?p.indexOf(o):o:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function xu(e,t){var r,n,i=fu(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:i,attrFn:n,valueFn:r}}function qu(e,t,r){var n=r.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function Du(e){for(var t=e.propsArr,r=e.props,n=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=r[t[s]],l=u.fields||[u],c=void 0,p=void 0;u.fields&&(c=[],p=[]);for(var f=function(e){var r=l[e],f=void 0,d=void 0,m=void 0,h=void 0,v=void 0,g=void 0;if("primitive"===r.type?(m=r.value,g=String(r.value)):("function"==typeof r.value&&(f=function(e){return r.value(e,n)}),"function"==typeof r.label&&(d=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(v=h.map(r.valueAccessor),r.attrAccessor&&(v=v.map(r.attrAccessor)),f&&(m=v.map(f),f=null),d&&(g=v.map(d),d=null),m=r.reduce?r.reduce(m):m,g=r.reduceLabel?r.reduceLabel(g,m):String(m)):g=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=i,g=i)),u.fields){var y=f?f(m):m;c.push(y),p.push(d&&null!=g?d(g):null!=g?g:String(y))}else{var b=f?f(m):m;o[t[s]]={value:b,label:d?d(g):null!=g?g:String(b)},r.field&&(o[t[s]].source={field:r.field.key(),key:a})}},d=0;d<l.length;d++)f(d);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,n):c,label:"function"==typeof u.label?u.label(p,n):p})}}var Cu=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=cu(n,e);return o&&o[0]?(t.tree=eu(o[0],r.children||function(e){return e[i]}),t.tree):null};function wu(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}(e),n=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var u=t[s],l="__root",c=!1,p=0;p<i.length;p++){var f=u[i[p]],d="".concat(l,"__").concat(f.qText);a[d]||(a[d]=ks({__id:d,__parent:l,qValues:[]},f),c=!0),l=d}if(c)for(var m=0;m<o.length;m++){var h=u[o[m]];a[l].qValues.push(h)}}var v=Object.keys(a).map((function(e){return a[e]}));return function(){var e=uu,t=lu;function r(r){var n,i,o,a,s,u,l,c=r.length,p=new Array(c),f={};for(i=0;i<c;++i)n=r[i],s=p[i]=new iu(n),null!=(u=e(n,i,r))&&(u+="")&&(f[l="$"+(s.id=u)]=l in f?su:s);for(i=0;i<c;++i)if(s=p[i],null!=(u=t(r[i],i,r))&&(u+="")){if(!(a=f["$"+u]))throw new Error("missing: "+u);if(a===su)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=au,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(nu),o.parent=null,c>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=ou(t),r):e},r.parentId=function(e){return arguments.length?(t=ou(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(v)}var Su=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=r[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var p=l[c];if(p.field!==a){var f=xu(o,bu(p.field,{cube:n,cache:i}));p.accessor=f.nodeFn,p.valueAccessor=f.valueFn,p.attrAccessor=f.attrFn}}};function Mu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?wu(t):Cu(i,r,e);if(!a)return null;for(var s=a.height,u=[],l=0;l<=s;l++){var c=null;if(l>0)if("S"===i.qMode){var p=yu(i),f=p[l-1];c=r.fields[f]}else{var d=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(d=i.qDimensionInfo.length),c=r.fields[d]}var m=n.normalizeConfig(ks(ks({},e),{},{field:c?c.key():void 0}),t),h=m.props,v=m.main,g=Object.keys(h);u[l]={propsArr:g,props:h,main:v};var y=c?bu(c,{cube:i,cache:r}):{fieldDepth:0};Su({propsArr:g,props:h,cube:i,cache:r,itemDepthObject:y,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=u[q[D].depth].propsArr,w=u[q[D].depth].props,S=u[q[D].depth].main,M=x[D],E=M.data,O=qu(S,E,{key:o});Du({propsArr:C,props:w,item:M,itemData:E,ret:O,sourceKey:o,isTree:!0}),q[D].data=O}return a}function Eu(e,t,r,n){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),u=t.key();if(!Cu(s,r,e))continue;var l="object"===Es(i[a].field)?i[a].field:t.field(i[a].field),c=n.normalizeConfig(i[a],t),p=c.props,f=c.main,d=Object.keys(p),m=bu(l,{cube:s,cache:r}),h=xu({fieldDepth:0},m),v=h.nodeFn,g=h.attrFn,y=h.valueFn;Su({propsArr:d,props:p,cube:s,cache:r,itemDepthObject:m,f:l});for(var b=!!i[a].trackBy,x=Es(i[a].trackBy),q={},D=[],C=v(r.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=g?g(y(M)):y(M);if(!f.filter||f.filter(E)){var O=qu(f,E,{key:u});Du({propsArr:d,props:p,item:M,itemData:E,ret:O,sourceKey:u}),b&&n.track({cfg:i[a],itemData:E,obj:O,target:D,tracker:q,trackType:x}),w.push(O)}}b?o.push.apply(o,Rs(n.collect(D,{main:f,propsArr:d,props:p}))):o.push.apply(o,w)}return o}var Ou,Iu=(function(e){
7
+ import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as d,StylesProvider as f,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as y,useState as v,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as M,usePlugins as S,useEmbed as E,useTheme as I,useConstraints as T,useAppLayout as A,usePromise as O,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var N={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}const R=(e,t,r,n,o)=>e?e.getStyle(t,r,n):o;var F=Object.freeze({__proto__:null,getThemeStyle:R});function V(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _=Object.prototype.hasOwnProperty,H=Object.prototype.toString,z=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===H.call(e)},W=function(e){if(!e||"[object Object]"!==H.call(e))return!1;var t,r=_.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||_.call(e,t)},$=function(e,t){z&&"__proto__"===t.name?z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Y=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(U)return U(e,t).value}return e[t]},K=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Y(s,r),s!==(o=Y(t,r))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=n&&B(n)?n:[]):a=n&&W(n)?n:{},$(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:r,newValue:o}));return s};const J="center",Z="bottom";var G={NoDataExist:{label:"NoDataExist",alignment:J,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:J,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:J,default:!1},LimitedData:{label:"LimitedData",alignment:Z,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:Z,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:Z,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:Z,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Q={};X.forEach((([e,{width:t,height:r}])=>{Q[e]={width:t,height:r}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let r;for(r=0;r<X.length;++r)if(e>=X[r][1].width&&t>=X[r][1].height)return X[r][0];return"SPARK"}};function te(e,t){return{layoutModes:ee.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const re=(e,t,r)=>{const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(void 0===i[n[o]])return r;i=i[n[o]]}return i};function ne(e,t){const r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}function oe(){if(!document.querySelector("#la-vie-tooltip")){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ie({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){oe()},beforeUpdate(){oe()},destroyed(){!function(){const e=document.querySelector("#la-vie-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#la-vie-tooltip"),content:({h:e,data:t,style:r})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:r}){return e.map((e=>{const n={style:{...r.cell||{},...e.style||{}},class:e.class};return e.colspan&&(n.colspan=e.colspan),t("td",n,e.content)}))}(t,{h:e,style:r})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const ae=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),se=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),le=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ue={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ae.test(e),isRtlChar:e=>se.test(e)||le.test(e),detectTextDirection(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],ue.isLtrChar(n))return"ltr";if(ue.isRtlChar(n))return"rtl"}return"ltr"}},ce={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,r){const n=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(r.coloring.label&&(a.label=""+r.coloring.label),"color"!==r.coloring.type&&n.fillTooltip){const e=o("fill"),t="measure"===r.coloring.fieldType;if(a.value=t&&e?e(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){const e=i(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===n._fillColor?ce.getNodeFillColor(t):n._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const r=ue.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow(e,t){const r=ue.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:r},colspan:2},{}]},getNMoreRow(e,t,r){const n=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:n,style:{"font-weight":"bold","text-align":r?"right":"left",direction:ue.detectTextDirection(n)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,r){const n=ue.detectTextDirection(t.color.label),o=r?[":",t.color.label]:[t.color.label,":"],i=ue.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":r?"right":"left",direction:n}},{content:r?[t.color.value,ce.getColorSymbol(e,t)]:[ce.getColorSymbol(e,t),t.color.value],style:{"text-align":r?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,r,n,o=!1){const i=ue.detectTextDirection(e.label),a=n?[":",e.label]:[e.label,":"],s=ue.detectTextDirection(e.value);let l;return l=o?n?[e.value,ce.getColorSymbol(t,r)]:[ce.getColorSymbol(t,r),e.value]:[e.value],[{content:a,style:{"text-align":n?"right":"left",direction:i}},{content:l,style:{"text-align":n?"left":"right",direction:s,"vertical-align":"middle"}}]}};function pe(e,t,r,n){const o=parseInt(R(e,t,r,n),10);if(!isNaN(o))return o}const de=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function fe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((r=>function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?R(t,r,"label.value","color"):de(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId))),fontSize:pe(t,e.themeId,"label.value","fontSize"),fontFamily:R(t,e.themeId,"label.value","fontFamily"),label:e.label}}function me(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function he(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ge(){}var ye=1/.7,ve="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qe=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),Ce=new RegExp("^rgb\\("+[xe,xe,xe]+"\\)$"),we=new RegExp("^rgba\\("+[ve,ve,ve,be]+"\\)$"),Me=new RegExp("^rgba\\("+[xe,xe,xe,be]+"\\)$"),Se=new RegExp("^hsl\\("+[be,xe,xe]+"\\)$"),Ee=new RegExp("^hsla\\("+[be,xe,xe,be]+"\\)$"),Ie={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 Te(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Oe(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?je(t):3===r?new Ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ke(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=De.exec(e))?new Ne(t[1],t[2],t[3],1):(t=Ce.exec(e))?new Ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=we.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=Me.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Se.exec(e))?Ve(t[1],t[2]/100,t[3]/100,1):(t=Ee.exec(e))?Ve(t[1],t[2]/100,t[3]/100,t[4]):Ie.hasOwnProperty(e)?je(Ie[e]):"transparent"===e?new Ne(NaN,NaN,NaN,0):null}function je(e){return new Ne(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ne(e,t,r,n)}function Le(e){return e instanceof ge||(e=Oe(e)),e?new Ne((e=e.rgb()).r,e.g,e.b,e.opacity):new Ne}function Ne(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 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 Fe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ve(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,r,n)}function _e(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof ge||(e=Oe(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new He(a,s,l,e.opacity)}function He(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ze(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}me(ge,Oe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHsl:function(){return _e(this).formatHsl()},formatRgb:Ae,toString:Ae}),me(Ne,(function(e,t,r,n){return 1===arguments.length?Le(e):new Ne(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ne(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:Re,toString:Re})),me(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Ne(ze(e>=240?e-240:e+120,o,n),ze(e,o,n),ze(e<120?e+240:e-120,o,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 Ue=Math.PI/180,Be=180/Math.PI,We=4/29,$e=6/29,Ye=3*$e*$e;function Ke(e){if(e instanceof Je)return new Je(e.l,e.a,e.b,e.opacity);if(e instanceof rt)return nt(e);e instanceof Ne||(e=Le(e));var t,r,n=Qe(e.r),o=Qe(e.g),i=Qe(e.b),a=Ze((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=Ze((.4360747*n+.3850649*o+.1430804*i)/.96422),r=Ze((.0139322*n+.0971045*o+.7141733*i)/.82521)),new Je(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Je(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ze(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ye+We}function Ge(e){return e>$e?e*e*e:Ye*(e-We)}function Xe(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Qe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function et(e){if(e instanceof rt)return new rt(e.h,e.c,e.l,e.opacity);if(e instanceof Je||(e=Ke(e)),0===e.a&&0===e.b)return new rt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Be;return new rt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function tt(e,t,r,n){return 1===arguments.length?et(e):new rt(e,t,r,null==n?1:n)}function rt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function nt(e){if(isNaN(e.h))return new Je(e.l,0,0,e.opacity);var t=e.h*Ue;return new Je(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function ot(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}me(Je,(function(e,t,r,n){return 1===arguments.length?Ke(e):new Je(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return new Je(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Je(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 Ne(Xe(3.1338561*(t=.96422*Ge(t))-1.6168667*(e=1*Ge(e))-.4906146*(r=.82521*Ge(r))),Xe(-.9787684*t+1.9161415*e+.033454*r),Xe(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),me(rt,tt,he(ge,{brighter:function(e){return new rt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new rt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return nt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return ot(e(t),r)}}(e))}(ot);function it(){}function at(e,t){var r=new it;if(e instanceof it)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,o=-1,i=e.length;if(null==t)for(;++o<i;)r.set(o,e[o]);else for(;++o<i;)r.set(t(n=e[o],o,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function st(){}it.prototype=at.prototype={constructor:it,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 lt=at.prototype;function ut(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ct(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function pt(){}st.prototype={constructor:st,has:lt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:lt.remove,clear:lt.clear,values:lt.keys,size:lt.size,empty:lt.empty,each:lt.each};var dt=1/.7,ft="\\s*([+-]?\\d+)\\s*",mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ht="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gt=/^#([0-9a-f]{3})$/,yt=/^#([0-9a-f]{6})$/,vt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),bt=new RegExp("^rgb\\("+[ht,ht,ht]+"\\)$"),xt=new RegExp("^rgba\\("+[ft,ft,ft,mt]+"\\)$"),qt=new RegExp("^rgba\\("+[ht,ht,ht,mt]+"\\)$"),Dt=new RegExp("^hsl\\("+[mt,ht,ht]+"\\)$"),Ct=new RegExp("^hsla\\("+[mt,ht,ht,mt]+"\\)$"),wt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mt(e){var t;return e=(e+"").trim().toLowerCase(),(t=gt.exec(e))?new Tt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=yt.exec(e))?St(parseInt(t[1],16)):(t=vt.exec(e))?new Tt(t[1],t[2],t[3],1):(t=bt.exec(e))?new Tt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xt.exec(e))?Et(t[1],t[2],t[3],t[4]):(t=qt.exec(e))?Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Dt.exec(e))?Ot(t[1],t[2]/100,t[3]/100,1):(t=Ct.exec(e))?Ot(t[1],t[2]/100,t[3]/100,t[4]):wt.hasOwnProperty(e)?St(wt[e]):"transparent"===e?new Tt(NaN,NaN,NaN,0):null}function St(e){return new Tt(e>>16&255,e>>8&255,255&e,1)}function Et(e,t,r,n){return n<=0&&(e=t=r=NaN),new Tt(e,t,r,n)}function It(e){return e instanceof pt||(e=Mt(e)),e?new Tt((e=e.rgb()).r,e.g,e.b,e.opacity):new Tt}function Tt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function At(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ot(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,r,n)}function jt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof pt||(e=Mt(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new kt(a,s,l,e.opacity)}function kt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Lt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ut(pt,Mt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),ut(Tt,(function(e,t,r,n){return 1===arguments.length?It(e):new Tt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+At(this.r)+At(this.g)+At(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),ut(kt,(function(e,t,r,n){return 1===arguments.length?jt(e):new kt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new kt(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,o=2*r-n;return new Tt(Lt(e>=240?e-240:e+120,o,n),Lt(e,o,n),Lt(e<120?e+240:e-120,o,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}}));var Nt=Math.PI/180,Pt=180/Math.PI,Rt=4/29,Ft=6/29,Vt=3*Ft*Ft;function _t(e){if(e instanceof Ht)return new Ht(e.l,e.a,e.b,e.opacity);if(e instanceof Yt){if(isNaN(e.h))return new Ht(e.l,0,0,e.opacity);var t=e.h*Nt;return new Ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Tt||(e=It(e));var r,n,o=Wt(e.r),i=Wt(e.g),a=Wt(e.b),s=zt((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?r=n=s:(r=zt((.4360747*o+.3850649*i+.1430804*a)/.96422),n=zt((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Ht(116*s-16,500*(r-s),200*(s-n),e.opacity)}function Ht(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function zt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Vt+Rt}function Ut(e){return e>Ft?e*e*e:Vt*(e-Rt)}function Bt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function $t(e){if(e instanceof Yt)return new Yt(e.h,e.c,e.l,e.opacity);if(e instanceof Ht||(e=_t(e)),0===e.a&&0===e.b)return new Yt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Pt;return new Yt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Yt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}ut(Ht,(function(e,t,r,n){return 1===arguments.length?_t(e):new Ht(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Ht(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ht(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 Tt(Bt(3.1338561*(t=.96422*Ut(t))-1.6168667*(e=1*Ut(e))-.4906146*(r=.82521*Ut(r))),Bt(-.9787684*t+1.9161415*e+.033454*r),Bt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ut(Yt,(function(e,t,r,n){return 1===arguments.length?$t(e):new Yt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Yt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Yt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return _t(this).rgb()}}));var Kt=-.29227,Jt=-.90649,Zt=1.97294,Gt=Zt*Jt,Xt=1.78277*Zt,Qt=-.6557636667999999;function er(e){if(e instanceof tr)return new tr(e.h,e.s,e.l,e.opacity);e instanceof Tt||(e=It(e));var t=e.r/255,r=e.g/255,n=e.b/255,o=(Qt*n+Gt*t-Xt*r)/(Qt+Gt-Xt),i=n-o,a=(Zt*(r-o)-Kt*i)/Jt,s=Math.sqrt(a*a+i*i)/(Zt*o*(1-o)),l=s?Math.atan2(a,i)*Pt-120:NaN;return new tr(l<0?l+360:l,s,o,e.opacity)}function tr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function rr(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)]}ut(tr,(function(e,t,r,n){return 1===arguments.length?er(e):new tr(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new tr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new tr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Nt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),o=Math.sin(e);return new Tt(255*(t+r*(-.14861*n+1.78277*o)),255*(t+r*(Kt*n+Jt*o)),255*(t+r*(Zt*n)),this.opacity)}}));var nr,or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ir(e){return new ar(e)}function ar(e){if(!(t=or.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function sr(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}ir.prototype=ar.prototype,ar.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var lr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return sr(100*e,t)},r:sr,s:function(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1],i=o-(nr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+rr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ur(e){return e}var cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pr(e){var t,r,n=e.grouping&&e.thousands?(t=e.grouping,r=e.thousands,function(e,n){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return i.reverse().join(r)}):ur,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):ur,s=e.percent||"%";function l(e){var t=(e=ir(e)).fill,r=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):lr[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=lr[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,r=e.length,n=1,o=-1;n<r;++n)switch(e[n]){case".":o=t=n;break;case"0":0===o&&(o=n),t=n;break;default:if(o>0){if(!+e[n])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?cr[8+nr/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var r=l(((e=ir(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=rr(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-n),i=cr[8+n/3];return function(e){return r(o*e)+i}}}}!function(e){pr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var dr=new Date,fr=new Date;function mr(e,t,r,n){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},o.round=function(e){var t=o(e),r=o.ceil(e);return e-t<r-e?t:r},o.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},o.range=function(r,n,i){var a,s=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return s;do{s.push(a=new Date(+r)),t(r,i),e(r)}while(a<r&&r<n);return s},o.filter=function(r){return mr((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&&(o.count=function(t,n){return dr.setTime(+t),fr.setTime(+n),e(dr),e(fr),Math.floor(r(dr,fr))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(n?function(t){return n(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var hr=mr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));hr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):hr:null};mr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),mr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),mr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var gr=mr((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 yr(e){return mr((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 vr=yr(0),br=yr(1);yr(2),yr(3);var xr=yr(4);yr(5),yr(6),mr((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 qr=mr((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()}));qr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((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},mr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),mr((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 Dr=mr((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 Cr(e){return mr((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 wr=Cr(0),Mr=Cr(1);Cr(2),Cr(3);var Sr=Cr(4);Cr(5),Cr(6),mr((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 Er=mr((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 Ir(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 Tr(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 Ar(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((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 Or,jr,kr,Lr={"-":"",_:" ",0:"0"},Nr=/^\s*\d+/,Pr=/^%/,Rr=/[\\^$*+?|[\]().{}]/g;function Fr(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(t)+o:o)}function Vr(e){return e.replace(Rr,"\\$&")}function _r(e){return new RegExp("^(?:"+e.map(Vr).join("|")+")","i")}function Hr(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function zr(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ur(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Br(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $r(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Yr(e,t,r){var n=Nr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Kr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Jr(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 Zr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Gr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Xr(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Qr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function en(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function tn(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function rn(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function nn(e,t,r){var n=Nr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function on(e,t,r){var n=Pr.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function an(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function sn(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function ln(e,t){return Fr(e.getDate(),t,2)}function un(e,t){return Fr(e.getHours(),t,2)}function cn(e,t){return Fr(e.getHours()%12||12,t,2)}function pn(e,t){return Fr(1+gr.count(qr(e),e),t,3)}function dn(e,t){return Fr(e.getMilliseconds(),t,3)}function fn(e,t){return dn(e,t)+"000"}function mn(e,t){return Fr(e.getMonth()+1,t,2)}function hn(e,t){return Fr(e.getMinutes(),t,2)}function gn(e,t){return Fr(e.getSeconds(),t,2)}function yn(e){var t=e.getDay();return 0===t?7:t}function vn(e,t){return Fr(vr.count(qr(e),e),t,2)}function bn(e,t){var r=e.getDay();return e=r>=4||0===r?xr(e):xr.ceil(e),Fr(xr.count(qr(e),e)+(4===qr(e).getDay()),t,2)}function xn(e){return e.getDay()}function qn(e,t){return Fr(br.count(qr(e),e),t,2)}function Dn(e,t){return Fr(e.getFullYear()%100,t,2)}function Cn(e,t){return Fr(e.getFullYear()%1e4,t,4)}function wn(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fr(t/60|0,"0",2)+Fr(t%60,"0",2)}function Mn(e,t){return Fr(e.getUTCDate(),t,2)}function Sn(e,t){return Fr(e.getUTCHours(),t,2)}function En(e,t){return Fr(e.getUTCHours()%12||12,t,2)}function In(e,t){return Fr(1+Dr.count(Er(e),e),t,3)}function Tn(e,t){return Fr(e.getUTCMilliseconds(),t,3)}function An(e,t){return Tn(e,t)+"000"}function On(e,t){return Fr(e.getUTCMonth()+1,t,2)}function jn(e,t){return Fr(e.getUTCMinutes(),t,2)}function kn(e,t){return Fr(e.getUTCSeconds(),t,2)}function Ln(e){var t=e.getUTCDay();return 0===t?7:t}function Nn(e,t){return Fr(wr.count(Er(e),e),t,2)}function Pn(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Sr(e):Sr.ceil(e),Fr(Sr.count(Er(e),e)+(4===Er(e).getUTCDay()),t,2)}function Rn(e){return e.getUTCDay()}function Fn(e,t){return Fr(Mr.count(Er(e),e),t,2)}function Vn(e,t){return Fr(e.getUTCFullYear()%100,t,2)}function _n(e,t){return Fr(e.getUTCFullYear()%1e4,t,4)}function Hn(){return"+0000"}function zn(){return"%"}function Un(e){return+e}function Bn(e){return Math.floor(+e/1e3)}!function(e){Or=function(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=_r(o),c=Hr(o),p=_r(i),d=Hr(i),f=_r(a),m=Hr(a),h=_r(s),g=Hr(s),y=_r(l),v=Hr(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ln,e:ln,f:fn,H:un,I:cn,j:pn,L:dn,m:mn,M:hn,p:function(e){return o[+(e.getHours()>=12)]},Q:Un,s:Bn,S:gn,u:yn,U:vn,V:bn,w:xn,W:qn,x:null,X:null,y:Dn,Y:Cn,Z:wn,"%":zn},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Mn,e:Mn,f:An,H:Sn,I:En,j:In,L:Tn,m:On,M:jn,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Un,s:Bn,S:kn,u:Ln,U:Nn,V:Pn,w:Rn,W:Fn,x:null,X:null,y:Vn,Y:_n,Z:Hn,"%":zn},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=v[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 w(e,t,r,n)},d:Gr,e:Gr,f:nn,H:Qr,I:Qr,j:Xr,L:rn,m:Zr,M:en,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:an,s:sn,S:tn,u:Ur,U:Br,V:Wr,w:zr,W:$r,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:Kr,Y:Yr,Z:Jr,"%":on};function D(e,t){return function(r){var n,o,i,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!=(o=Lr[n=e.charAt(++s)])?n=e.charAt(++s):o="e"===n?" ":"0",(i=t[n])&&(n=i(r,o)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(r){var n,o,i=Ar(1900);if(w(i,e,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(n=Tr(Ar(i.y))).getUTCDay(),n=o>4||0===o?Mr.ceil(n):Mr(n),n=Dr.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(o=(n=t(Ar(i.y))).getDay(),n=o>4||0===o?br.ceil(n):br(n),n=gr.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Tr(Ar(i.y)).getUTCDay():t(Ar(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Tr(i)):t(i)}}function w(e,t,r,n){for(var o,i,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Lr?t.charAt(a++):o])||(n=i(e,r,n))<0)return-1}else if(o!=r.charCodeAt(n++))return-1}return n}return b.x=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Ir);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=C(e,Tr);return t.toString=function(){return e},t}}}(e),jr=Or.utcFormat,kr=Or.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||jr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||kr("%Y-%m-%dT%H:%M:%S.%LZ");const Wn=K.bind(null,!0),$n={},{isArray:Yn}=Array;function Kn(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Jn(e){return void 0===e}function Zn(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Gn(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach(((t,o)=>{if(o===r.length)return;n=+t;const i=isNaN(n)?{}:[];e[n||t]=Jn(e[n||t])?i:e[t],e=e[n||t]})),e}function Xn(e,t){let r=!0;if(Kn(e)&&Kn(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((n=>{Xn(e[n],t[n])||(r=!1)})),r);if(Yn(e)&&Yn(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!Xn(e[r],t[r]))return!1;return!0}return e===t}$n.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Wn({},{val:e}).val:e}(t[o]),a=e[o],s=`${r}/${o}`;Xn(i,a)||Zn(t,o)||(Jn(a)?n.push({op:"add",path:s,value:i}):Kn(i)&&Kn(a)?n=n.concat($n.generate(a,i,s)):Yn(i)&&Yn(a)?n=n.concat(function(e,t,r){let n=[];const o=e.slice();let i=-1;function a(e,t,r){if(e[r]&&Jn(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Xn(t,o))return n;if(!Jn(t[0])&&Jn(t[0].qInfo)||0===t.length)return n.push({op:"replace",path:r,value:t}),n;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(n.push({op:"remove",path:`${r}/${e}`}),o.splice(e,1)):n=n.concat($n.generate(o[e],t[i],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:`${r}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Jn(t[o])&&!Zn(e,o)&&n.push({op:"remove",path:`${r}/${o}`})})),n},$n.apply=function(e,t){t.forEach((t=>{let r=Gn(e,t.path),n=t.path.split("/").splice(-1)[0],o=n&&isNaN(+n)?r[n]:r[+n]||r;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(Yn(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(Yn(o)&&Yn(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Kn(o)&&Kn(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Zn(a,e)&&delete a[e]})),Wn(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const o=Gn(e,t.from);Yn(r)?r.splice(+n,0,o.splice(+i,1)[0]):(r[n]=o[i],delete o[i])}else"remove"===t.op&&(Yn(r)?r.splice(+n,1):delete r[n]);var a}))},$n.clone=function(e){return Wn({},e)},$n.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},$n.updateObject=function(e,t){Object.keys(e).length?$n.apply(e,$n.generate(e,t)):Wn(e,t)};const Qn=[[2,4,6],[2,4],[3]],eo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function to(e,t,r){const n=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<n;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==r&&(i=Math.min(i,r/e[n-1])),e.splice(0,0,i)}function ro(e,t,r){let n;const o=e?e.length:0;for(n=0;n<o;n++)to(e[n],t,r)}!function(){let e,t;for(ro(Qn,1,10),e=0;e<eo.length;e++)if(eo[e])for(t=0;t<eo[e].length;t++)Array.isArray(eo[e][t])&&ro(eo[e][t])}();var no={exports:{}};function oo(){}function io(){}io.resetWarningCache=oo;no.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:io,resetWarningCache:oo};return r.PropTypes=r,r}();var ao=no.exports;function so(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function lo({d:e,size:t,style:r={},viewBox:n="0 0 16 16"}){const i={fontSize:so(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...r};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor"},o.createElement("path",{d:e})))}const uo={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},co={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},po="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",fo={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},mo={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function ho(e,t,r){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:r}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");let n=$n.generate(t,r);n&&n.length&&(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(n,!0))}))}function go(e,t,r,n,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[n][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),ho(e,a,s)}))}function yo({dir:e,dock:t,altList:r,model:n,translator:o,app:i,onChange:a}){return 0===r.length?null:{dir:e,dock:t,getAlternatives(){const e=r.map((e=>function(e,t,r){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:r.get("Object.ErrorMessage.MissingDimension")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){go(n,e,t,"qDimensions",a)}}}function vo(e,t,r,n="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){r.drillUp(n,t,e)}};var o}function bo({altList:e,app:t,dir:r,dock:n,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:r,dock:n,getAlternatives(){const r=e.map((e=>function(e,t,r){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:r.get("Object.ErrorMessage.MissingMeasure")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(r)},changeTo(e,t){go(o,e,t,"qMeasures",i,a)}}}function xo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const qo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Do=({children:e,...t})=>o.createElement(i,P({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Co(){function e({title:e,selected:t,onClick:r}){const n=ue.detectTextDirection(e);return o.createElement(l,{button:!0,onClick:r,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(lo,{d:t?po:""})),o.createElement(c,{primaryTypographyProps:{dir:n}},e))}function t({alignTo:t,changeTo:r,current:n,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,n)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>r(n)})));return o.createElement(a,P({anchorEl:t,open:p,onClose:c},qo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,component:"nav"},o.createElement(e,{title:n,selected:!0,onClick:c}),d))}e.propTypes={title:ao.string.isRequired,selected:ao.bool,onClick:ao.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:ao.any,changeTo:ao.func.isRequired,current:ao.string.isRequired,dir:ao.string.isRequired,dock:ao.string.isRequired,list:ao.array,onClose:ao.func.isRequired,show:ao.bool.isRequired},t.defaultProps={list:[],alignTo:null};class r extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:r,translator:n,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,r)=>o.createElement(Do,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:r,onClick:()=>d?void 0:e.drillUp(p-r),title:t},o.createElement("span",{style:c},t),o.createElement(lo,P({},mo,{size:"small",style:{margin:"0 8px"}}))))),m=r&&!this.state.open?this.openPopover:this.closePopover,h=!r||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=ue.detectTextDirection(e.text),v=o.createElement(Do,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(lo,P({},co,{size:"small",title:n.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),r&&o.createElement(lo,P({},fo,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(lo,P({},uo,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),r&&o.createElement(t,{dock:r.dock,dir:r.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&re(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:ao.bool.isRequired,padding:ao.string,minWidth:ao.string,titleData:ao.shape({breadcrumbs:ao.arrayOf(ao.string).isRequired,drilldown:ao.bool.isRequired,index:ao.number.isRequired,locked:ao.bool.isRequired,text:ao.string.isRequired,popoverText:ao.string.isRequired,drillUp:ao.func}).isRequired,popover:ao.shape({dir:ao.string.isRequired,dock:ao.string.isRequired,changeTo:ao.func.isRequired,getAlternatives:ao.func.isRequired}),translator:ao.shape({get:ao.func.isRequired}).isRequired,selections:ao.shape({isActive:ao.func,addListener:ao.func,removeListener:ao.func}),style:ao.shape({fontSize:ao.string,color:ao.string,fontFamily:ao.string}).isRequired,isDimension:ao.bool.isRequired,hasAlternative:ao.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left"):"right"===e&&(r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left"),r}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?yo:bo,M=u?vo:xo,S=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:n(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&re(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const T=C.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,a=M(e,i,p),s=n===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(r,{popover:S,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},T)}}}function wo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>r?r:e}function Mo(e){if(e.type)return e;if("#"===e.charAt(0))return Mo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb(".concat(r.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=e.substring(t+1,e.length-1).split(",");return{type:r,values:n=n.map((function(e){return parseFloat(e)}))}}function So(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function Eo(e){var t="hsl"===(e=Mo(e)).type?Mo(function(e){var t=(e=Mo(e)).values,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),So({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Io(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function To(){return(To=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ao(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Oo(){return(Oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function jo(e){return(jo="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 ko(e){return(ko="function"==typeof Symbol&&"symbol"===jo(Symbol.iterator)?function(e){return jo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":jo(e)})(e)}function Lo(e){return e&&"object"===ko(e)&&!Array.isArray(e)}function No(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Oo({},e):e;return Lo(e)&&Lo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Lo(t[o])&&o in e?n[o]=No(e[o],t[o],r):n[o]=t[o])})),n}var Po=["xs","sm","md","lg","xl"];function Ro(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,o=void 0===n?"px":n,i=e.step,a=void 0===i?5:i,s=Ao(e,["values","unit","step"]);function l(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var n=Po.indexOf(t)+1;return n===Po.length?l(e):"@media (min-width:".concat(r[e]).concat(o,") and ")+"(max-width:".concat(r[Po[n]]-a/100).concat(o,")")}return To({keys:Po,values:r,up:l,down:function(e){var t=Po.indexOf(e)+1,n=r[Po[t]];return t===Po.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return r[e]}},s)}function Fo(e,t,r){var n;return To({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return To({paddingLeft:t(2),paddingRight:t(2)},r,Io({},e.up("sm"),To({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},Io(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Io(n,e.up("sm"),{minHeight:64}),n)},r)}var Vo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},_o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ho={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},zo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Uo={black:"#000",white:"#fff"},Bo={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Uo.white,default:Ho[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Wo={text:{primary:Uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ho[800],default:"#303030"},action:{active:Uo.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function $o(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return So(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return So(e)}(e.main,1.5*n)))}function Yo(e){var t=e.primary,r=void 0===t?{light:Vo[300],main:Vo[500],dark:Vo[700]}:t,n=e.secondary,o=void 0===n?{light:_o.A200,main:_o.A400,dark:_o.A700}:n,i=e.error,a=void 0===i?{light:zo[300],main:zo[500],dark:zo[700]}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,p=e.tonalOffset,d=void 0===p?.2:p,f=Ao(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Eo(e),n=Eo(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,Wo.text.primary)>=c?Wo.text.primary:Bo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=To({},e)).main&&e[t]&&(e.main=e[t]),$o(e,"light",r,d),$o(e,"dark",n,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Wo,light:Bo};return No(To({common:Uo,type:l,primary:h(r),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ho,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function Ko(e){return Math.round(1e5*e)/1e5}var Jo={textTransform:"uppercase"};function Zo(e,t){var r="function"==typeof t?t(e):t,n=r.fontFamily,o=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,i=r.fontSize,a=void 0===i?14:i,s=r.fontWeightLight,l=void 0===s?300:s,u=r.fontWeightRegular,c=void 0===u?400:u,p=r.fontWeightMedium,d=void 0===p?500:p,f=r.fontWeightBold,m=void 0===f?700:f,h=r.htmlFontSize,g=void 0===h?16:h,y=r.allVariants,v=r.pxToRem,b=Ao(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,r,n,i){return To({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(Ko(n/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,Jo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Jo)};return No(To({htmlFontSize:g,pxToRem:q,round:Ko,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Go(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Xo=["none",Go(0,2,1,-1,0,1,1,0,0,1,3,0),Go(0,3,1,-2,0,2,2,0,0,1,5,0),Go(0,3,3,-2,0,3,4,0,0,1,8,0),Go(0,2,4,-1,0,4,5,0,0,1,10,0),Go(0,3,5,-1,0,5,8,0,0,1,14,0),Go(0,3,5,-1,0,6,10,0,0,1,18,0),Go(0,4,5,-2,0,7,10,1,0,2,16,1),Go(0,5,5,-3,0,8,10,1,0,3,14,2),Go(0,5,6,-3,0,9,12,1,0,3,16,2),Go(0,6,6,-3,0,10,14,1,0,4,18,3),Go(0,6,7,-4,0,11,15,1,0,4,20,3),Go(0,7,8,-4,0,12,17,2,0,5,22,4),Go(0,7,8,-4,0,13,19,2,0,5,24,4),Go(0,7,9,-4,0,14,21,2,0,5,26,4),Go(0,8,9,-5,0,15,22,2,0,6,28,5),Go(0,8,10,-5,0,16,24,2,0,6,30,5),Go(0,8,11,-5,0,17,26,2,0,6,32,5),Go(0,9,11,-5,0,18,28,2,0,7,34,6),Go(0,9,12,-6,0,19,29,2,0,7,36,6),Go(0,10,13,-6,0,20,31,3,0,8,38,7),Go(0,10,13,-6,0,21,33,3,0,8,40,7),Go(0,10,14,-6,0,22,35,3,0,8,42,7),Go(0,11,14,-7,0,23,36,3,0,9,44,8),Go(0,11,15,-7,0,24,38,3,0,9,46,8)],Qo={borderRadius:4};function ei(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return 0===r.length?e(1):1===r.length?e(r[0]):r.map((function(t){var r=e(t);return"number"==typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var ti={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ri={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ni=function(e){return"".concat(Math.round(e),"ms")},oi={easing:ti,duration:ri,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?ri.standard:r,o=t.easing,i=void 0===o?ti.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Ao(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:ni(n)," ").concat(i," ").concat("string"==typeof s?s:ni(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ii={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,o=void 0===n?{}:n,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Ao(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Yo(a),f=Ro(r),m=ei(l),h=To({breakpoints:f,direction:"ltr",mixins:Fo(f,m,o),overrides:{},palette:d,props:{},shadows:s||Xo,typography:Zo(d,c),spacing:m},No({shape:Qo,transitions:oi,zIndex:ii},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const si=d({productionPrefix:"qba58",disableGlobal:!0,seed:""});function li(){function e({x:e,y:t,width:r,height:n,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(r)?a.width:r,a.height=Number.isNaN(n)?a.height:n,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:r=document.createElement.bind(document)}=t;let n,i=e();const a={element:()=>n,root:()=>n,appendTo:e=>(n||(n=r("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),render(e){if(!n)return!1;const t=i.scaleRatio.x,r=i.scaleRatio.y;return n.style.left=Math.round(i.margin.left+i.x*t)+"px",n.style.top=Math.round(i.margin.top+i.y*r)+"px",n.style.width=Math.round(i.width)+"px",n.style.height=Math.round(i.height)+"px",n.style.transform=`scale(${t}, ${r})`,n.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:ai},e))}(e,si),n),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(n&&p.unmountComponentAtNode(n),a),destroy(){n&&n.parentElement&&(p.unmountComponentAtNode(n),n.parentElement.removeChild(n)),n=null},size:t=>(t&&(i=e(t)),i)};return a}}function ui(){return function(e){e.renderer("react",li()),e.component("data-title",Co()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:ao.string.isRequired,spanStyle:ao.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",a=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),s="center"===n?t:"* "+t,l="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function ci(e){return tt(e).l<70}function pi(e,t){const r=tt(e).l/100,n=tt(t).l/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}function di(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var fi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const r=e.component(t.component);if(!r)return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];if(r.settings.settings.slice.cornerRadius>0||r.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=n[n.length-1];for(let e=0;e<n.length;e+=1){const t=n[e],r=i.attrs.fill,a=t.attrs.fill;if(pi(a,r)<=1.2){const{start:e,offset:r}=t.desc.slice;let{innerRadius:n,outerRadius:s}=t.desc.slice;if(n=Math.max(n,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>n){const t=di({r:s,a:e},r),i=di({r:n,a:e},r);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:ci(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function mi(e,t=!0){let r="";for(let t=0;t<e.length;t++){const n=e[t];r+=0===t?`M${n.x} ${n.y}`:`L${n.x} ${n.y}`,r+=" "}return t&&(r+="Z"),r}function hi(e){const{size:t,angle:r}=e,n={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,r={x:0,y:0}){const n=Math.cos(t),o=Math.sin(t),i=(s=r,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:n*i.x-o*i.y,y:o*i.x+n*i.y},r)}(e,r,n))),{type:"path",fill:e.fill,d:mi(s)}}var gi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];const n=[];for(let e=0;e<r.length;e+=1){const a=r[e];if(a.data.radius.value<0){const{start:e,end:r,offset:s}=a.desc.slice,l=(e+r)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=hi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},n.push(c)}}var o,i;return n}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function yi(e){return(yi="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 vi(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function bi(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){vi(i,n,o,a,s,"next",e)}function s(e){vi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function xi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qi(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 Di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qi(Object(r),!0).forEach((function(t){xi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ci(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function wi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||Si(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 Mi(e){return function(e){if(Array.isArray(e))return Ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Si(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 Si(e,t){if(e){if("string"==typeof e)return Ei(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)?Ei(e,t):void 0}}function Ei(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 Ii=Object.prototype.hasOwnProperty,Ti=Object.prototype.toString,Ai=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,ji=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ti.call(e)},ki=function(e){if(!e||"[object Object]"!==Ti.call(e))return!1;var t,r=Ii.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ii.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Ii.call(e,t)},Li=function(e,t){Ai&&"__proto__"===t.name?Ai(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ni=function(e,t){if("__proto__"===t){if(!Ii.call(e,t))return;if(Oi)return Oi(e,t).value}return e[t]},Pi=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Ni(s,r),s!==(o=Ni(t,r))&&(c&&o&&(ki(o)||(i=ji(o)))?(i?(i=!1,a=n&&ji(n)?n:[]):a=n&&ki(n)?n:{},Li(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&Li(s,{name:r,newValue:o}));return s};function Ri(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Fi(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Vi(e,t,r,n,o){var i,a=o.byRow,s=o.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var l=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,l)}return{}}function _i(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var o=r[n.activeDimensionIndex];n=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function Hi(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function zi(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ui(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Bi(){}var Wi=1/.7,$i="\\s*([+-]?\\d+)\\s*",Yi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ji=/^#([0-9a-f]{3,8})$/,Zi=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgb\\("+[Ki,Ki,Ki]+"\\)$"),Xi=new RegExp("^rgba\\("+[$i,$i,$i,Yi]+"\\)$"),Qi=new RegExp("^rgba\\("+[Ki,Ki,Ki,Yi]+"\\)$"),ea=new RegExp("^hsl\\("+[Yi,Ki,Ki]+"\\)$"),ta=new RegExp("^hsla\\("+[Yi,Ki,Ki,Yi]+"\\)$"),ra={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 na(){return this.rgb().formatHex()}function oa(){return this.rgb().formatRgb()}function ia(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ji.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?aa(t):3===r?new ca(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?sa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?sa(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=Zi.exec(e))?new ca(t[1],t[2],t[3],1):(t=Gi.exec(e))?new ca(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xi.exec(e))?sa(t[1],t[2],t[3],t[4]):(t=Qi.exec(e))?sa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ea.exec(e))?ma(t[1],t[2]/100,t[3]/100,1):(t=ta.exec(e))?ma(t[1],t[2]/100,t[3]/100,t[4]):ra.hasOwnProperty(e)?aa(ra[e]):"transparent"===e?new ca(NaN,NaN,NaN,0):null}function aa(e){return new ca(e>>16&255,e>>8&255,255&e,1)}function sa(e,t,r,n){return n<=0&&(e=t=r=NaN),new ca(e,t,r,n)}function la(e){return e instanceof Bi||(e=ia(e)),e?new ca((e=e.rgb()).r,e.g,e.b,e.opacity):new ca}function ua(e,t,r,n){return 1===arguments.length?la(e):new ca(e,t,r,null==n?1:n)}function ca(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function pa(){return"#"+fa(this.r)+fa(this.g)+fa(this.b)}function da(){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 fa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ma(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ga(e,t,r,n)}function ha(e){if(e instanceof ga)return new ga(e.h,e.s,e.l,e.opacity);if(e instanceof Bi||(e=ia(e)),!e)return new ga;if(e instanceof ga)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ga(a,s,l,e.opacity)}function ga(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ya(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 va(e){return function(){return e}}function ba(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):va(isNaN(e)?t:e)}zi(Bi,ia,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:na,formatHex:na,formatHsl:function(){return ha(this).formatHsl()},formatRgb:oa,toString:oa}),zi(ca,ua,Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ca(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:pa,formatHex:pa,formatRgb:da,toString:da})),zi(ga,(function(e,t,r,n){return 1===arguments.length?ha(e):new ga(e,t,r,null==n?1:n)}),Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ga(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ga(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,o=2*r-n;return new ca(ya(e>=240?e-240:e+120,o,n),ya(e,o,n),ya(e<120?e+240:e-120,o,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 xa=function e(t){var r=function(e){return 1==(e=+e)?ba: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):va(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ua(e)).r,(t=ua(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=ba(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),qa=/^class(-pyramid)?/,Da=function(e,t,r,n){var o=void 0!==r.min?r.min:n.min(),i=void 0!==r.max?r.max:n.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Mi(c))),i=Math.max.apply(Math,[i].concat(Mi(c))),u.min=o,u.max=i,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,r=e.max,n=e.limits,o=e.range,i=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(n[0]>r)a.push(t,r),i.push(o[0],o[0],o[0]);else{if(n[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){i.push(o[s]);break}}for(var l=0;l<n.length;l++)t<n[l]&&n[l]<r&&(a.push(n[l]),i.push(o[l]));if(n[n.length-1]<r)a.push(r),i.push(o[n.length]),i.push(o[n.length]);else{a.push(r);for(var u=0;u<n.length;u++)if(n[u]>r){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:r,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=xa(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&d[f+1]&&(u.range.push(p[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(p[f]),u.range.push(p[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(p[p.length-1]),u.domain.push(i)}else u.domain=c,u.range=p;return u};function Ca(e,t,r,n,o){var i,a,s,l=0,u=[],c=(e-t)/(n+1);if(0===c)return 1;for(i=0;i<r.length;i+=1)a=.99*(r[i]-t),s=r[i]>e?Math.floor(e/c):r[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=n||l>=o?Math.max(l,n):Ca(e,t,r,n+1,o)}var wa=function(e,t,r,n){var o,i,a=t.theme,s=t.hc,l=n.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=r.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=r.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Mi(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===r.input.autoMinMax){if(u.min=r.input.measureMin,u.max=r.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Mi(c)),u.max=Math.max.apply(Math,Mi(c))}if(r.input.measureScheme&&(u.palettes={quant:r.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];u.type=d&&qa.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Mi(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Ca(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),r=Math.max(1,Math.floor(t.length/f)),n=[],o=0;o<f;o+=1)n.push(t[o*r]);return[n[0]].concat(n,[n[n.length-1]])}}return u};function Ma(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function Sa(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ea(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=r.indexOf(i);-1===s?(r.push(i),n.push(a.primary)):n[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=r.indexOf(i);-1!==l&&(r.splice(l,1),n.splice(l,1))}}return{domain:r,range:n,exclude:o}}function Ia(e,t,r,n){var o=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ma:i,s=r.input.byMeasureDef||{activeMeasureIndex:0},l=a(r,s),u=wa(0,{theme:n,hc:o},r,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=r.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Pi(u,Da(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.getCDef,i=void 0===o?_i:o,a=n.getCByField,s=void 0===a?Hi:a,l=n.getPersistence,u=void 0===l?Vi:l,c=i(t,r),p=s(r,c),d=p?p.raw():{},f=r&&r.pic?r.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Pi(m,u(t,r,c,p,{byRow:Fi,byElemNo:Ri})),m}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=wa(0,{hc:o,theme:i},r,{f:s});return l.invalid||(l.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===r.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(n.primary):u.push(o)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(n.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(r,o){return function(e){var t,r=e.cm,n=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),Di(Di({},r),{},{mode:"constant",type:"constant",primary:n})}(r,i,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),i=o;return Di(Di({},r),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(o,a,n):null}({cm:e,input:r,defaults:n,index:o,pic:t.pic})})),function(e,t){var r,n,o,i=t.translator;if(Sa(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Ea(e.measureOverrides,e.explicit),Sa(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=Ea(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,r)):o}function Ta(e){var t=Di({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(n.auto=e,o):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,o):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,o):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,o):n.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Pi(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=n.auto(e.layout);r.input=Pi(!0,{},r.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=r.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(r.input=Pi(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return n.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?n.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var i=r.pic.field(e.field);return Da(o,n.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],l=n[1]?n[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,r,n){var o=n.external,i=n.field,a=Di({},e);Pi(a,Ri(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Pi(a,Ri(i)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Pi(a,Ri(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},o=0;o<e.length;o+=1)n[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;n[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(n[u])))}return a.push(-3,-2),i.push(r.others),i.push(r.nil),a},range:function(){return i}}}(t.colors,r,a)),a}(a,l,o,{external:t,field:r.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=Di(Di({},e),n.getDataColorSpecials())),r.settings=Pi(e,Ia(this,r,t,e))}return r.settings}};return o}var Aa=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var o=t.coloring;o&&(n.measureGradient=o.gradient)}else if("dimension"===r){var i=t[0],a=t[1];i&&(n.legendDataPage=i),a&&(n.dimValsData=a.colorMap)}return n},Oa=function(e){throw e.isHandled=!0,e},ja=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},ka=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},La=function(e,t){var r=t.layout,n=t.model,o=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&o?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Oa):Promise.reject()};function Na(e){var t=e.hc,r=e.source,n=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Pa(e){return function(t){return"object"===yi(t.datum[e])?t.datum[e].value:void 0}}function Ra(e){return"object"===yi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Fa(e){return-3===e.datum.value}var Va=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return r?"left":"right"},_a=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ha(e,t){var r=e.styleReference,n=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Va(i,n,o)},show:"function"==typeof i.show?function(){return _a(i,l,a)}:_a(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function za(e,t,r){var n=[],o=[],i=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=Ha(e,t);if(!n.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return Pi(!0,n,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[r]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Ha(e,t);return!!u.show&&Pi(!0,u,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(n,"legend.label","color"):void 0,fontSize:l?l.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(n,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}(e,t,r&&r.navigationDisabled);return n.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=o&&null!==(n=o.interact)&&void 0!==n&&n.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=r.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,r)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===r||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:(e={},xi(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),xi(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),xi(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:o,components:n}}var Ua=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Ba(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=Ta(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return ja(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ka(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,o=t.app;return La(e,{layout:r,model:n,app:o})}));return r.getSnapshotData=Aa,r}({resources:e}),r={},n={},o=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},i={config:function(o){if(r=Di({},o),n={},!r.key)throw new Error("Missing key");t.set(Di(Di({},e),r))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=Di(Di({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var r=o();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=o().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,o=[];if(r&&r.palettes&&n){var i=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||n.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,l=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Mi(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),colorProps:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(r){var u={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Mi((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Mi((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=Na({hc:t,source:i,coloring:r}).data;if(r.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=Di(Di({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[l]=Pi({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Pi({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===r.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:r.hc,coloring:o(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,o=Pa(n),i=Pa("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Fa(e)||i(e)?u:l}:r[t]?function(e){return Fa(e)?u:Ra(e)||-2===o(e)&&"dimension"===n||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Fa(e)||i(e)?u:Ra(e)?l:c}:"color"===p?function(e){return Fa(e)||i(e)?u:Ra(e)?l:o(e)||u}:null},s=a(t,n);if(t.measureOverrides){var l=Pa("".concat(n,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(r={field:t,reduce:"first"},"color"===o.type&&(r.value=function(e){return"NaN"!==e.qNum?Ua(e.qNum):e.qText&&ia(e.qText)?e.qText:c})):"dimension"===o.mode?r=void 0!==o.field?o.field:n.qDimensionInfo.length-1:"measure"===o.mode&&(r=l);var p=xi({},u,r);return n.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return za({eventName:t,key:n,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:r.legendProps,scaleKey:r.key,coloring:o(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return i}var Wa=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function $a(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,o=r.some(Wa),i=n.some(Wa),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function Ya(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Di(Di(Di({},e),t),{},{colorProps:Di(Di({},e.colorProps),t.colorProps||{})});return r}var Ka=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Ja(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ka),n=e.qHyperCube.qMeasureInfo.some(Ka),o=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Za=function(){};function Ga(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(n,i)};clearTimeout(t),t=setTimeout(s,r)}}function Xa(e){var t=e.originalArray,r=e.newArray,n=e.matchKey;return Array.isArray(t)&&t.length?(r.forEach((function(e){var r=-1;t.some((function(t,o){return t[n]&&t[n]===e[n]&&(r=o),r})),r>-1?t[r]=e:t.push(e)})),t):r}function Qa(e){return(Qa="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 es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ts(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 rs(e,t,r){return t&&ts(e.prototype,t),r&&ts(e,r),e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(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 is(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?os(Object(r),!0).forEach((function(t){ns(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function as(e,t){return(as=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ls(e,t,r){return(ls=ss()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&as(o,r.prototype),o}).apply(null,arguments)}function us(e){return function(e){if(Array.isArray(e))return ps(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||cs(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 cs(e,t){if(e){if("string"==typeof e)return ps(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)?ps(e,t):void 0}}function ps(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 ds=Object.prototype.hasOwnProperty,fs=Object.prototype.toString,ms=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,gs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===fs.call(e)},ys=function(e){if(!e||"[object Object]"!==fs.call(e))return!1;var t,r=ds.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ds.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ds.call(e,t)},vs=function(e,t){ms&&"__proto__"===t.name?ms(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},bs=function(e,t){if("__proto__"===t){if(!ds.call(e,t))return;if(hs)return hs(e,t).value}return e[t]},xs=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=bs(s,r),s!==(o=bs(t,r))&&(c&&o&&(ys(o)||(i=gs(o)))?(i?(i=!1,a=n&&gs(n)?n:[]):a=n&&ys(n)?n:{},vs(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&vs(s,{name:r,newValue:o}));return s};function qs(e,t,r){if(!e)return-1;var n=r.cache,o=e.origin?e.origin():null;o&&(e=o);var i=n.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<n.wrappedFields.length;l++)if(s=n.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Ds(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Cs(e){var t=e.cache,r=e.f,n=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=n;if(o.field&&o.field!==r){var d=qs(o.field,i,{cache:t});if(-1===d)return;p=xs({qRow:a},d(s))}u[c]=Ds(o,p,{key:l})}function ws(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=Qa(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=qs(u,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=xs({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Ds(d,C,{key:l});if(!d.filter||d.filter(C)){for(var M=0;M<f.length;M++){var S=p[f[M]],E=S.fields||[S];S.fields&&(w[f[M]]=[]);for(var I=0;I<E.length;I++)Cs({cache:r,f:u,mainCell:C,p:E[I],prop:f[M],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:S.fields?w[f[M]]:w,targetProp:S.fields?I:f[M]});if(S.fields){var T=w[f[M]].map((function(e){return e.value})),A=w[f[M]].map((function(e){return e.label}));w[f[M]]={value:"function"==typeof S.value?S.value(T):void 0!==S.value?S.value:T,label:"function"==typeof S.label?S.label(A):void 0!==S.label?String(S.label):String(w[f[M]].value)}}}m&&n.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,us(n.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Ms(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Ss(e,t){var r,n,o,i,a,s=new As(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Es);r=u.pop();)if(l&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)u.push(n=r.children[i]=new As(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Ts)}function Es(e){return e.children}function Is(e){e.data=e.data.data}function Ts(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function As(e){this.data=e,this.depth=this.height=0,this.parent=null}function Os(e){if("function"!=typeof e)throw new Error;return e}As.prototype=Ss.prototype={constructor:As,count:function(){return this.eachAfter(Ms)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Ss(this).eachBefore(Is)}};var js={depth:-1},ks={};function Ls(e){return e.id}function Ns(e){return e.parentId}function Ps(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),o=t,i=0;i<n.length;i++){if("*"===n[i]&&Array.isArray(o)){var a=[];r=n.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Ps(r,o[s]);Array.isArray(l)?a.push.apply(a,us(l)):a.push(l)}return a}if(!n[i]&&Array.isArray(o)){var u=new Array(o.length);r=n.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Ps(r,o[c]);return u}n[i]in o&&(o=o[n[i]])}return o}function Rs(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var o=r>=0?[e[r]]:e;n.push.apply(n,us(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&n.push.apply(n,us(Rs(e[i].children,t-1,r)));return n}function Fs(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),o=us(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Rs(e.children,i-1,r)}}return!1}function Vs(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var o=0;o<n.length;o++)if(e(n[o]))return n[o];return!1}if("string"==typeof e){for(var i=0;i<n.length;i++)if(n[i].key()===e||n[i].title()===e)return n[i]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var _s=/^qDimensionInfo(?:\/(\d+))?/,Hs=/^\/?qMeasureInfo\/(\d+)/,zs=/\/qAttrExprInfo\/(\d+)/,Us=/\/qAttrDimInfo\/(\d+)/;function Bs(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function Ws(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=n,p=r.qEffectiveInterColumnSortOrder,d=Bs(r);return _s.test(c)&&(o=!0,i=+_s.exec(c)[1],c=n.replace(_s,"")),Hs.test(c)&&("K"===r.qMode?l=+Hs.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+Hs.exec(c)[1],u=0):u=+Hs.exec(c)[1],c=c.replace(Hs,"")),c&&(Us.exec(c)?s=+Us.exec(c)[1]:zs.exec(c)&&(a=+zs.exec(c)[1])),{fieldDepth:(o?"S"===r.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function $s(e,t){var r,n,o=Fs(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:o,attrFn:n,valueFn:r}}function Ys(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Ks(e){for(var t=e.propsArr,r=e.props,n=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=r[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var r=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===r.type?(m=r.value,y=String(r.value)):("function"==typeof r.value&&(d=function(e){return r.value(e,n)}),"function"==typeof r.label&&(f=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=r.reduce?r.reduce(m):m,y=r.reduceLabel?r.reduceLabel(y,m):String(m)):y=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},r.field&&(i[t[s]].source={field:r.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,n):c,label:"function"==typeof l.label?l.label(p,n):p})}}var Js=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Ps(n,e);return i&&i[0]?(t.tree=Ss(i[0],r.children||function(e){return e[o]}),t.tree):null};function Zs(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}(e),n=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=is({__id:f,__parent:u,qValues:[]},d),c=!0),u=f}if(c)for(var m=0;m<i.length;m++){var h=l[i[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Ls,t=Ns;function r(r){var n,o,i,a,s,l,u,c=r.length,p=new Array(c),d={};for(o=0;o<c;++o)n=r[o],s=p[o]=new As(n),null!=(l=e(n,o,r))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?ks:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(r[o],o,r))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===ks)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=js,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ts),i.parent=null,c>0)throw new Error("cycle");return i}return r.id=function(t){return arguments.length?(e=Os(t),r):e},r.parentId=function(e){return arguments.length?(t=Os(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Gs=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=r[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=$s(i,Ws(p.field,{cube:n,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function Xs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?Zs(t):Js(o,r,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=Bs(o),d=p[u-1];c=r.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=r.fields[f]}var m=n.normalizeConfig(is(is({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?Ws(c,{cube:o,cache:r}):{fieldDepth:0};Gs({propsArr:y,props:h,cube:o,cache:r,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,M=l[q[D].depth].main,S=x[D],E=S.data,I=Ys(M,E,{key:i});Ks({propsArr:C,props:w,item:S,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function Qs(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!Js(s,r,e))continue;var u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=Ws(u,{cube:s,cache:r}),h=$s({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;Gs({propsArr:f,props:p,cube:s,cache:r,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=Qa(o[a].trackBy),q={},D=[],C=g(r.tree),w=[],M=0;M<C.length;M++){var S=C[M],E=y?y(v(S)):v(S);if(!d.filter||d.filter(E)){var I=Ys(d,E,{key:l});Ks({propsArr:f,props:p,item:S,itemData:E,ret:I,sourceKey:l}),b&&n.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,us(n.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var el,tl=(function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,u,l,c,p,f=e.length,d=e.search(/[0-9\-\+#]/),m=d>0?e.substring(0,d):"",h=e.split("").reverse().join(""),v=h.search(/[0-9\-\+#]/),g=f-v,y=e.substring(g,g+1),b=g+("."===y||","===y?1:0),x=v>0?e.substring(b,f):"";if(r=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(h="",g=(p=t[0]).length%u,f=p.length,b=0;b<f;b++)h+=p.charAt(b),!((b-g+1)%u)&&b<f-u&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}}(Ou={exports:{}}),Ou.exports);function Tu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Au={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"},ju=/%$/,ku=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Lu=/^\(oct\)/i,Pu=/^\(dec\)/i,Nu=/^\(hex\)/i,Ru=/^\(bin\)/i,Fu=/^\(rom\)/i,_u=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Vu=/#|0/g;function Hu(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 zu(e,t,r){var n=Tu(e);return r?n:new RegExp(n||"",t)}function Uu(e,t,r){var n,i,o,a,s,u,l,c,p,f,d,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),f=t,(d=r)&&(d=Tu(d)),f&&(f=Tu(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(d,"[#0]+)?")),a=(o=(o=m.match(p))?o[0]:"")?m.substr(0,m.indexOf(o)):m,s=o?m.substring(m.indexOf(o)+o.length):"",o||(o=m?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),u=t,t=/,/.test(r)?"¤":",",u&&(o=o.replace(zu(u,"g"),t)),l=r,r=".",l&&(o=o.replace(zu(l,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,v=m.split(l);v[1]&&(h=v[1].match(Vu)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=ju.test(m),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(zu(t,null,!0),"|").concat(zu(r,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=r,e.temp=c}var Bu=function(){function e(t,r,n,i,o){Os(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 Au;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()}return Ts(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],_u.test(e[0])&&(n.positive.isFunctional=!0),e[1]?_u.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?_u.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Uu(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Uu(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Uu(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,u,l,c=this._prepared,p="",f="",d=e;if(isNaN(e))return"".concat(d);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 ku.test(t)?e=Hu(e,Number(/\d{2}/.exec(t)[0]),t,r):Lu.test(t)?e=Hu(e,8,t,r):Pu.test(t)?e=Hu(e,10,t,r):Nu.test(t)?e=Hu(e,16,t,r):Ru.test(t)?e=Hu(e,2,t,r):Fu.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,v=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=v[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);g<=r&&s<v.length;)g=v[++s];s>0&&(m=v[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(g<0&&g-r<=c.maxPrecision?h=g:m<=r&&!(g>0&&-r<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=Iu(b+=o,y)||"0",l){var x=Math.max(0,Math.min(14,l.length)),q=l.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===y&&(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)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)u+="#";e=Iu(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Wu(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size,o=void 0===i?5e3:i,a=n.multipleArguments,s=void 0!==a&&a,u=n.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),p=Object.create(null),f=0,d=0;return(t=s?function(){return r=l.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=l(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return f>=o&&(delete c[p[d]],delete p[d],f--,d++),c[e]=t,p[f]=e,f++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),f=0,d=0},t.size=function(){return f},t}function Yu(e,t,r,n,i){var o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ns(Bu,t)}(i,e,t,r,n),a=Wu(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),o.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Ku=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ju=["January","February","March","April","May","June","July","August","September","October","November","December"],Zu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Gu(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Xu(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Qu=function(){function e(t,r,n){Os(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Ku,qDayNames:$u,qLongMonthNames:Ju,qMonthNames:Zu}),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=(As(i={},"T",o.qTimeFmt||"hh:mm:ss"),As(i,"D",o.qDateFmt||"YYYY-MM-DD"),As(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}return Ts(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*Xu(t),n=60*Xu(r),i=60*Xu(n),o=1e3*Xu(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}(e),i=n.d,o=n.h,a=n.m,s=n.s,u=n.f,l=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=r?r.getDay()-1:0)<0&&(l=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}(e,t));var u=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Gu("".concat(t.year).slice(-2),2),YYY:Gu("".concat(t.year).slice(-3),3),def:function(e){return Gu("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Gu("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Gu("".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 Gu("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Gu("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Gu("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Gu("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var i=0;i<n;i++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r.slice(0,e.length)}}}}(this,r),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var p=new RegExp(l.join("|"),"g");return t.replace(p,(function(e){var t,r,n;for(r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in u[r])if(i===e||i.toLowerCase()===e){void 0===(n=u[r][i])&&(n=u[r][i.toLowerCase()]);break}return void 0===n&&(n=u[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function el(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ns(Qu,t)}function tl(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function rl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=el(r,e,t),i=Wu(n.format.bind(n),{toKey:function(e){return"object"===Es(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?tl(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),n.format(t,e)},a.locale=function(r){return n=el(r,e,t),i=Wu(n.format.bind(n),{toKey:function(e){return"object"===Es(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function nl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return rl(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(r="#".concat(i,"##A"),o="U"),Yu(r,n,i,o,t)}function il(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},f="dimension"===u?"first":"avg",d=nl(r,o),m="dimension"===u?"first":function(e,t){return d(t)},h={id:function(){return n},key:function(){return i},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:p,reduce:f,reduceLabel:m,formatter:function(){return d},tags:function(){return r.qTags}};return h}function ol(e,t,r,n,i){return(t[e]||[]).map((function(t,o){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(o),s={instance:il($s({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ol("qAttrDimInfo",t,r,a,$s({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=ol("qAttrExprInfo",t,r,a,$s({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=ol("qMeasureInfo",t,r,a,$s({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function al(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.key,o=n.data,a=n.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=al.util,p={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return l},field:function(e){return du(e,p)},fields:function(){return u.fields.slice()},extract:function(e){return p.extractor(e,f,u,c)},hierarchy:function(e){return p.hierarchy(e,f,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(p.extractor=Eu,p.hierarchy=Mu,p.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(p.extractor=Xs,p.pages=l.qDataPages,p.hierarchy=Mu):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},f,u,c)};var d="S"===l.qMode?function(e){return e.qElemNumber}:void 0,m="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,Rs(ol("qDimensionInfo",l,i,"",$s({},p,{value:d,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,Rs(ol("qMeasureInfo",l,i,"",$s({},p,{value:m,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),r=il(ks({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},f,u,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(r)})),(r=u.allFields).push.apply(r,Rs(u.virtualFields)),f}var sl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ul=/\/qDimensionInfo(?:\/(\d+))?/,ll=/\/qMeasureInfo\/(\d+)/,cl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,pl=/\/qAttrExprInfo\/(\d+)/,fl=/\/?qHyperCube/,dl=/\/?qTreeData/,ml=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},hl=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function vl(e,t){var r=e,n=-1,i=-1,o="",a=function(e){return e};fl.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=ml):dl.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=hl);var s=!0;if(ul.test(e)&&(n=+ul.exec(e)[1]),ll.test(e)&&(i=+ll.exec(e)[1]),cl.test(e)){i=-1,n=0;var u=+cl.exec(r)[2];isNaN(u)||(n=u,r=r.replace(/\/\d+$/,"")),s=!1}if(pl.test(e)){var l=i;if(t){i=0;var c=cu(o,t);i+=(c.qMeasureInfo||[]).length,n>-1?(i=c.qDimensionInfo.slice(0,n).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),n=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+pl.exec(r)[1]}else n>-1?(n=-1,i=+pl.exec(r)[1]):i+=+pl.exec(r)[1]+1}return sl.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||Fs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],i=t[1];r=r.replace(n,i)})),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:i,dimensionIdx:n,path:r}}function gl(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=r.byCells,o=r.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=vl(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var p=n.qHyperCube,f=p.qNoOfLeftDims,d=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||d>=f)&&f>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-f})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!l&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=r.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function yl(e){al.util=e.data("matrix").util,e.data("q",al),e.formatter("q-number",Yu),e.formatter("q-time",rl)}function bl(e){var t=function(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}(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var r=t.qIsOneAndOnlyOne;return void 0!==r&&r}function xl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===Wo(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function ql(e){var t=e.brush,r=e.colorField,n=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!r||/qAttrDimInfo/.test(r)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),n&&t.removeKeyAlias(n),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(r))):o&&t.addKeyAlias(n,"qHyperCube/".concat(r))}yl.qBrushHelper=gl,yl.selections=gl;function Dl(e){var t=e.brush,r=e.getConfig;return{interceptor:function(e){var n=t.brushes(),i=r(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;n.forEach((function(r){var n,i,a;("range"===r.type||null!==(n=e[0])&&void 0!==n&&n.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==r.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var u=e.filter((function(e){return-2!==e.value}));return u.length>1?function(e){var t=e.layout,r=void 0===t?{}:t,n=e.values,i=void 0===n?[]:n;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=bl({layout:r,path:e}),n=i.filter((function(t){return t.key===e})),o=t?[n.pop()]:n;a.push.apply(a,Qo(o))})),a.filter(Boolean)}({layout:s,values:u}):u},rangeInterceptor:function(e){var n=t.brushes(),i=r().allowSimultaneous;return n.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(n.forEach((function(r){var n=r.id===e[0].key||i.includes(r.id)&&i.includes(e[0].key);"range"!==r.type||n||t.clear([])})),e)}}}var Cl=[],wl=0,Sl=function(e){var t=Cl.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},Ml=function(){document.addEventListener("keyup",Sl)},El=function(){document.removeEventListener("keyup",Sl)},Ol=function(e,t){Object.keys(t).forEach((function(r){e.on(r,t[r])}))},Il=function(e,t){Object.keys(t).forEach((function(r){e.removeListener(r,t[r])}))};function Tl(e,t,r){if(t&&void 0!==r&&"selectHyperCubeContinuousRange"===e.method){var n=e.params;if(n&&n[1]&&n[1][0]){var i=n[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=r&&(a.qMaxInclEq=!0)}}}function Al(e){var t=e.chart,r=e.document,n=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,u=e.emit,l=void 0===u?"rangeClear":u,c=n.event===i,p=r.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!p)return!1;var f=t.component(o);return!!f&&(f.emit(l),"string"==typeof s&&t.brush(s).clear(),f)}function jl(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,u=e.cleared;return Al({selectionInfo:t,chart:r,document:n,eventName:void 0!==u&&u?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function kl(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,u=e.cleared;return Al({selectionInfo:t,chart:r,document:n,eventName:void 0!==u&&u?void 0:o,componentName:s,brushName:e.brushName})}function Ll(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,u=e.cleared,l=void 0!==u&&u,c=e.brushName,p=Al({selectionInfo:t,chart:r,document:n,eventName:l?void 0:s,componentName:o,brushName:void 0!==c&&c});if(p){var f=p.settings.settings,d=f.scale,m=f.brush,h=r.scale(d).data().fields.map((function(e){return e.id()})),v=r.brush(m),g=v.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));v&&g.length&&g.forEach((function(e){v.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Pl(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;Al({selectionInfo:t,chart:r,document:n,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function Nl(e){var t=e.chart,r=e.selectionInfo,n=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(r&&o.includes(r.event)){var u=r.currentComponent;r.previousComponent!==u&&(n.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Rl(e){var t=e.selectionInfo,r=e.chart,n=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,u=void 0===s?"legend-range-brush":s,l=e.cleared,c=void 0!==l&&l,p=e.brushName;Al({selectionInfo:t,chart:r,document:n,eventName:c?void 0:a,componentName:u,brushName:void 0!==p&&p})&&i.clear()}var Fl=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=Go(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function _l(e){var t,r=e.lasso;null!=r&&null!==(t=r.active)&&void 0!==t&&t.call(r)&&(null==r||r.action(!1))}function Vl(e){var t,r=e.chart,n=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,u=e.selectionEvents;if(!1===i||!1===u)return function(){};var l=(a||{}).lasso,c=void 0!==l&&l,p=i.reset,f=void 0===p?_l:p,d=i.clear,m=!1!==d&&function(e){var t=e.clear,r=void 0===t?Fl:t,n=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:n,selectionInfo:i,chart:o,document:document,cleared:e};return r(Zo({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return jl(Zo(Zo({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kl(Zo(Zo({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ll(Zo(Zo({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pl(Zo(Zo({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nl(Zo(Zo({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Rl(Zo(Zo({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:n,chart:r}),h=function(e){var t=e.chart,r=e.lasso,n=e.reset,i=e.clear,o=!1,a={deactivated:function(e){n({e:e,lasso:r})},canceled:function(e){n({e:e,lasso:r}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===n&&delete a.deactivated,!1===i&&delete a.cleared,!1===n&&!1===i&&delete a.canceled,a}({chart:r,clear:m,reset:f,lasso:c}),v={};Object.entries(h).forEach((function(e){var t=Xo(e,2),r=t[0],n=t[1];v[r]=function(e,t){return t?function(r){return t({event:r,defaultFunc:e})}:e}(n,u[r])}));var g=function(e){var t=e.selectionEvents,r=e.selections,n=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,u={selections:r,selectionInfo:n,chart:o,document:a},l=function(e){return Object.assign(n,e||{})},c=function(e){var t=e.event,r=e.components;return function(){return function(e){var t=e.selectionInfo,r=e.clear,n=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(Zo(Zo({},void 0===t?{}:t),{},{event:n,components:o.map((function(e){return e.key})).filter(Boolean)})),r()}({event:t,components:r,clear:i,chart:o,selectionInfo:n,setSelectionInfo:l})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(Zo(Zo({defaultFunc:c({event:e,components:t}),setSelectionInfo:l,clear:i},u),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:u,selections:s,selectionInfo:n,clear:m,chart:r,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(v).forEach((function(e){var t=Xo(e,2),r=t[0],n=t[1];null==s||s.on(r,n)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(v).forEach((function(e){var t=Xo(e,2),r=t[0],n=t[1];null==s||s.removeListener(r,n)}))}}var Hl=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function zl(e){var t=e.chart,r=e.actions,n=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,u=o.majorScale,l=void 0===u?void 0:u,c=o.selectionActions,p=(c=void 0===c?{}:c).clear,f=c.reset,d=o.selectionEvents,m=void 0===d?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:d,h=o.brushEvents,v=void 0===h?{}:h,g=o.brushName,y=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,q=o.brushRanges,D=void 0!==q&&q,C=o.interceptors,w=void 0===C?{}:C,S=t.brush(y);if("number"==typeof x&&S.setMaxListeners(x),D){var M=!0===D?Hl:D;S.configure({ranges:M})}var E={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.selections,n=t.brush,i=t.majorScale,o=t.actions,a=t.picassoQ,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,u=void 0===s?"/qHyperCubeDef":s;if(!r)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var l=++wl,c=null,p=[],f={};r.on=r.on.bind(r),r.isActive=r.isActive.bind(r),r.addListener=r.addListener.bind(r),r.removeListener=r.removeListener.bind(r);var d=Dl({brush:n,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=d.rangeInterceptor,h=d.interceptor;n.intercept("set-ranges",m),n.intercept("toggle-ranges",m),n.intercept("toggle-values",h),n.intercept("set-values",h),n.intercept("add-values",h),n.on("start",(function(){return r.begin(u)}));var v={activate:function(){},deactivated:function(){return n.end()},cleared:function(){return n.clear()},canceled:function(){return n.end()}};Ol(r,v);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;n.start(),"function"==typeof o.select.getBrushOptions&&(f=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a.selections(n,f,c).forEach((function(e){Tl(e,o.select.brushSelectionIncludeMax,g),r.select(e)}))}))):n.on("update",(function(){a.selections(n,f,c).forEach((function(e){return r.select(e)}))})),0===Cl.length&&Ml(),Cl.push({key:l,selections:r}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=Cl.indexOf(Cl.filter((function(e){return e.key===l}))[0]);-1!==e&&Cl.splice(e,1),Cl.length||El(),Il(r,v)}}}({brush:S,majorScale:l,actions:r,selections:n,picassoQ:i});!function(e){var t=e.brush,r=e.interceptors,n=void 0===r?{}:r;Object.entries(n).forEach((function(e){var r=Xo(e,2),n=r[0],i=r[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(n,e)}))}))}({brush:S,interceptors:w});var I=function(e){var t=e.chart,r=e.selectionActions,n=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,u=function(e){var t=e.brush,r=e.chart,n=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=Xo(e,2),o=i[0],a=i[1],s=function(){return a({chart:r,selectionInfo:n})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var r=Xo(e,2),n=r[0],i=r[1];t.removeListener(n,i)}))}}({brush:n,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),l=Vl({chart:t,selectionInfo:o,selectionActions:r,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var r=!1,n=function(e){r||"Shift"!==e.key||(t.lasso.action(!0),r=!0)},i=function(e){"Shift"===e.key&&(t.lasso.action(!1),r=!1)};return document.addEventListener("keydown",n),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",n),document.removeEventListener("keyup",i)}}({actions:i});return function(){u(),l(),c()}}({chart:t,brush:S,actions:r,selections:n,selectionInfo:E.selectionInfo,selectionActions:{clear:p,reset:f},selectionEvents:m,brushEvents:v});if(s){var T=!0===s?Qo(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;O.allowSimultaneous(T)}return{unbindEvents:I,state:E,picassoSelections:O,brush:S}}function Ul(e){var t=e.chart,r=e.selections,n=e.actions,i=void 0!==n&&n,o=e.config,a=void 0===o?{}:o,s=zl({chart:t,actions:i,selections:r,picassoQ:yl,config:a}),u=s.unbindEvents,l=s.state,c=s.picassoSelections,p=s.brush,f=a.custom,d=void 0===f?{}:f,m=a.legendAlias,h=void 0===m?void 0:m,v=a.setBrushAliases,g=void 0===v?ql:v;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==r||null===(t=r.isLocked)||void 0===t?void 0:t.call(r))&&void 0!==e?e:xl(n)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.singleSelectIndex;return l.singleSelectDimensions[e]},getCanSelect:function(){return l.canSelect},getSelectionInfo:function(){return l.selectionInfo},setLayout:function(e){var t=function(e){var t,r,n,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var u=(null!==(r=null==a?void 0:a.qHyperCube)&&void 0!==r?r:{}).qDimensionInfo,l=void 0===u?[]:u;return s.lockedDimensions=l.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=l.map((function(e,t){return bl({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,r=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,n=void 0===r?[]:r;return null!==(t=n.map((function(e,t){var r;return!(e.qLocked||(null===(r=e.qCardinalities)||void 0===r?void 0:r.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(n.length-1,0)}(a),s.canSelect=0===l.length||l.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(n=l[0])||void 0===n||!n.qLocked),s}({selections:r,picassoSelections:c,layout:e});Object.assign(l,t)},setBrushAliases:function(e){var t=e.colorField,r=e.useLegendCube,n=void 0!==r&&r,i=Go(e,["colorField","useLegendCube"]),o=Zo({useLegendCube:n,colorField:t,brush:p,legendAlias:h},i);g(Zo(Zo({},o),{},{defaultFunc:function(){return ql(o)}}))},destroy:function(){u(),c.release()},custom:Zo({},d)}}var Bl={};function Wl(){Wl.init.call(this)}Bl.isObject=function(e){return"object"===F(e)&&null!==e},Bl.isNumber=function(e){return"number"==typeof e},Bl.isUndefined=function(e){return void 0===e},Bl.isFunction=function(e){return"function"==typeof e};var Yl=Wl;Wl.EventEmitter=Wl,Wl.prototype._events=void 0,Wl.prototype._maxListeners=void 0,Wl.defaultMaxListeners=10,Wl.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Wl.prototype.setMaxListeners=function(e){if(!Bl.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Wl.prototype.emit=function(e){var t,r,n,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(r=this._events[e],Bl.isUndefined(r))return!1;if(Bl.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];r.apply(this,i)}else if(Bl.isObject(r)){for(n=arguments.length,i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];for(n=(a=r.slice()).length,o=0;o<n;o++)a[o].apply(this,i)}return!0},Wl.prototype.addListener=function(e,t){var r;if(!Bl.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Bl.isFunction(t.listener)?t.listener:t),this._events[e]?Bl.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Bl.isObject(this._events[e])&&!this._events[e].warned)&&((r=Bl.isUndefined(this._maxListeners)?Wl.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,Bl.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),Bl.isFunction(console.trace)&&console.trace()));return this},Wl.prototype.on=Wl.prototype.addListener,Wl.prototype.once=function(e,t){if(!Bl.isFunction(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},Wl.prototype.removeListener=function(e,t){var r,n,i,o;if(!Bl.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,n=-1,r===t||Bl.isFunction(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Bl.isObject(r)){for(o=i;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},Wl.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],Bl.isFunction(r))this.removeListener(e,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},Wl.prototype.listeners=function(e){return this._events&&this._events[e]?Bl.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Wl.listenerCount=function(e,t){return e._events&&e._events[t]?Bl.isFunction(e._events[t])?1:e._events[t].length:0};function Kl(){var e,t={};return e=t,Object.keys(Yl.prototype).forEach((function(t){e[t]=Yl.prototype[t]})),Yl.init(e),t.lasso={active:function(){return!1}},t.select={on:t.on,removeListener:t.removeListener},t}function $l(e){var t,r=e.picasso,n=h(),i=v(),o=g(),a=ee(y(),2),s=a[0],u=a[1],l=Kl(),c=b(),p=!(null===(t=c.qSelectionInfo)||void 0===t||!t.qInSelections),f=ee(y(!1),2),d=f[0],m=f[1];return l.lasso=function(e){var t,r,n,i=e.layout,o=e.isInSelections,a=e.isLassoActionActive,s=e.setIsLassoActionActive;return{active:a,hidden:!o||!(null===(t=i.qHyperCube)||void 0===t||null===(r=t.qDimensionInfo)||void 0===r||null===(n=r[0])||void 0===n||!n.qIsOneAndOnlyOne),action:function(e){s("boolean"==typeof e?e:!a)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:c,isInSelections:p,isLassoActionActive:d,setIsLassoActionActive:m}),x((function(){return s&&(s.interactions.lasso.active=function(){return d}),R({},l.lasso)}),[s,d,p]),q((function(){i.style.overflow="hidden";var e=r({renderer:{prio:[n.renderer||"canvas"]}}),t=e.chart({element:i,data:[],settings:{}}),a=Ul({chart:t,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});var s=function(e){var t=Zo({},e),r={},n={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&r[e]?t[e]=r[e](o,a):t[e]=o,!i&&n[e]&&n[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){r[e]=t},onChanged:function(e,t){n[e]=t}};return o}({legendScrollOffset:0,rotation:0});return s.intercept("rotation",(function(e){return(s.get("rotation")+e)%(2*Math.PI)})),s.onChanged("rotation",(function(){t.update({partialData:!0})})),l.on("selections-start",(function(){t.brush("selection").start()})),u({picasso:e,chart:t,selectionService:a,viewState:s,interactions:l}),function(){a.destroy(),t.destroy(),l.removeAllListeners(),delete l.select,s.intercept("rotation",void 0),s.onChanged("rotation",void 0)}}),[]),s}function Jl(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Zl(e){var t=e.instance,r=D(),n=C(),i=w(),o=v(),a=ee(y(),2),s=a[0],u=a[1],l=S(),c=M();return q((function(){if(t){o.style.overflow="hidden";var e=function(e){var t,r,n,i,o=e.picasso,a=e.model,s=e.app,u=e.translator,l=e.layoutService,c=void 0===l?void 0:l,p=e.createConfig,f=void 0===p?ws:p,d=e.config,m=void 0===d?{}:d,h=e.custom,v=void 0===h?{}:h,g=m.localeInfo,y=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),S={theme:x,key:y,localeInfo:g,layout:w,hc:null==c||null===(r=c.getHyperCube)||void 0===r?void 0:r.call(c),legendProps:null==c||null===(n=c.getLayoutValue)||void 0===n?void 0:n.call(c,"legend"),colorProps:Zo(Zo({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:w?xs(w):void 0})},M=ys({picasso:o,model:a,app:s,translator:u,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:Cs}):Cs(e)}));var E=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return M.resolveUIColor({index:t,color:r})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(C)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:Zo({},v),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:xs}),r=qs(S,t);return M.config(r),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:t.picasso,model:r,app:n,translator:i,config:{auto:!1,key:"fill"}}),a=function(e){var t=e.picassoInstance,r=e.plugins,n=e.pluginArgs,i=void 0===n?{}:n,o={initialized:!1,definitions:[]};return{initialize:function(){return Ko(regeneratorRuntime.mark((function e(){var n,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(r.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=Ko(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,r.fn(Zo({},i));case 4:if("object"===Wo(n=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(r.info.componentName,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(r.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(Zo({},i))}))),e.next=6,Promise.all([a,s]);case 6:u=e.sent,o.initialized=!0,(n=o.definitions).push.apply(n,Qo(u[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var r=Xo(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(r){var n=ca(!0,{},r.brush);ca(!0,r,t),t.brush&&(r.brush=function(e,t){return"object"===Wo(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Ms({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Ms({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(n,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t.picasso,plugins:c,pluginArgs:Jl(l)});u({colorService:e,pluginService:a})}}),[r,n,t,l,i.language()]),s}var Gl={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function Xl(e){var t=e.split("/");return"qmem:"===t[0]&&""===t[1]}function Ql(e){var t,r,n,i,o;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(r=(void 0!==(t=e.session.options||e.enigmaModel.session.sessionConfig).secure?t.secure:t.isSecure)?"https://":"http://",n=t.host||"localhost",i=t.port?":".concat(t.port):"","/"!==(o=t.prefix?t.prefix:"/")[o.length-1]&&(o="".concat(o,"/")),r+n+i+o):""}function ec(e,t){var r=e.replace(t,"").replace(/^\.\.\//i,"/");return"/"!==r[0]?"/".concat(r):r}function tc(e,t){return t+("/"===e[0]?e.substr(1):e)}var rc=function(e,t){var r;function n(){r&&(clearTimeout(r),r=null)}function i(e){var t=e;t.onload=null,t.onerror=null,n()}var o={small:50,medium:200,large:340,original:340};return new Promise((function(a){var s=new Image;s.referrerPolicy="no-referrer",s.onload=function(){var e,r=s.height,u=s.width,l=o[t]*(r>u?1:r/u),c=o[t]*(u>r?1:u/r);!r||!u||0===r&&0===u?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(l,r),width:Math.min(c,u)},n()):(e={height:l,width:c},n()),a(e)},s.onerror=function(){i(s),a({height:20,width:20,imageError:!0})},s.src=e,r=setTimeout((function(){i(s),a({height:20,width:20,imageError:!0})}),3e3)}))};function nc(e,t,r){return ic.apply(this,arguments)}function ic(){return(ic=V(regeneratorRuntime.mark((function e(t,r,n){var i,o,a,s,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.ref.qStaticContentUrl.qUrl,(o=Ql(n))&&(ec(i,o),i=tc(i=(i=i.replace(/"/g,'\\"')).replace(/'/g,"\\'"),o)),e.next=5,rc(i,r);case 5:return a=e.sent,s=a.height,u=a.width,l=a.imageError,e.abrupt("return",{src:i,size:r,height:s,width:u,imageError:l});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oc(e,t,r,n,i){return ac.apply(this,arguments)}function ac(){return(ac=V(regeneratorRuntime.mark((function e(t,r,n,i,o){var a,s,u,l,c,p,f,d,m,h,v,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n.ref,o&&o.label&&(s=o.label),!(r.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=t&&t.getImage&&Xl(s))){e.next=21;break}return e.prev=3,e.next=6,t.getImage(s);case 6:return u=e.sent,l="data:image/png;base64, ".concat(u),e.next=10,rc(l,i);case 10:c=e.sent,p=c.height,f=c.width,d=c.imageError,a={src:l,size:i,height:p,width:f,imageError:d},e.next=19;break;case 17:e.prev=17,e.t0=e.catch(3);case 19:e.next=28;break;case 21:return e.next=23,rc(s,i);case 23:m=e.sent,h=m.height,v=m.width,g=m.imageError,a={src:s,size:i,height:h,width:v,imageError:g};case 28:return e.abrupt("return",a);case 29:case"end":return e.stop()}}),e,null,[[3,17]])})))).apply(this,arguments)}function sc(e,t,r,n){return uc.apply(this,arguments)}function uc(){return(uc=V(regeneratorRuntime.mark((function e(t,r,n,i){var o,a,s,u,l,c,p,f,d,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.label,s=r.qFallbackTitle,!Xl(u="qmem://".concat(s,"/").concat(a))){e.next=21;break}return e.prev=4,e.next=7,t.getImage(u);case 7:if(!(l=e.sent)){e.next=17;break}return c="data:image/png;base64, ".concat(l),e.next=12,rc(c,n);case 12:p=e.sent,f=p.height,d=p.width,m=p.imageError,o={src:c,size:n,height:f,width:d,imageError:m};case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(4);case 21:return e.abrupt("return",o);case 22:case"end":return e.stop()}}),e,null,[[4,19]])})))).apply(this,arguments)}function lc(e,t,r,n){return cc.apply(this,arguments)}function cc(){return(cc=V(regeneratorRuntime.mark((function e(t,r,n,i){var o,a,s,u,l,c,p,f,d,m,h,v,g,y,b,x,q,D;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p=r.app,f=r.flags,d=null===(o=t.layout)||void 0===o||null===(a=o.tooltip)||void 0===a?void 0:a.imageComponents){e.next=4;break}return e.abrupt("return",[]);case 4:m=ee(d,1),h=m[0],v=h.size||"small",g=h.type||"media",y=-1,b=0;case 9:if(!(b<n.length)){e.next=16;break}if(n[b].cId!==h.cId){e.next=13;break}return y=b,e.abrupt("break",16);case 13:b++,e.next=9;break;case 16:if(x=(null===(s=i.data)||void 0===s||null===(u=s.customTooltipAttrExps)||void 0===u?void 0:u.value)||[],-1!==y&&x[y]&&(q=x[y]),"media"!==g||null===(l=h.ref)||void 0===l||null===(c=l.qStaticContentUrl)||void 0===c||!c.qUrl){e.next=20;break}return e.abrupt("return",nc(h,v,p));case 20:if("url"!==g){e.next=22;break}return e.abrupt("return",oc(p,f,h,v,q));case 22:if(!(f.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===g&&q&&q.label)){e.next=25;break}return D=n[y],e.abrupt("return",sc(p,D,v,q));case 25:return e.abrupt("return",[]);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var pc=function(e){return V(regeneratorRuntime.mark((function t(){var r,n,i,o,a,s,u,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=e.customTooltipModel,n=e.nodes,i=e.attrExps,o=e.opts,a=n,s=[],u=0;u<a.length;u++)s.push(lc(r,o,i,a[u]));return t.next=6,Promise.all(s);case 6:for(l=t.sent,c=0;c<a.length;c++)a[c].data.customTooltipImages=[l[c]];return t.abrupt("return",a);case 9:case"end":return t.stop()}}),t)})))()},fc=function(e){var t,r,n=null===(t=e.customTooltipModel.layout)||void 0===t||null===(r=t.tooltip)||void 0===r?void 0:r.imageComponents;return!!n&&n.length>0},dc=function(e){return V(regeneratorRuntime.mark((function t(){var r,n,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.customTooltipModel,n=e.nodes,i=e.attrExps,o=e.opts,a=n,t.next=4,pc({customTooltipModel:r,nodes:n,attrExps:i,opts:o});case 4:return a=t.sent,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})))()},mc=function(e){var t=e.customTooltipModel;return fc({customTooltipModel:t})};var hc=function(e,t){var r,n,i,o=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions,a=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,u=t;return{qInfo:{qType:Gl.CHART.CHART_PARENT_TYPE,qId:Gl.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:u}},vc=function(e){var t,r,n,i=null===(t=e.tooltip)||void 0===t||null===(r=t.chart)||void 0===r||null===(n=r.object)||void 0===n?void 0:n.refId;return{qInfo:{qType:Gl.CHART.CHART_CHILD_TYPE},qExtendsId:i}};function gc(e){return yc.apply(this,arguments)}function yc(){return(yc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s,u,l,c,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,i=t.properties,o=t.customTooltipModel,null===(r=(a=o).miniChartToken.sessionObj)||void 0===r||!r.id){e.next=5;break}return e.next=5,n.destroySessionObject(a.miniChartToken.sessionObj.id);case 5:return s=Gl.CHART.STATE,u=hc(i,s),e.next=9,n.createSessionObject(u);case 9:if(l=e.sent,c=vc(i),l.id===Gl.CHART.CHART_OBJECT_ID){e.next=14;break}return n.destroySessionObject(l.id),e.abrupt("return",void 0);case 14:return a.miniChartToken.sessionObj=l,e.next=17,l.createChild(c);case 17:if(p=e.sent,a.miniChartToken.sessionObj&&a.miniChartToken.sessionObj.id===l.id){e.next=21;break}return n.destroySessionObject(l.id),e.abrupt("return",void 0);case 21:return a.miniChartToken.model=p,e.abrupt("return",p);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bc(e){return xc.apply(this,arguments)}function xc(){return(xc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.app,n=t.customTooltipModel,i=n,o=Gl.CHART.STATE,e.next=5,r.removeSessionAlternateState(o);case 5:i.miniChartToken.alternateState=void 0;case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qc(e){return Dc.apply(this,arguments)}function Dc(){return(Dc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,n=t.properties,i=t.customTooltipModel,o=i,a=Gl.CHART.STATE,s=n.qStateName,o.miniChartToken.alternateState){e.next=9;break}return o.miniChartToken.alternateState=a,e.next=8,r.addSessionAlternateState(a,s);case 8:o.miniChartToken.alternateState=a;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cc,wc,Sc={createContainer:function(e){var t,r,n=e.ctx,i=e.layout;if(!((null===(t=i.qHyperCube)||void 0===t||null===(r=t.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var r,n,i,o,a=null!==(r=null===(n=t.tooltip)||void 0===n||null===(i=n.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==r?r:"medium",s=Gl.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Gl.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(n,i)},show:(wc=V(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,s,u,l,c,p,f,d,m,h,v,g,y,b,x,q,D,C,w,S,M,E,O;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.app,a=t.properties,s=t.selectedNodes,u=t.dimIndex,l=t.customTooltipModel,c=t.rtl,p=l,f=null==a||null===(r=a.tooltip)||void 0===r||null===(n=r.chart)||void 0===n||null===(i=n.object)||void 0===i?void 0:i.refId,null!=p&&p.embed&&o.removeSessionAlternateState&&o.addSessionAlternateState&&f&&!(a.qHyperCubeDef.qDimensions.length<=0)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,Sc.hide({app:o,customTooltipModel:l});case 7:return e.prev=7,e.next=10,qc({app:o,properties:a,customTooltipModel:l});case 10:return e.next=12,gc({app:o,properties:a,customTooltipModel:l});case 12:if(d=e.sent,!(p.miniChartToken.alternateState&&p.miniChartToken.sessionObj&&d)){e.next=24;break}return y=s.length>0&&void 0!==(null===(m=s[0].data)||void 0===m?void 0:m.value)?[null===(h=s[0].data)||void 0===h?void 0:h.value]:[],b=void 0!==u?u:a.qHyperCubeDef.qDimensions.length-1,2===a.qHyperCubeDef.qDimensions.length&&void 0===u&&s.length>0&&null!=(D=null!==(x=s[0].data.selectionOuterDimension)&&void 0!==x?x:s[0].data.selectionDimension)&&null!==(q=D.source)&&void 0!==q&&q.field&&(w=null==D||null===(C=D.source)||void 0===C?void 0:C.field.split("/"),S=w[w.length-1],(M=void 0!==D.value?[D.value]:[]).length>0&&void 0!==S&&p.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(S),M,!1)),y.length>0&&p.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",b,y,!1),E=document.getElementById(Gl.CHART.CONTAINER_ID),O={direction:c?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1},e.next=23,l.embed.render({element:E,model:p.miniChartToken.model,options:O,id:null===(v=p.miniChartToken.model)||void 0===v?void 0:v.id,type:null===(g=p.miniChartToken.model)||void 0===g?void 0:g.genericType});case 23:p.miniChartToken.vis=e.sent;case 24:e.next=30;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,Sc.hide({app:o,customTooltipModel:l});case 30:case"end":return e.stop()}}),e,null,[[7,26]])}))),function(e){return wc.apply(this,arguments)}),hide:(Cc=V(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,n=t.customTooltipModel,null!=(i=n)&&i.embed){e.next=4;break}return e.abrupt("return");case 4:return Sc.destroyVisualization({customTooltipModel:n}),e.next=7,r.destroySessionObject(Gl.CHART.CHART_OBJECT_ID);case 7:return i.miniChartToken.sessionObj=void 0,e.next=10,bc({app:r,customTooltipModel:n});case 10:case"end":return e.stop()}}),e)}))),function(e){return Cc.apply(this,arguments)}),destroyVisualization:function(e){var t,r,n=e.customTooltipModel;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(r=t.vis)||void 0===r?void 0:r.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function Mc(e,t){var r=t,n=r.qLayoutExclude;n||(r.qLayoutExclude={quarantine:{}},n=r.qLayoutExclude),n.quarantine||(n.quarantine={}),n.quarantine[Gl.CUSTOM.QUARANTINE]=[],e.forEach((function(e){n.quarantine[Gl.CUSTOM.QUARANTINE].push(e)})),r.qLayoutExclude=n}function Ec(e){var t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Oc(){var e=Gl.CUSTOM,t=e.EXPRESSION,r=e.TITLE,n=e.DESCRIPTION,i=e.IMAGES,o={};return o[t]=!0,o[r]=!0,o[n]=!0,o[i]=!0,o}function Ic(e){var t=Oc();return e.filter((function(e){return t[e.id]}))}var Tc={getNodes:function(e,t){var r=function(e,t){var r=0,n=0;e.center?(r+=e.center.x,n+=e.center.y):(r+=e.clientX,n+=e.clientY);var i=t.element.getBoundingClientRect();return{cx:r-i.left,cy:n-i.top}}(e,t);return t.shapesAt({x:r.cx,y:r.cy})},getDataNodes:function(e,t){var r,n=[],i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((function(t){var o,a,s,u,l=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!l||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(u=t.data)&&void 0!==u&&u.customTooltipAttrExps&&!t.data.customTooltipImages){var c=t;c.data.customTooltipImages=[],n.push(c)}}else{r||(r=[],Object.keys(i).forEach((function(t){r=r.concat(e.findShapes(t).filter((function(e){return e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]})))})));var p=r.filter((function(e){var t,r,n=null!==(t=null!==(r=e.data.stack)&&void 0!==r?r:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return n&&n.value===l.value&&n.label===l.label}));p.length>0&&(n=n.concat(p[0]))}})),n},displayTooltip:function(e,t,r){var n=r.nodes,i=r.opts,o=void 0===i?{}:i,a=r.customTooltipModel,s=r.extractedNodes,u=void 0===s?[]:s,l=r.hide;if(a&&!l){var c=a.layout,p=a.chart,f=Tc.getAttrExprData(c).attrExps;u.length||n.length?dc({customTooltipModel:a,nodes:Tc.getDataNodes(p,u.length>0?u:n),attrExps:f,opts:o}).then((function(){t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var d,m;null!==(d=o.flags)&&void 0!==d&&d.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=a&&null!==(m=a.miniChartToken)&&void 0!==m&&m.alternateState&&Sc.hide({app:o.app,customTooltipModel:a}),t.emit("hide")}},checkIfPromisesExist:function(e){var t=e.customTooltipModel;return mc({customTooltipModel:t})},getAttrExps:function(e,t){var r,n=t,i=null!==(r=e.qHyperCubeDef)&&void 0!==r&&r.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[i]||(n[i]=[]),n[i]},getAttrExprData:function(e){var t,r=[],n="",i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s,u=i.length-1;r=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[u])||void 0===s?void 0:s.qAttrExprInfo)||[],n="qDimensionInfo/".concat(u,"/qAttrExprInfo")}return{attrExps:r,fieldPath:n}},quarantineCustomTooltipAttrs:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Gl.CUSTOM.QUARANTINE];if(!i){var o=n.qAttributeExpressions||[],a=Ic(o);Mc(a,e)}},unquarantineCustomTooltipAttrs:function(e){var t,r,n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Gl.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Gl.CUSTOM.QUARANTINE]},setAttrsFromQuarantine:function(e,t){var r=Ec(e);if(r){var n=void 0!==t?t:r.length-1;if(r[n]){var i=this.getAttrExps(e,r[n]);if(0===Ic(i).length){var o,a,s=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],u=[].concat(te(i),te(s)),l=e;l.qHyperCubeDef?l.qHyperCubeDef.qDimensions[n].qAttributeExpressions=u:l.qHyperCube.qDimensionInfo[n].qAttrExprInfo=u}}}},moveCustomTooltipAttrs:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=[],i=Ec(e)||[],o=[].concat(te(i),[t]);o.forEach((function(e){var t=Ic(e.qAttributeExpressions||[]);t.length>0&&(n=t)}));var a=Oc(),s=i.map((function(e){var t=e,r=e.qAttributeExpressions||[];return t.qAttributeExpressions=r.filter((function(e){return!a[e.id]})),t})),u=void 0!==r?r:s.length-1;s.length>0&&(s[u].qAttributeExpressions=s[u].qAttributeExpressions.concat(n));var l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=s:l.qHyperCube.qDimensionInfo=s},addCallbackCustomTooltip:function(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip:function(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip:function(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:function(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50};function Ac(e,t,r,n){var i,o,a,s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[r])||void 0===o||null===(a=o[n])||void 0===a?void 0:a.qAttrExprInfo)||[],u=[],l=e.qSubNodes&&e.qSubNodes[n]?e.qSubNodes[n].qAttrExps:e.qAttrExps;return l?(s.forEach((function(e,t){var i=l.qValues&&l.qValues[t]?l.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){var r;switch(e.id){case Gl.CUSTOM.EXPRESSION:r="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Gl.CUSTOM.TITLE:case Gl.CUSTOM.DESCRIPTION:case Gl.CUSTOM.IMAGES:r=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:r="NaN"}return r}(e,i);u.push({source:{key:"qHyperCube",field:"".concat(r,"/").concat(n,"/qAttrExprInfo/").concat(t)},label:o,value:"value"})})),u):u}var jc=function(e,t){var r=t.dimensionCount;if(r&&!(r<1)){var n=r-1,i="qDimensionInfo";return{field:"".concat(i,"/").concat(n),value:function(t){return Ac(t,e,i,n)}}}};var kc=function(e,t,r){var n,i,o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(n=t.data)||void 0===n||null===(i=n.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];return Number.isNaN(a)?o:function(e,t,r,n){var i,o=(B(i={},Gl.CUSTOM.TITLE,!0),B(i,Gl.CUSTOM.DESCRIPTION,!0),i),a=Tc.getAttrExprData(e),s=a.attrExps,u=a.fieldPath;return 0===t.length||0===s.length||""===u||s.forEach((function(e,i){var a=t[i];if(e.id===Gl.CUSTOM.EXPRESSION&&a){var s=e.qFallbackTitle,l="NaN"===a.value||e.isCustomFormatted?a.value:r("qHyperCube").field("".concat(u,"/").concat(i)).formatter()(a.value);n.customTooltipAttrExpsArr.push({label:s,value:l})}else if(o[e.id]&&a){var c="-"!==a.value&&"NaN"!==a.value?a.value:a.label;c&&"undefined"!==c&&n.customTooltipInfoAttrExpsArr.push(R(R({},e.id===Gl.CUSTOM.TITLE&&{title:c}),{},{value:c,id:e.id}))}})),n}(r,a.map((function(t){return Te.getMeasure(e,t)})),e,o)};function Lc(e){return function(e,t,r){var n=[];return e.forEach((function(e){n.push(kc(r,e,t))})),n}(e.nodes,e.layout,e.dataset).reduce((function(e,t){return{customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Pc(e){var t=Gl.CUSTOM.EXPRESSION,r=e.qDef,n=r.qNumFormat,i=r.qLabel,o=r.qLabelExpression,a=r.cId;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:a}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:a}}function Nc(e){var t,r=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return r[r.length-1].qAttributeExpressions||[]}var Rc={attrExpr:{migrateProperties:function(e){var t,r,n,i,o=me(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],s=Nc(o);return function(e,t){var r,n=null===(r=t.qHyperCubeDef)||void 0===r?void 0:r.qDimensions;n[n.length-1].qAttributeExpressions=e}(s=function(e,t){return t.concat(e.map((function(e){return Pc(e)})))}(a,s),o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches:function(e){var t,r,n,i,o=(null===(t=e.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,r){var n=e.length,i=[];return t.forEach((function(e){var t=Pc(e),o=JSON.stringify(t);i.push({qPath:"/qHyperCubeDef/qDimensions/".concat(r,"/qAttributeExpressions/").concat(n),qOp:"add",qValue:o}),n++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(Nc(e),o,a)},checkForBackwardCompatibility:function(e,t){return(e.qMeasureInfo||[]).length>0&&t.length>0},updateProperties:function(e,t){var r=this;return new Promise((function(n){var i,o,a,s,u,l=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],c=(null===(o=t.tooltip)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.qHyperCube)||{},p=null===(s=t.qMeta)||void 0===s||null===(u=s.privileges)||void 0===u?void 0:u.includes("update");e&&e.getEffectiveProperties&&r.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((function(t){if(p){var i=r.migrateProperties(t);e.setProperties(i).then((function(){e.app.clearUndoBuffer(),n(!0)}))}else{var o=r.getPatches(t);e.applyPatches(o,!0).then((function(){e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};function Fc(e){var t=e.scaleKey,r=e.legend,n=e.onEdited,i=(r.layout||{}).dock;return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd:function(){n()}}:{},settings:{brush:"selection",scale:"".concat(t,"Range"),direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}var _c={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Vc=function(e,t,r){var n=e.layout;return t.encodings.slice.outerRadius?{scale:"radius",fn:function(e){var t=.8,i=0,o=r?r.style.innerRadius:.55;return n.donut.showAsDonut&&(t=.8-o,i=o),e.scale(Math.max(0,e.datum.radius.value))*t+i}}:.8},Hc=function(e,t,r){if(!e.layout.donut.showAsDonut)return 0;var n=r?r.style.innerRadius:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:function(e){var t=.8-n,r=n;return e.scale(Math.min(0,e.datum.radius.value))*t+r}}:n},zc=function(e,t){var r=e.layout,n=t.colorService.getDatumProps(),i=n[Object.keys(n)[0]],o=i&&i.field?i.field:void 0,a="qDimensionInfo/0"===o,s=o?t.ds.field(o).raw():null,u=s&&(s.label||s.title||s.qFallbackTitle)||"",l=t.encodings.slice.outerRadius,c=t.chart.formatter,p=De(r,"qHyperCube.qDimensionInfo",[]).length;function f(e,r){var n=t.ds.field(e).raw();return{field:e,label:!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType)?function(e){return c(r)(e.qNum)}:function(e){return e.qText}}}var d=(r.components||[]).filter((function(e){return"slices"===e.key}))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:R(R({},n),{},{num:f(t.encodings.slice.arc,"arc"),fillTooltip:o?{field:o,label:u,value:function(e){return a?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}}:void 0,customTooltipAttrExps:0!==p?jc(r,{dimensionCount:p}):void 0,radius:l?f(l,"outerRadius"):void 0})}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:function(){return t.viewState.get("rotation")},endAngle:function(){return t.viewState.get("rotation")+2*Math.PI},slice:{arc:{ref:"num"},innerRadius:Hc({layout:r},t,d),fill:t.colorService.getColor(),strokeWidth:d?_c.STROKE.WIDTH[d.style.strokeWidth.toUpperCase()]:_c.STROKE.WIDTH.NONE,stroke:d?d.style.strokeColor.color:_c.STROKE.COLOR,outerRadius:Vc({layout:r},t,d),cornerRadius:d?d.style.cornerRadius:0}}}};function Uc(e,t,r){var n=e.layout,i=(n.components||[]).filter((function(e){return"slices"===e.key}))[0],o=i?i.style.innerRadius:.55,a=t.encodings.slice.outerRadius;return!(!n.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:ie(r.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:function(e){var t=.8-o,r=o;return e.scale(0)*t+r}}}}}}function Bc(e,t,r){return!(e.layout.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:ie(r.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}function Wc(e,t){var r=e.layout,n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return r.donut.showAsDonut||(n.radius.min=0),n}var Yc=ie;function Kc(e){var t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function $c(e){return e.node.data.num.label}function Jc(e){return e.node.data.radius.label}function Zc(e,t,r){return e.dataPoint.auto?r?$c:Kc:"share"===e.dataPoint.labelMode?Kc:"value"===e.dataPoint.labelMode?t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Jc:$c:null}function Gc(e){var t=e.data;return t?t.label:""}function Xc(e,t,r){var n=parseInt(Yc(e,"object.pieChart",t,r),10);if(!isNaN(n))return n}function Qc(e){var t=((e&&e.components?e.components:void 0)||[]).filter((function(e){return"slices"===e.key}))[0];return!t||t.style.innerRadius>.3}function ep(e){var t=e.node,r=e.data;return me({_share:t.desc.share,_fillColor:t.attrs.fill},r)}function tp(e,t,r){var n=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Yc(r.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Xc(r.theme,"label.name","fontSize"),fontFamily:Yc(r.theme,"object.pieChart","label.name","fontFamily"),label:Gc,linkData:function(e){var t=e.node,r=e.data;return me({_share:t.desc.share,_fillColor:t.attrs.fill,_showTooltip:!0},r)}}];if(Zc(e,t,!1)){var i=function(e,t,r){return{label:Zc(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Qc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Qc(e),padding:4}],theme:r.theme,themeId:"object.pieChart"}}(e,t,r),o=ke(me(t,i),r.theme);o.linkData=ep,n.push(o)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:n}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function rp(e,t){var r=e.layout,n=e.context;return!1!==r.dataPoint.show&&(1===t.dataRowCount?function(e,t,r){var n=Zc(e,t,!0),i=function(e){return function(t){return e.getContrastingColorTo(t.node.attrs.fill)}}(r.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.name","color"):i,fontSize:Xc(r.theme,"label.name","fontSize"),fontFamily:Yc(r.theme,"object.pieChart","label.name","fontFamily"),label:Gc},{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.value","color"):i,fontSize:Xc(r.theme,"label.value","fontSize"),fontFamily:Yc(r.theme,"object.pieChart","label.value","fontFamily"),label:n}]}}}]}}}(r,t,n):tp(r,t,n))}function np(e){return De(e,"customTooltipModel.useCustomTooltip",!1)}function ip(e,t){return np(t)&&De(e,"tooltip.hideBasic",0)}function op(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})}function ap(e){return[{content:e.title,style:{"font-weight":"bold"},colspan:2},{}]}function sp(e){return[{content:e.value,colspan:2},{}]}function up(e,t,r){var n=[op(e,t)];return n.push(t.color.value),[{content:t.color.label},{content:n,style:{"text-align":r?"left":"right"}}]}function lp(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[e.value];return n&&o.unshift(op(t,r)),[{content:"".concat(e.label,":")},{content:o,style:{"text-align":i?"left":"right"}}]}function cp(e,t,r,n){return ip(r,n)||void 0===e.share.value?[]:[{content:e.share.label},{content:e.share.value,style:{"text-align":t?"left":"right"}}]}function pp(e,t,r){return ip(r,e)||t.measures.some((function(t){return t.field===e.coloring.field}))||void 0===t.color.value}function fp(e,t,r,n){return 0===r.length&&0===n.length&&(""!==e&&void 0!==e||""!==t&&void 0!==t)}function dp(e,t,r){var n,i=e.node,o=e.node.data,a=e.resources.formatter,s=e.resources.dataset,u={};if("color"!==t.coloring.type&&o.fillTooltip){var l=a("fill"),c="measure"===t.coloring.fieldType;u.value=c&&l?l(o.fillTooltip.value):o.fillTooltip.value,u.label="".concat(o.fillTooltip.label,":")}function p(e){return{label:s(e.source.key).field(e.source.field).title(),value:e.label,field:e.source.field}}t.coloring.label&&(u.label="".concat(t.coloring.label,":")),u.fill=void 0===o._fillColor?i.attrs.fill:o._fillColor,i&&i.desc&&void 0!==i.desc.share?n=i.desc.share:i&&o&&void 0!==o._share&&(n=o._share);var f=[p(o.num)];t.encodings.slice.outerRadius&&f.push(p(o.radius));var d={title:o.label,color:u,share:{label:"".concat(t.translator&&t.translator.get("properties.dataPoints.labelmode.share")||"Share",":"),value:void 0!==n?a("share")(n):void 0},measures:f};if(np(t)){var m,h,v,g,y,b,x=Lc({dataset:s,nodes:[i],layout:r});if(d.customTitle=x.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===Gl.CUSTOM.TITLE})),d.customDescription=x.customTooltipInfoAttrExpsArr.filter((function(e){return e.id===Gl.CUSTOM.DESCRIPTION})),d.customMeasures=x.customTooltipAttrExpsArr,t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(m=r.tooltip)&&void 0!==m&&null!==(h=m.chart)&&void 0!==h&&null!==(v=h.object)&&void 0!==v&&v.refId&&t.customTooltipModel.embed&&"function"==typeof(null===(g=t.customTooltipModel.model)||void 0===g?void 0:g.getEffectiveProperties))if(null!==(y=(b=t.app).isInModalSelection)&&void 0!==y&&y.call(b)){Sc.destroyVisualization({customTooltipModel:t.customTooltipModel});var q=t.translator.get("properties.tooltip.notselectedmessage");d.customLimitation=q}else{var D=Sc.createContainer({ctx:e,layout:r});d.customChart=D}i.data.customTooltipImages&&(d.customImages=i.data.customTooltipImages)}return d}function mp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=[],i=Se({rtl:r.rtl});return me(!0,i,{scale:"fill",settings:{filter:function(e){return e.filter((function(e){return e.data&&("path"===e.type&&("slices"===e.key||"negative-indicators"===e.key)||"text"===e.type&&e.data._showTooltip&&"pie-labels"===e.key)}))},extract:function(i){var o,a;n=[i.node];var s,u=e.layout,l=dp(i,t,u),c=[],p=ip(u,t)?[]:l.measures,f=np(t)&&fp(l.customTitle[0],l.customDescription[0],p,l.customMeasures)?[]:ap(l);(np(t)&&l.customTitle.length>0&&c.push(ap(l.customTitle[0])),np(t)&&l.customDescription.length>0&&c.push(sp(l.customDescription[0])),c=pp(t,l,u)?c.concat([f].concat(te(p.map((function(e){return lp(e,i,l,e.field===t.coloring.field,r.rtl)}))),[cp(l,r.rtl,u,t)])):c.concat([f,up(i,l,r.rtl)].concat(te(p.map((function(e){return lp(e,i,l,!1,r.rtl)}))),[cp(l,r.rtl,u,t)])),np(t)&&l.customMeasures.length>0)&&(s=c).push.apply(s,te(l.customMeasures.map((function(e){return lp(e,i,l,e.field===t.coloring.field,r.rtl)}))));if(null!==(o=t.flags)&&void 0!==o&&o.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customChart&&c.push(l.customChart),null!==(a=t.flags)&&void 0!==a&&a.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customLimitation&&c.push(Te.getFooterRow(l.customLimitation,r)),l.customImages){var d,m=l.customImages.map((function(e){return Te.getImageRow(e,i)}));(d=c).push.apply(d,te(m))}return c},placement:function(e){return"slices"===e.nodes[0].key?{type:"slice"}:{type:"bounds"}},direction:r.rtl?"rtl":"ltr",afterShow:function(){var e,i,o,a=t.app,s=t.properties,u=t.customTooltipModel;null!==(e=t.flags)&&void 0!==e&&e.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(i=(o=t.app).isInModalSelection)||void 0===i||!i.call(o))&&u.useCustomTooltip&&u.embed&&Sc.show({app:a,properties:s,selectedNodes:n,customTooltipModel:u,rtl:r.rtl})}},style:{content:{fontFamily:r.theme.getStyle("object.pieChart","","fontFamily")}}})}function hp(e){var t=e.srcEvent.target;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}var vp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"legendRange",enable:function(t,r){if(this.started||!r)return!0;if(e.constraints.select||e.constraints.active)return!1;var n=(this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return"legend-seq"===e.type}))||hp(r))&&!e.isLocked([this.chart.component("slices")]);return n||this.chart.component("legendRangeBrush").emit("rangeClear"),n}},events:{legendRangestart:function(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove:function(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend:function(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}}};function gp(e,t){var r,n,i=t.element.getBoundingClientRect();return e.center?(r=e.center.x,n=e.center.y):(r=e.clientX,n=e.clientY),{x:r-i.left,y:n-i.top}}function yp(e,t){var r=t.component("slices");if(!r)return!1;var n,i,o,a,s=gp(e,t),u=s.x,l=s.y,c=r.rect.x+r.rect.margin.left+r.rect.width/2,p=r.rect.y+r.rect.margin.top+r.rect.height/2,f=Math.min(r.rect.width,r.rect.height)/2*.8;return n=c,i=p,o=u,a=l,Math.pow(n-o,2)+Math.pow(i-a,2)<=Math.pow(f,2)}var bp=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.requireFailure,i=r.recognizeWith,o=e.customTooltipModel.utils,a=e.debouncer(o.displayTooltip,o.DEBOUNCE_THRESHOLD);return{type:"Tap",requireFailure:n,recognizeWith:i,options:{event:"tap",interval:10,pointers:1,enable:function(t,r){return!r||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key})),this.components.length)}},events:{tap:function(r){r.preventDefault();var n=r.srcEvent.target;if(!n||"INPUT"!==n.nodeName&&!n.hasAttribute("data-other-value")){if(n&&n.hasAttribute("data-action")&&n.hasAttribute("data-component-key"))this.chart.component(n.getAttribute("data-component-key")).emit(n.getAttribute("data-action"));else if(!(n&&n.children&&n.children[0]&&"legend-cat"===n.children[0].getAttribute("data-component-key")||e.isLocked(this.components))){e.interactions.emit("selections-start");var i=gp(r,this.chart);this.components.some((function(e){return"legend-cat"===e.key}))&&(i={cx:i.x,cy:i.y,r:5});var s=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"}),u=this.chart.component("tooltip"),l="mouse"!==r.pointerType&&u&&u.show;if(s.length){if(this.chart.brushFromShapes(s,{components:[{key:s[0].key,action:r.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect(),l&&this.components.some((function(e){return"slices"===e.key}))){var c=e.customTooltipModel;if(c.useCustomTooltip&&o.checkIfPromisesExist({customTooltipModel:c})){var p=o.getNodes(r,this.chart);a(r,u,{nodes:p,opts:e,customTooltipModel:c})}else u.emit("show",r,{nodes:s})}}else l&&u.emit("hide")}}else this.chart.component("legendRangeBrush").emit("bubbleStart",r)}}}},xp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"lasso",enable:function(t,r){if(this.isStarted||!r)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;var n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return!e.isLocked(n)&&n.some((function(e){return"slices"===e.key}))}},events:{lassostart:function(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove:function(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend:function(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}},qp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"areatap",pointers:2,enable:function(t,r){if(this.started||!r)return!0;if(e.constraints.active||e.constraints.select)return!1;var n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return n.some((function(e){return"slices"===e.key}))&&!e.isLocked(n)}},events:{areatap:function(t){var r=this,n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((function(){n.emit("areaEnd"),e.onSelect(),r.started=!1}),100)),t.preventDefault()}}}};function Dp(e,t,r){var n=e.chart.component("tooltip");n&&n.show&&(n.emit("hide"),r.customTooltipModel.useCustomTooltip&&t&&t({},n,{nodes:[],opts:r,customTooltipModel:r.customTooltipModel,hide:!0}))}function Cp(e){var t=e.customTooltipModel.utils,r=e.debouncer(t.displayTooltip,t.DEBOUNCE_THRESHOLD);return{type:"native",key:"theusual",events:{wheel:function(t){var n=!1;if(!e.constraints.active&&yp(t,this.chart)){var i=Math.sign(-t.deltaY);e.viewState.set("rotation",i*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){var o=this.chart.componentsFromPoint(t).filter((function(e){return"legend-cat"===e.key}))[0];o&&(n=!0,function(e,t){var r=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(r)}(t,o))}n&&t.preventDefault(),Dp(this,r,e)},mousemove:function(n){if(!e.constraints.passive){var i=this.chart.componentsFromPoint({x:n.clientX,y:n.clientY}),o=this.chart.component("tooltip");if(o&&o.show&&i.some((function(e){return"slices"===e.key}))){var a=e.customTooltipModel;if(a.useCustomTooltip&&t.checkIfPromisesExist({customTooltipModel:a})){var s=t.getNodes(n,this.chart);r(n,o,{nodes:s,opts:e,customTooltipModel:a})}else o.emit("show",n)}else o&&o.show&&o.emit("hide")}},mouseup:function(t){2===t.button&&Dp(this,r,e)},mouseleave:function(){Dp(this,r,e)}}}}var wp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable:function(t,r){return!(!this.started&&r)||!e.constraints.active&&!e.interactions.lasso.active()&&yp(r,this.chart)}},events:{rotatestart:function(e){e.preventDefault();var t=this.chart.component("slices").rect,r=this.chart.element.getBoundingClientRect();this.pieCenter={x:r.left+t.x+t.width/2,y:r.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove:function(t){t.preventDefault();var r=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",r-this.prevAngle),this.prevAngle=r},rotateend:function(e){e.preventDefault(),this.started=!1},rotatecancel:function(e){e.preventDefault(),this.started=!1}}}},Sp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requireFailure,n=t.recognizeWith;return{type:"Pan",requireFailure:r,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable:function(t,r){return!(!this.isStarted&&r)||!e.constraints.active&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return"legend-cat"===e.type}))}},events:{legendPanstart:function(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((function(t){t.emit("panstart",e)})),this.isStarted=!0;var t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove:function(e){this.components.forEach((function(t){t.emit("panmove",e)})),e.preventDefault()},legendPanend:function(e){e.preventDefault(),this.components.forEach((function(t){t.emit("panend",e)})),this.isStarted=!1}}}},Mp=function(e,t){return{key:"hammered",type:"hammer",enable:!0,gestures:t?[wp(e,{}),bp(e,t,{})]:[vp(e,{}),qp(e,{}),wp(e,{}),xp(e,{}),Sp(e,{}),bp(e,t,{})]}};function Ep(e,t,r){var n=e.getIsSingleSelect(0),i=r.constraints;return i.active&&i.passive?[]:[Mp(t,n),Cp(t)]}function Op(e,t){var r=e.settings,n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:r.scales.fill&&r.scales.fill.data&&r.scales.fill.data.field?{data:{field:r.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function Ip(e,t,r){var n=e.layout;if(!n.dimensionTitle)return!1;var i=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:n.qHyperCube,hyperCubeDef:i&&i.qHyperCubeDef,isDimension:!0,disabled:function(){return r.constraints.active||!r.model},model:t.model,app:t.app,translator:t.translator,rtl:r.rtl,selections:t.selections},style:{fontFamily:r.theme.getStyle("object","axis.title","fontFamily"),fontSize:r.theme.getStyle("object","axis.title","fontSize"),color:r.theme.getStyle("object","axis.title","color")}}}function Tp(e,t,r){return function(e,t,r){if(!e)return!1;var n=t.translator,i=r.rtl;return{key:"disclaimer",type:"disclaimer",layout:{dock:ge[e].alignment},settings:{label:n.get("Object.Disclaimer.".concat(e)),rtl:i}}}(function(e,t){var r={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(r.props.radius={field:t.encodings.slice.outerRadius});var n=t.ds.extract(r);if(0===n.length)return"NoDataExist";var i=De(e,"qHyperCube.qSize.qcy");if(De(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(0===(n=t.encodings.slice.outerRadius?n.filter((function(e){return"NaN"!==e.num.value&&"NaN"!==e.radius.value})):n.filter((function(e){return"NaN"!==e.num.value}))).length)return"OnlyNanData";var o=n;return 0===(n=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?n.filter((function(e){return e.num.value>0&&e.radius.value>0})):n.filter((function(e){return e.num.value>0}))).length?"OnlyNegativeOrZeroValues":o.length!==n.length&&"NegativeOrZeroValues"}(e.layout,t),t,r)}function Ap(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};return me(n,r.colorService.getScales()),r.encodings.slice.outerRadius&&me(n,Wc({layout:t},r)),n}function jp(e){var t=e.instance,n=e.services,i=e.picasso,o=e.flags,a=h(),s=D(),u=C(),l=w(),c=E(),p=O(),f=S(),d=g(),m=I(),v=T().qLocaleInfo,y=ee(A((function(){if(!n)return Promise.resolve();Rc.attrExpr.updateProperties(s,f);return Promise.all([n.colorService.initialize({createConfig:function(e){var t=e.getUseBaseColors;return{theme:p,legendProps:f.legend,layout:f,localeInfo:v,hc:f.qHyperCube,colorProps:R(R({},f.color),{},{useBaseColors:t(f)})}}}),s&&!f.snapshotData?s.getEffectiveProperties():Promise.resolve({}),n.pluginService.initialize()])}),[n]),1)[0];q((function(){null!=t&&t.selectionService&&t.selectionService.setLayout(f)}),[f]),q((function(){if(t&&y){var e=t.chart,h=t.viewState,g=t.interactions,b=n.colorService,x=n.pluginService,q=a.viewState||{};f.snapshotData||(h.preventSet("legendScrollOffset",q.legendScrollOffset||0),h.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(f,h);var D=i.data("q")({key:"qHyperCube",data:f.qHyperCube,config:{localeInfo:v}}),C=[{type:"q",key:"qHyperCube",data:f.qHyperCube,config:{localeInfo:v}}].concat(te(b.getData())),w={slice:{arc:"qMeasureInfo/0"}};f.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");var S=function(e){var t=e.layout,r=e.app,n=e.picasso,i=e.model,o=e.chart,a=e.translator,s=e.localeInfo,u=e.embed;return{layout:t,app:r,picasso:n,model:i,chart:o,translator:a,localeInfo:s,useCustomTooltip:t.tooltip&&!t.tooltip.auto,utils:Tc,miniChartToken:{},embed:u}}({layout:f,app:u,model:s,picasso:i,chart:e,translator:l,localeInfo:v,embed:c}),M=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((function(e){return e.num.value>0&&"NaN"!==e.radius.value})).length:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((function(e){return e.num.value>0})).length}(i.data("q")({data:f.qHyperCube,config:{localeInfo:v}}),w),E=d?function(){var t=e.brush("selection");r.selections(t,{},f).forEach((function(e){d.select(e)}))}:function(){},O=f.snapshotData&&!a.freeResize?{width:(f.snapshotData.content.size||f.snapshotData.object.size).w,height:(f.snapshotData.content.size||f.snapshotData.object.size).h}:void 0,I=function(e){return t.selectionService.getIsSelectionLocked(e)},T=function(){return function(e){var t=e.layout,r=e.context,n=e.selectionService,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Ap({layout:t},i),a={scales:o},s=[],u=Tp({layout:t},i,r);if(u&&"center"===u.layout.dock)return{components:[u]};var l=r.constraints.select||r.constraints.active,c=i.colorService.getLegend({eventName:"legend",key:"legend",viewState:i.viewState,chart:i.chart,styleReference:"object.pieChart",rtl:r.rtl},{navigationDisabled:l});return o.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||r.rtl)&&(o.fillRange.invert=!0),s=(s=[zc({layout:t,settings:a},i),Uc({layout:t},i,r),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Bc({layout:t},i,r),Ip({layout:t},i,r)].concat(te(c.components),[Fc({settings:a,scaleKey:"fill",legend:c.components[0]||{},onEdited:i.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},rp({layout:{dataPoint:me({},t.dataPoint,{show:!(t.effectPath&&t.snapshotData&&!1===t.dataPoint.show)}),donut:t.donut},context:r},i),mp({layout:t},R(R({},i),{},{coloring:i.colorService.getSettings()}),r),(!1!==t.showDisclaimer||!i.flags.isEnabled("SHOW_DISCLAIMER"))&&u])).filter((function(e){return!1!==e})),{interactions:Ep(n,i,r),scales:o,components:i.pluginService.extendComponents(s),palettes:i.colorService.getPalettes(),formatters:Op({settings:a},i),strategy:qe(0,i)}}({layout:f,context:{rtl:"rtl"===a.direction,theme:p,translator:l,constraints:m,model:s},selectionService:t.selectionService},{picasso:i,ds:D,model:s,app:u,chart:e,onSelect:E,isLocked:I,interactions:g,constraints:m,translator:l,viewState:h,dataRowCount:M,encodings:w,colorService:b,pluginService:x,customTooltipModel:S,debouncer:Ss,properties:y[1],logicalSize:O,flags:o})};t.generateSettings=T,e.update({data:C,settings:T()}),a.effect&&f.effectProperties?a.effect.update(f,e,{encodings:w}):f.effectPath||e.brush("highlight").end()}}),[t,y,a.direction,a.effectProperties,m,p.name(),l.language()])}function kp(e){var t=e.instance,r=e.services,n=v(),i=S();k((function(e){if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){var r=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:r.width,h:r.height}}(e,n),t&&r))return function(e){var t=e.layout,r=e.chart,n=e.viewState,i=e.colorService;return t.snapshotData.content=t.snapshotData.content||{},t.snapshotData.content.chartData={legendScrollOffset:Ce(r,"legend-cat"),rotation:n.get("rotation")},i.getSnapshotData().then((function(e){t.snapshotData.content.chartData=R(R({},t.snapshotData.content.chartData),e)})).catch((function(){}))}({layout:e,chart:t.chart,colorService:r.colorService,viewState:t.viewState})})),L((function(){return{getViewState:function(){return{rotation:t.viewState.get("rotation"),legendScrollOffset:Ce(t.chart,"legend-cat")}}}}),[t])}var Lp={exports:{}};window;var Pp=oe(Lp.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"===F(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s="./index.js")}({"../node_modules/extend/index.js":
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,d):"";if(r=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}}(el={exports:{}}),el.exports);function rl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var nl={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"},ol=/%$/,il=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,al=/^\(oct\)/i,sl=/^\(dec\)/i,ll=/^\(hex\)/i,ul=/^\(bin\)/i,cl=/^\(rom\)/i,pl=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,dl=/#|0/g;function fl(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 ml(e,t,r){var n=rl(e);return r?n:new RegExp(n||"",t)}function hl(e,t,r){var n,o,i,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=rl(f)),d&&(d=rl(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(p))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===r&&(o=(n=i.split(r)).pop(),i=n.join("")+r+o,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(ml(l,"g"),t)),u=r,r=".",u&&(i=i.replace(ml(u,"g"),r)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(dl)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=ol.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(ml(t,null,!0),"|").concat(ml(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}var gl=function(){function e(t,r,n,o,i){es(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return nl;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()}return rs(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],pl.test(e[0])&&(n.positive.isFunctional=!0),e[1]?pl.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?pl.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||hl(n.positive,t,r),n.negative&&!n.negative.isFunctional&&hl(n.negative,t,r),n.zero&&!n.zero.isFunctional&&hl(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,o,i,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,i=c.d,a=c.t,c.isFunctional)e=function(e,t,r){var n;return il.test(t)?e=fl(e,Number(/\d{2}/.exec(t)[0]),t,r):al.test(t)?e=fl(e,8,t,r):sl.test(t)?e=fl(e,10,t,r):ll.test(t)?e=fl(e,16,t,r):ul.test(t)?e=fl(e,2,t,r):cl.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="",o=Number(String(e).slice(-3)),i=(e-o)/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();o>0;)for(r=0;r<a.length;r++)if(a[r]<=o){n+=s[r],o-=a[r];break}for(r=0;r<i;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,i);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(i)[1],"I"===this.type&&(e=Math.round(e)),o=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 v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=tl(b+=i,v)||"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+=i+D)}else 0===v&&(o=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=o.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(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=tl(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===i?c.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function yl(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size,i=void 0===o?5e3:o,a=n.multipleArguments,s=void 0!==a&&a,l=n.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return r=u.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=u(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return d>=i&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function vl(e,t,r,n,o){var i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ls(gl,t)}(o,e,t,r,n),a=yl(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),i.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var bl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ql=["January","February","March","April","May","June","July","August","September","October","November","December"],Dl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cl(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function wl(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Ml=function(){function e(t,r,n){es(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:bl,qDayNames:xl,qLongMonthNames:ql,qMonthNames:Dl}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),r||(r=(ns(o={},"T",i.qTimeFmt||"hh:mm:ss"),ns(o,"D",i.qDateFmt||"YYYY-MM-DD"),ns(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[n]),this.pattern=r}return rs(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,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(n=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:i,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*wl(t),n=60*wl(r),o=60*wl(n),i=1e3*wl(o);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(o),f:Math.round(i)}}(e),o=n.d,i=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)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/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:o,h:i,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:Cl("".concat(t.year).slice(-2),2),YYY:Cl("".concat(t.year).slice(-3),3),def:function(e){return Cl("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Cl("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Cl("".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 Cl("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Cl("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Cl("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Cl("".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 o=0;o<n;o++)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 o in l[r])if(o===e||o.toLowerCase()===e){void 0===(n=l[r][o])&&(n=l[r][o.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function Sl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ls(Ml,t)}function El(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Il(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=Sl(r,e,t),o=yl(n.format.bind(n),{toKey:function(e){return"object"===Qa(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?El(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),n.format(t,e)},a.locale=function(r){return n=Sl(r,e,t),o=yl(n.format.bind(n),{toKey:function(e){return"object"===Qa(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Tl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Il(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(r="#".concat(o,"##A"),i="U"),vl(r,n,o,i,t)}function Al(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,o=t.key,i=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},d="dimension"===l?"first":"avg",f=Tl(r,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return n},key:function(){return o},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:p,reduce:d,reduceLabel:m,formatter:function(){return f},tags:function(){return r.qTags}};return h}function Ol(e,t,r,n,o){return(t[e]||[]).map((function(t,i){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(i),s={instance:Al(xs({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=Ol("qAttrDimInfo",t,r,a,xs({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Ol("qAttrExprInfo",t,r,a,xs({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=Ol("qMeasureInfo",t,r,a,xs({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function jl(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.key,i=n.data,a=n.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=i;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=jl.util,p={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return o},raw:function(){return u},field:function(e){return Vs(e,p)},fields:function(){return l.fields.slice()},extract:function(e){return p.extractor(e,d,l,c)},hierarchy:function(e){return p.hierarchy(e,d,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(p.extractor=Qs,p.hierarchy=Xs,p.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(p.extractor=ws,p.pages=u.qDataPages,p.hierarchy=Xs):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},d,l,c)};var f="S"===u.qMode?function(e){return e.qElemNumber}:void 0,m="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,us(Ol("qDimensionInfo",u,o,"",xs({},p,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,us(Ol("qMeasureInfo",u,o,"",xs({},p,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),r=Al(is({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},d,l,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(r)})),(r=l.allFields).push.apply(r,us(l.virtualFields)),d}var kl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ll=/\/qDimensionInfo(?:\/(\d+))?/,Nl=/\/qMeasureInfo\/(\d+)/,Pl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Rl=/\/qAttrExprInfo\/(\d+)/,Fl=/\/?qHyperCube/,Vl=/\/?qTreeData/,_l=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Hl=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function zl(e,t){var r=e,n=-1,o=-1,i="",a=function(e){return e};Fl.test(e)?(i="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=_l):Vl.test(e)&&(i="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=Hl);var s=!0;if(Ll.test(e)&&(n=+Ll.exec(e)[1]),Nl.test(e)&&(o=+Nl.exec(e)[1]),Pl.test(e)){o=-1,n=0;var l=+Pl.exec(r)[2];isNaN(l)||(n=l,r=r.replace(/\/\d+$/,"")),s=!1}if(Rl.test(e)){var u=o;if(t){o=0;var c=Ps(i,t);o+=(c.qMeasureInfo||[]).length,n>-1?(o=c.qDimensionInfo.slice(0,n).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),n=-1):(o=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),o=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o)),o+=+Rl.exec(r)[1]}else n>-1?(n=-1,o=+Rl.exec(r)[1]):o+=+Rl.exec(r)[1]+1}return kl.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||cs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],o=t[1];r=r.replace(n,o)})),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:o,dimensionIdx:n,path:r}}function Ul(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=r.byCells,i=r.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=zl(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(o)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var p=n.qHyperCube,d=p.qNoOfLeftDims,f=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=r.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function Bl(e){jl.util=e.data("matrix").util,e.data("q",jl),e.formatter("q-number",vl),e.formatter("q-time",Il)}function Wl(e){var t=function(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(void 0===o[a])return r;o=o[a]}return o}(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var r=t.qIsOneAndOnlyOne;return void 0!==r&&r}function $l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===yi(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function Yl(e){var t=e.brush,r=e.colorField,n=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!r||/qAttrDimInfo/.test(r)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),n&&t.removeKeyAlias(n),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(r))):i&&t.addKeyAlias(n,"qHyperCube/".concat(r))}Bl.qBrushHelper=Ul,Bl.selections=Ul;function Kl(e){var t=e.brush,r=e.getConfig;return{interceptor:function(e){var n=t.brushes(),o=r(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;n.forEach((function(r){var n,o,a;("range"===r.type||null!==(n=e[0])&&void 0!==n&&n.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==r.id&&0!==i.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,r=void 0===t?{}:t,n=e.values,o=void 0===n?[]:n;if(null==o||!o.length)return[];var i=Array.from(new Set(o.map((function(e){return e.key})))),a=[];return i.forEach((function(e){var t=Wl({layout:r,path:e}),n=o.filter((function(t){return t.key===e})),i=t?[n.pop()]:n;a.push.apply(a,Mi(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var n=t.brushes(),o=r().allowSimultaneous;return n.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(n.forEach((function(r){var n=r.id===e[0].key||o.includes(r.id)&&o.includes(e[0].key);"range"!==r.type||n||t.clear([])})),e)}}}var Jl=[],Zl=0,Gl=function(e){var t=Jl.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},Xl=function(){document.addEventListener("keyup",Gl)},Ql=function(){document.removeEventListener("keyup",Gl)},eu=function(e,t){Object.keys(t).forEach((function(r){e.on(r,t[r])}))},tu=function(e,t){Object.keys(t).forEach((function(r){e.removeListener(r,t[r])}))};function ru(e,t,r){if(t&&void 0!==r&&"selectHyperCubeContinuousRange"===e.method){var n=e.params;if(n&&n[1]&&n[1][0]){var o=n[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=r&&(a.qMaxInclEq=!0)}}}function nu(e){var t=e.chart,r=e.document,n=e.selectionInfo,o=e.eventName,i=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=n.event===o,p=r.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!p)return!1;var d=t.component(i);return!!d&&(d.emit(u),"string"==typeof s&&t.brush(s).clear(),d)}function ou(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.eventName,i=void 0===o?"discreteRange":o,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function iu(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.eventName,i=void 0===o?"continuousRange":o,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function au(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.componentName,i=void 0===o?"minor-range-brush":o,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,p=nu({selectionInfo:t,chart:r,document:n,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(p){var d=p.settings.settings,f=d.scale,m=d.brush,h=r.scale(f).data().fields.map((function(e){return e.id()})),g=r.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function su(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function lu(e){var t=e.chart,r=e.selectionInfo,n=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(r&&i.includes(r.event)){var l=r.currentComponent;r.previousComponent!==l&&(n.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function uu(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.selections,i=e.eventName,a=void 0===i?"legendRange":i,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,p=e.brushName;nu({selectionInfo:t,chart:r,document:n,eventName:c?void 0:a,componentName:l,brushName:void 0!==p&&p})&&o.clear()}var cu=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=Ci(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function pu(e){var t,r=e.lasso;null!=r&&null!==(t=r.active)&&void 0!==t&&t.call(r)&&(null==r||r.action(!1))}function du(e){var t,r=e.chart,n=e.selectionInfo,o=e.selectionActions,i=e.actions,a=void 0===i?{}:i,s=e.selections,l=e.selectionEvents;if(!1===o||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,p=o.reset,d=void 0===p?pu:p,f=o.clear,m=!1!==f&&function(e){var t=e.clear,r=void 0===t?cu:t,n=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:n,selectionInfo:o,chart:i,document:document,cleared:e};return r(Di({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ou(Di(Di({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iu(Di(Di({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return au(Di(Di({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return su(Di(Di({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return lu(Di(Di({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return uu(Di(Di({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:n,chart:r}),h=function(e){var t=e.chart,r=e.lasso,n=e.reset,o=e.clear,i=!1,a={deactivated:function(e){n({e:e,lasso:r})},canceled:function(e){n({e:e,lasso:r}),o({e:e,chart:t,document:document})},cleared:function(e){i||(i=!0,o({e:e,chart:t,document:document,cleared:!0}),i=!1)}};return!1===n&&delete a.deactivated,!1===o&&delete a.cleared,!1===n&&!1===o&&delete a.canceled,a}({chart:r,clear:m,reset:d,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];g[r]=function(e,t){return t?function(r){return t({event:r,defaultFunc:e})}:e}(n,l[r])}));var y=function(e){var t=e.selectionEvents,r=e.selections,n=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:r,selectionInfo:n,chart:i,document:a},u=function(e){return Object.assign(n,e||{})},c=function(e){var t=e.event,r=e.components;return function(){return function(e){var t=e.selectionInfo,r=e.clear,n=e.event,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(Di(Di({},void 0===t?{}:t),{},{event:n,components:i.map((function(e){return e.key})).filter(Boolean)})),r()}({event:t,components:r,clear:o,chart:i,selectionInfo:n,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(Di(Di({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:o},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:n,clear:m,chart:r,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];null==s||s.on(r,n)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];null==s||s.removeListener(r,n)}))}}var fu=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function mu(e){var t=e.chart,r=e.actions,n=e.selections,o=e.picassoQ,i=e.config,a=i.allowSimultaneous,s=void 0!==a&&a,l=i.majorScale,u=void 0===l?void 0:l,c=i.selectionActions,p=(c=void 0===c?{}:c).clear,d=c.reset,f=i.selectionEvents,m=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=i.brushEvents,g=void 0===h?{}:h,y=i.brushName,v=void 0===y?"selection":y,b=i.brushMaxListeners,x=void 0===b?20:b,q=i.brushRanges,D=void 0!==q&&q,C=i.interceptors,w=void 0===C?{}:C,M=i.selectionsFn,S=void 0===M?o.selections:M,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var I=!0===D?fu:D;E.configure({ranges:I})}var T={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},A=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.selections,n=t.brush,o=t.majorScale,i=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!r)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++Zl,c=null,p=[],d={};r.on=r.on.bind(r),r.isActive=r.isActive.bind(r),r.addListener=r.addListener.bind(r),r.removeListener=r.removeListener.bind(r);var f=Kl({brush:n,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=f.rangeInterceptor,h=f.interceptor;n.intercept("set-ranges",m),n.intercept("toggle-ranges",m),n.intercept("toggle-values",h),n.intercept("set-values",h),n.intercept("add-values",h),n.on("start",(function(){return r.begin(l)}));var g={activate:function(){},deactivated:function(){return n.end()},cleared:function(){return n.clear()},canceled:function(){return n.end()}};eu(r,g);var y=null==o||null===(e=o.max)||void 0===e?void 0:e.call(o);return null!=i&&i.select?(i.select.on("start",(function(){var e;n.start(),"function"==typeof i.select.getBrushOptions&&(d=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(n,d,c).forEach((function(e){ru(e,i.select.brushSelectionIncludeMax,y),r.select(e)}))}))):n.on("update",(function(){a(n,d,c).forEach((function(e){return r.select(e)}))})),0===Jl.length&&Xl(),Jl.push({key:u,selections:r}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=Jl.indexOf(Jl.filter((function(e){return e.key===u}))[0]);-1!==e&&Jl.splice(e,1),Jl.length||Ql(),tu(r,g)}}}({brush:E,majorScale:u,actions:r,selections:n,picassoQ:o,selectionsFn:S});!function(e){var t=e.brush,r=e.interceptors,n=void 0===r?{}:r;Object.entries(n).forEach((function(e){var r=wi(e,2),n=r[0],o=r[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(n,e)}))}))}({brush:E,interceptors:w});var O=function(e){var t=e.chart,r=e.selectionActions,n=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,r=e.chart,n=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=wi(e,2),i=o[0],a=o[1],s=function(){return a({chart:r,selectionInfo:n})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var r=wi(e,2),n=r[0],o=r[1];t.removeListener(n,o)}))}}({brush:n,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=du({chart:t,selectionInfo:i,selectionActions:r,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var r=!1,n=function(e){r||"Shift"!==e.key||(t.lasso.action(!0),r=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),r=!1)};return document.addEventListener("keydown",n),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",n),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:r,selections:n,selectionInfo:T.selectionInfo,selectionActions:{clear:p,reset:d},selectionEvents:m,brushEvents:g});if(s){var j=!0===s?Mi(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;A.allowSimultaneous(j)}return{unbindEvents:O,state:T,picassoSelections:A,brush:E}}function hu(e){var t=e.chart,r=e.selections,n=e.actions,o=void 0!==n&&n,i=e.config,a=void 0===i?{}:i,s=mu({chart:t,actions:o,selections:r,picassoQ:Bl,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,p=s.brush,d=a.custom,f=void 0===d?{}:d,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?Yl:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==r||null===(t=r.isLocked)||void 0===t?void 0:t.call(r))&&void 0!==e?e:$l(n)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,r,n,o=e.selections,i=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=o&&null!==(t=o.isModal)&&void 0!==t&&t.call(o)&&o.confirm(),i.layout(a);var l=(null!==(r=null==a?void 0:a.qHyperCube)&&void 0!==r?r:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return Wl({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,r=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,n=void 0===r?[]:r;return null!==(t=n.map((function(e,t){var r;return!(e.qLocked||(null===(r=e.qCardinalities)||void 0===r?void 0:r.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(n.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(n=u[0])||void 0===n||!n.qLocked),s}({selections:r,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,r=e.useLegendCube,n=void 0!==r&&r,o=Ci(e,["colorField","useLegendCube"]),i=Di({useLegendCube:n,colorField:t,brush:p,legendAlias:h},o);y(Di(Di({},i),{},{defaultFunc:function(){return Yl(i)}}))},destroy:function(){l(),c.release()},custom:Di({},f)}}var gu={};function yu(){yu.init.call(this)}gu.isObject=function(e){return"object"==typeof e&&null!==e},gu.isNumber=function(e){return"number"==typeof e},gu.isUndefined=function(e){return void 0===e},gu.isFunction=function(e){return"function"==typeof e};var vu=yu;yu.EventEmitter=yu,yu.prototype._events=void 0,yu.prototype._maxListeners=void 0,yu.defaultMaxListeners=10,yu.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},yu.prototype.setMaxListeners=function(e){if(!gu.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},yu.prototype.emit=function(e){var t,r,n,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(r=this._events[e],gu.isUndefined(r))return!1;if(gu.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];r.apply(this,o)}else if(gu.isObject(r)){for(n=arguments.length,o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];for(n=(a=r.slice()).length,i=0;i<n;i++)a[i].apply(this,o)}return!0},yu.prototype.addListener=function(e,t){var r;if(!gu.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,gu.isFunction(t.listener)?t.listener:t),this._events[e]?gu.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,gu.isObject(this._events[e])&&!this._events[e].warned)&&((r=gu.isUndefined(this._maxListeners)?yu.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,gu.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),gu.isFunction(console.trace)&&console.trace()));return this},yu.prototype.on=yu.prototype.addListener,yu.prototype.once=function(e,t){if(!gu.isFunction(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},yu.prototype.removeListener=function(e,t){var r,n,o,i;if(!gu.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,n=-1,r===t||gu.isFunction(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(gu.isObject(r)){for(i=o;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){n=i;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},yu.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],gu.isFunction(r))this.removeListener(e,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},yu.prototype.listeners=function(e){return this._events&&this._events[e]?gu.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},yu.listenerCount=function(e,t){return e._events&&e._events[t]?gu.isFunction(e._events[t])?1:e._events[t].length:0};function bu(){const e={};var t;return t=e,Object.keys(vu.prototype).forEach((e=>{t[e]=vu.prototype[e]})),vu.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function xu({picasso:e}){var t;const r=h(),n=g(),o=y(),[i,a]=v(),s=bu(),l=b(),u=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[c,p]=v(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:r,setIsLassoActionActive:n}){var o,i,a;return{active:r,hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(i=o.qDimensionInfo)||void 0===i||null===(a=i[0])||void 0===a||!a.qIsOneAndOnlyOne),action(e){n("boolean"==typeof e?e:!r)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:l,isInSelections:u,isLassoActionActive:c,setIsLassoActionActive:p}),x((()=>(i&&(i.interactions.lasso.active=()=>c),{...s.lasso})),[i,c,u]),q((()=>{n.style.overflow="hidden";const t=e({renderer:{prio:[r.renderer||"canvas"]}}),i=t.chart({element:n,data:[],settings:{}}),u=hu({chart:i,actions:s,selections:o,config:{selectionActions:!1}});u.setLayout(l),u.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const c=function(e){var t=Di({},e),r={},n={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&r[e]?t[e]=r[e](i,a):t[e]=i,!o&&n[e]&&n[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){r[e]=t},onChanged:function(e,t){n[e]=t}};return i}({legendScrollOffset:0,rotation:0});return c.intercept("rotation",(e=>(c.get("rotation")+e)%(2*Math.PI))),c.onChanged("rotation",(()=>{i.update({partialData:!0})})),s.on("selections-start",(()=>{i.brush("selection").start()})),a({picasso:t,chart:i,selectionService:u,viewState:c,interactions:s}),()=>{u.destroy(),i.destroy(),s.removeAllListeners(),delete s.select,c.intercept("rotation",void 0),c.onChanged("rotation",void 0)}}),[]),i}function qu(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Du({instance:e}){const t=D(),r=C(),n=w(),o=g(),[i,a]=v(),s=M(),l=S();return q((()=>{if(!e)return;o.style.overflow="hidden";const i=function(e){var t,r,n,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,p=e.createConfig,d=void 0===p?Za:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),M={theme:x,key:v,localeInfo:y,layout:w,hc:null==c||null===(r=c.getHyperCube)||void 0===r?void 0:r.call(c),legendProps:null==c||null===(n=c.getLayoutValue)||void 0===n?void 0:n.call(c,"legend"),colorProps:Di(Di({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?$a(w):void 0})},S=Ba({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&S.auto((function(e){return D?D({layout:e,defaultAuto:Ja}):Ja(e)}));var E=!1;return{getColor:function(){return S.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return S.resolveUIColor({index:t,color:r})},getData:function(){return S.data()},getDatumProps:function(e){return S.datumProps(e)},getSnapshotData:function(){return S.getSnapshotData(C)},getSettingsForMeasure:function(e){return S.settingsForMeasure(e)},getSettings:function(){return S.settings()},getLegend:function(e,t){return S.legend(e,t)},getScales:function(){return S.scales()},getPalettes:function(){return S.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return S.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:Di({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:$a}),r=Ya(M,t);return S.config(r),S.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:e.picasso,model:t,app:r,translator:n,config:{auto:!1,key:"fill"}}),u=function(e){var t=e.picassoInstance,r=e.plugins,n=e.pluginArgs,o=void 0===n?{}:n,i={initialized:!1,definitions:[]};return{initialize:function(){return bi(regeneratorRuntime.mark((function e(){var n,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(r.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=bi(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,r.fn(Di({},o));case 4:if("object"===yi(n=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(r.info.componentName,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(r.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(Di({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(n=i.definitions).push.apply(n,Mi(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var r=wi(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(r){var n=Pi(!0,{},r.brush);Pi(!0,r,t),t.brush&&(r.brush=function(e,t){return"object"===yi(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Xa({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Xa({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(n,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e.picasso,plugins:l,pluginArgs:qu(s)});a({colorService:i,pluginService:u})}),[t,r,e,s,n.language()]),i}const Cu={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function wu(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Mu={getImageSize(e,t){let r;function n(){r&&(clearTimeout(r),r=null)}function o(e){const t=e;t.onload=null,t.onerror=null,n()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:r,width:l}=s,u=i[t]*(r>l?1:r/l),c=i[t]*(l>r?1:l/r);!r||!l||0===r&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,r),width:Math.min(c,l)},n()):(e={height:u,width:c},n()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,r=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Su(e,t,r,n){var o,i,a,s,l,u;const{app:c,flags:p}=t,d=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!d)return[];const[f]=d,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<r.length;e++)if(r[e].cId===f.cId){g=e;break}const y=(null===(a=n.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,r){let n=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,r,n,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,r=a?"https://":"http://",n=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),r+n+o+i):""}(r);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(n,o),n=n.replace(/"/g,'\\"'),n=n.replace(/'/g,"\\'"),n=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(n,o));const{height:i,width:a,imageError:s}=await Mu.getImageSize(n,t);return{src:n,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,r,n,o){let i,a=r.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&wu(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:r,width:o,imageError:s}=await Mu.getImageSize(t,n);i={src:t,size:n,height:r,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:r}=await Mu.getImageSize(a,n);i={src:a,size:n,height:e,width:t,imageError:r}}return i}(c,p,f,m,v);if(p.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,r,n){let o;const i=n.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(wu(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:n,width:i,imageError:a}=await Mu.getImageSize(e,r);o={src:e,size:r,height:n,width:i,imageError:a}}}catch(e){}return o}(c,r[g],m,v)}return[]}const Eu={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(Su(e,n,r,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,r;const n=null===(t=e.layout)||void 0===t||null===(r=t.tooltip)||void 0===r?void 0:r.imageComponents;return!!n&&n.length>0}},Iu={async handlePromises({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){let o=t;return o=await Eu.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}),o},checkIfPromisesExist:({customTooltipModel:e})=>Eu.checkIfPromisesExist({customTooltipModel:e})};const Tu=(e,t)=>{var r,n,o;const i=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions,a=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Cu.CHART.CHART_PARENT_TYPE,qId:Cu.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Au=e=>{var t,r,n;const o=null===(t=e.tooltip)||void 0===t||null===(r=t.chart)||void 0===r||null===(n=r.object)||void 0===n?void 0:n.refId;return{qInfo:{qType:Cu.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const Ou={createContainer:({ctx:e,layout:t})=>{var r,n;if(!((null===(r=t.qHyperCube)||void 0===r||null===(n=r.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var r,n,o,i;const a=null!==(r=null===(n=t.tooltip)||void 0===n||null===(o=n.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==r?r:"medium",s=Cu.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Cu.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:r,dimIndex:n,customTooltipModel:o,rtl:i})=>{var a,s,l;const u=o,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ou.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:r}){const n=r,o=Cu.CHART.STATE,i=t.qStateName;n.miniChartToken.alternateState||(n.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),n.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:r}){var n;const o=r;null!==(n=o.miniChartToken.sessionObj)&&void 0!==n&&n.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=Cu.CHART.STATE,a=Tu(t,i),s=await e.createSessionObject(a),l=Au(t);if(s.id!==Cu.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var p,d,f,m;const e=r.length>0&&void 0!==(null===(p=r[0].data)||void 0===p?void 0:p.value)?[null===(d=r[0].data)||void 0===d?void 0:d.value]:[],a=void 0!==n?n:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===n&&r.length>0){var h,g;const e=null!==(h=r[0].data.selectionOuterDimension)&&void 0!==h?h:r[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),r=t[t.length-1],n=void 0!==e.value?[e.value]:[];n.length>0&&void 0!==r&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(r),n,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Cu.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await o.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.id,type:null===(m=u.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await Ou.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const r=t;null!=r&&r.embed&&(Ou.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Cu.CHART.CHART_OBJECT_ID),r.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const r=t,n=Cu.CHART.STATE;await e.removeSessionAlternateState(n),r.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,r;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(r=t.vis)||void 0===r?void 0:r.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function ju(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ku(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:r,IMAGES:n}=Cu.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[r]=!0,o[n]=!0,o}function Lu(e){const t=ku();return e.filter((e=>t[e.id]))}const Nu={getNodes(e,t){const r=function(e,t){let r=0,n=0;e.center?(r+=e.center.x,n+=e.center.y):(r+=e.clientX,n+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:r-o.left,cy:n-o.top}}(e,t);return t.shapesAt({x:r.cx,y:r.cy})},getDataNodes(e,t){let r,n=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const u=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],n.push(e)}}else{r||(r=[],Object.keys(o).forEach((t=>{r=r.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=r.filter((e=>{var t,r;const n=null!==(t=null!==(r=e.data.stack)&&void 0!==r?r:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return n&&n.value===u.value&&n.label===u.label}));t.length>0&&(n=n.concat(t[0]))}})),n},displayTooltip(e,t,{nodes:r,opts:n={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Nu.getAttrExprData(a);i.length||r.length?Iu.handlePromises({customTooltipModel:o,nodes:Nu.getDataNodes(s,i.length>0?i:r),attrExps:l,opts:n}).then((()=>{t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var s,l;null!==(s=n.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=o&&null!==(l=o.miniChartToken)&&void 0!==l&&l.alternateState&&Ou.hide({app:n.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Iu.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var r;const n=t,o=null!==(r=e.qHyperCubeDef)&&void 0!==r&&r.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[o]||(n[o]=[]),n[o]},getAttrExprData(e){var t;let r=[],n="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;r=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],n=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:r,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){var r,n;if(!(null===(r=e.qLayoutExclude)||void 0===r||null===(n=r.quarantine)||void 0===n?void 0:n[Cu.CUSTOM.QUARANTINE])){!function(e,t){const r=t;let n=r.qLayoutExclude;n||(r.qLayoutExclude={quarantine:{}},n=r.qLayoutExclude),n.quarantine||(n.quarantine={}),n.quarantine[Cu.CUSTOM.QUARANTINE]=[],e.forEach((e=>{n.quarantine[Cu.CUSTOM.QUARANTINE].push(e)})),r.qLayoutExclude=n}(Lu(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,r;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Cu.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Cu.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const r=ju(e);if(!r)return;const n=void 0!==t?t:r.length-1;if(!r[n])return;const o=this.getAttrExps(e,r[n]);if(0===Lu(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],r=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[n].qAttributeExpressions=r:s.qHyperCube.qDimensionInfo[n].qAttrExprInfo=r}},moveCustomTooltipAttrs(e,t={},r){let n=[];const o=ju(e)||[];[...o,t].forEach((e=>{const t=Lu(e.qAttributeExpressions||[]);t.length>0&&(n=t)}));const i=ku(),a=o.map((e=>{const t=e,r=e.qAttributeExpressions||[];return t.qAttributeExpressions=r.filter((e=>!i[e.id])),t})),s=void 0!==r?r:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(n));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:ue.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const r=ue.detectTextDirection(e.src),n=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){n.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const r=e.imageError?`${e.src}?${Math.random()}`:e.src;n.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:r,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]}};function Pu(e,t,r,n){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[r])||void 0===i||null===(a=i[n])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[n]?e.qSubNodes[n].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let r;switch(e.id){case Cu.CUSTOM.EXPRESSION:r="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Cu.CUSTOM.TITLE:case Cu.CUSTOM.DESCRIPTION:case Cu.CUSTOM.IMAGES:r=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:r="NaN"}return r}(e,o);l.push({source:{key:"qHyperCube",field:`${r}/${n}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Ru={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const r=t-1,n="qDimensionInfo";return{field:`${n}/${r}`,value:t=>Pu(t,e,n,r)}}};const Fu={getCustomAttrExps(e,t,r){var n,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(n=t.data)||void 0===n||null===(o=n.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,r,n){const o={[Cu.CUSTOM.TITLE]:!0,[Cu.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Nu.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===Cu.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:r("qHyperCube").field(`${a}/${i}`).formatter()(s.value);n.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&n.customTooltipInfoAttrExpsArr.push({...e.id===Cu.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),n}(r,a.map((t=>ce.getMeasure(e,t))),e,i)}};function Vu({nodes:e,layout:t,dataset:r}){return function(e,t,r){const n=[];return e.forEach((e=>{n.push(Fu.getCustomAttrExps(r,e,t))})),n}(e,t,r).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function _u(e){const t=Cu.CUSTOM.EXPRESSION,{qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}}function Hu(e){var t;const r=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return r[r.length-1].qAttributeExpressions||[]}var zu={attrExpr:{migrateProperties(e){var t,r,n,o;const i=K(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[];let s=Hu(i);return s=function(e,t){return t.concat(e.map((e=>_u(e))))}(a,s),function(e,t){var r;const n=null===(r=t.qHyperCubeDef)||void 0===r?void 0:r.qDimensions;n[n.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,r,n,o;const i=(null===(t=e.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,r){let n=e.length;const o=[];return t.forEach((e=>{const t=_u(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${r}/qAttributeExpressions/${n}`,qOp:"add",qValue:i}),n++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Hu(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((r=>{var n,o,i,a,s;const l=(null===(n=t.qHyperCube)||void 0===n?void 0:n.qDimensionInfo)||[],u=(null===(o=t.tooltip)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const n=this.migrateProperties(t);e.setProperties(n).then((()=>{e.app.clearUndoBuffer(),r(!0)}))}else{const n=this.getPatches(t);e.applyPatches(n,!0).then((()=>{e.app.clearUndoBuffer(),r(!0)}))}})),r(!1)}))}}};function Uu({scaleKey:e,legend:t,onEdited:r}){const{layout:n}=t,{dock:o}=n||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:r?{bubbleEnd(){r()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const Bu={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Wu=({layout:e},t,r)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{let n=.8,o=0;const i=r?r.style.innerRadius:.55;e.donut.showAsDonut&&(n=.8-i,o=i);return t.scale(Math.max(0,t.datum.radius.value))*n+o}}:.8,$u=({layout:e},t,r)=>{if(!e.donut.showAsDonut)return 0;const n=r?r.style.innerRadius:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-n,r=n;return e.scale(Math.min(0,e.datum.radius.value))*t+r}}:n},Yu=({layout:e},t)=>{const r=t.colorService.getDatumProps(),n=r[Object.keys(r)[0]],o=n&&n.field?n.field:void 0,i="qDimensionInfo/0"===o,a=o?t.ds.field(o).raw():null,s=a&&(a.label||a.title||a.qFallbackTitle)||"",l=t.encodings.slice.outerRadius,{formatter:u}=t.chart,c=re(e,"qHyperCube.qDimensionInfo",[]).length;function p(e,r){const n=t.ds.field(e).raw();return{field:e,label:!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType)?e=>u(r)(e.qNum):e=>e.qText}}const d=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...r,num:p(t.encodings.slice.arc,"arc"),fillTooltip:o?{field:o,label:s,value:e=>i?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==c?Ru.getNode(e,{dimensionCount:c}):void 0,radius:l?p(l,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:$u({layout:e},t,d),fill:t.colorService.getColor(),strokeWidth:d?Bu.STROKE.WIDTH[d.style.strokeWidth.toUpperCase()]:Bu.STROKE.WIDTH.NONE,stroke:d?d.style.strokeColor.color:Bu.STROKE.COLOR,outerRadius:Wu({layout:e},t,d),cornerRadius:d?d.style.cornerRadius:0}}}};function Ku({layout:e},t,r){const n=(e.components||[]).filter((e=>"slices"===e.key))[0],o=n?n.style.innerRadius:.55,i=t.encodings.slice.outerRadius;return!(!e.donut.showAsDonut||!i)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:R(r.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-o,r=o;return e.scale(0)*t+r}}}}}}function Ju({layout:e},t,r){return!(e.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:R(r.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}const{getThemeStyle:Zu}=F;function Gu(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Xu(e){return e.node.data.num.label}function Qu(e){return e.node.data.radius.label}function ec(e,t,r){if(e.dataPoint.auto)return r?Xu:Gu;if("share"===e.dataPoint.labelMode)return Gu;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Qu:Xu}return null}function tc({data:e}){return e?e.label:""}function rc(e,t,r){const n=parseInt(Zu(e,"object.pieChart",t,r),10);if(!isNaN(n))return n}function nc(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function oc({node:e,data:t}){return K({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function ic(e,t,r){const n=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Zu(r.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:rc(r.theme,"label.name","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.name","fontFamily"),label:tc,linkData:({node:e,data:t})=>K({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(ec(e,t,!1)){const o=function(e,t,r){return{label:ec(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&nc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&nc(e),padding:4}],theme:r.theme,themeId:"object.pieChart"}}(e,t,r),i=fe(K(t,o),r.theme);i.linkData=oc,n.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:n}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function ac({layout:e,context:t},r){return!1!==e.dataPoint.show&&(1===r.dataRowCount?function(e,t,r){const n=ec(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(r.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:rc(r.theme,"label.name","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.name","fontFamily"),label:tc},{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:rc(r.theme,"label.value","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.value","fontFamily"),label:n}]}}}]}}}(e,r,t):ic(e,r,t))}function sc(e){return re(e,"customTooltipModel.useCustomTooltip",!1)}function lc(e,t){return sc(t)&&re(e,"tooltip.hideBasic",0)}function uc(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})}function cc(e){return[{content:e.title,style:{"font-weight":"bold"},colspan:2},{}]}function pc(e,t,r){const n=[uc(e,t)];return n.push(t.color.value),[{content:t.color.label},{content:n,style:{"text-align":r?"left":"right"}}]}function dc(e,t,r,n=!1,o=!1){const i=[e.value];return n&&i.unshift(uc(t,r)),[{content:e.label+":"},{content:i,style:{"text-align":o?"left":"right"}}]}function fc(e,t,r,n){return lc(r,n)||void 0===e.share.value?[]:[{content:e.share.label},{content:e.share.value,style:{"text-align":t?"left":"right"}}]}function mc(e,t={},r={}){let n=[];const o=ie({rtl:r.rtl});return K(!0,o,{scale:"fill",settings:{filter:e=>e.filter((e=>e.data&&("path"===e.type&&("slices"===e.key||"negative-indicators"===e.key)||"text"===e.type&&e.data._showTooltip&&"pie-labels"===e.key))),extract:o=>{var i,a;n=[o.node];const{layout:s}=e,l=function(e,t,r){const n=e.node,o=e.node.data,i=e.resources.formatter,a=e.resources.dataset,s={};if("color"!==t.coloring.type&&o.fillTooltip){const e=i("fill"),r="measure"===t.coloring.fieldType;s.value=r&&e?e(o.fillTooltip.value):o.fillTooltip.value,s.label=o.fillTooltip.label+":"}let l;function u(e){return{label:a(e.source.key).field(e.source.field).title(),value:e.label,field:e.source.field}}t.coloring.label&&(s.label=t.coloring.label+":"),s.fill=void 0===o._fillColor?n.attrs.fill:o._fillColor,n&&n.desc&&void 0!==n.desc.share?l=n.desc.share:n&&o&&void 0!==o._share&&(l=o._share);const c=[u(o.num)];t.encodings.slice.outerRadius&&c.push(u(o.radius));const p={title:o.label,color:s,share:{label:(t.translator&&t.translator.get("properties.dataPoints.labelmode.share")||"Share")+":",value:void 0!==l?i("share")(l):void 0},measures:c};if(sc(t)){var d,f,m,h;const o=Vu({dataset:a,nodes:[n],layout:r});var g,y;if(p.customTitle=o.customTooltipInfoAttrExpsArr.filter((e=>e.id===Cu.CUSTOM.TITLE)),p.customDescription=o.customTooltipInfoAttrExpsArr.filter((e=>e.id===Cu.CUSTOM.DESCRIPTION)),p.customMeasures=o.customTooltipAttrExpsArr,t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(d=r.tooltip)&&void 0!==d&&null!==(f=d.chart)&&void 0!==f&&null!==(m=f.object)&&void 0!==m&&m.refId&&t.customTooltipModel.embed&&"function"==typeof(null===(h=t.customTooltipModel.model)||void 0===h?void 0:h.getEffectiveProperties))if(null!==(g=(y=t.app).isInModalSelection)&&void 0!==g&&g.call(y)){Ou.destroyVisualization({customTooltipModel:t.customTooltipModel});const e=t.translator.get("properties.tooltip.notselectedmessage");p.customLimitation=e}else{const t=Ou.createContainer({ctx:e,layout:r});p.customChart=t}n.data.customTooltipImages&&(p.customImages=n.data.customTooltipImages)}return p}(o,t,s);let u=[];const c=lc(s,t)?[]:l.measures,p=sc(t)&&(d=l.customTitle[0],f=l.customDescription[0],m=c,h=l.customMeasures,0===m.length&&0===h.length&&(""!==d&&void 0!==d||""!==f&&void 0!==f))?[]:cc(l);var d,f,m,h;if(sc(t)&&l.customTitle.length>0&&u.push(cc(l.customTitle[0])),sc(t)&&l.customDescription.length>0&&u.push(function(e){return[{content:e.value,colspan:2},{}]}(l.customDescription[0])),u=function(e,t,r){return lc(r,e)||t.measures.some((t=>t.field===e.coloring.field))||void 0===t.color.value}(t,l,s)?u.concat([p,...c.map((e=>dc(e,o,l,e.field===t.coloring.field,r.rtl))),fc(l,r.rtl,s,t)]):u.concat([p,pc(o,l,r.rtl),...c.map((e=>dc(e,o,l,!1,r.rtl))),fc(l,r.rtl,s,t)]),sc(t)&&l.customMeasures.length>0&&u.push(...l.customMeasures.map((e=>dc(e,o,l,e.field===t.coloring.field,r.rtl)))),null!==(i=t.flags)&&void 0!==i&&i.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customChart&&u.push(l.customChart),null!==(a=t.flags)&&void 0!==a&&a.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customLimitation&&u.push(Nu.getFooterRow(l.customLimitation,r)),l.customImages){const e=l.customImages.map((e=>Nu.getImageRow(e,o)));u.push(...e)}return u},placement:({nodes:e})=>"slices"===e[0].key?{type:"slice"}:{type:"bounds"},direction:r.rtl?"rtl":"ltr",afterShow:()=>{var e,o,i;const{app:a,properties:s,customTooltipModel:l}=t;null!==(e=t.flags)&&void 0!==e&&e.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(o=(i=t.app).isInModalSelection)||void 0===o||!o.call(i))&&l.useCustomTooltip&&l.embed&&Ou.show({app:a,properties:s,selectedNodes:n,customTooltipModel:l,rtl:r.rtl})}},style:{content:{fontFamily:r.theme.getStyle("object.pieChart","","fontFamily")}}})}const hc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"legendRange",enable(t,r){if(this.started||!r)return!0;if(e.constraints.select||e.constraints.active)return!1;const n=(this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(r))&&!e.isLocked([this.chart.component("slices")]);return n||this.chart.component("legendRangeBrush").emit("rangeClear"),n}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function gc(e,t){const r=t.element.getBoundingClientRect();let n,o;return e.center?(({x:n}=e.center),({y:o}=e.center)):(n=e.clientX,o=e.clientY),{x:n-r.left,y:o-r.top}}function yc(e,t){const r=t.component("slices");if(!r)return!1;const{x:n,y:o}=gc(e,t),i=r.rect.x+r.rect.margin.left+r.rect.width/2,a=r.rect.y+r.rect.margin.top+r.rect.height/2,s=Math.min(r.rect.width,r.rect.height)/2*.8;return(i-n)**2+(a-o)**2<=s**2}const vc=(e,t,{requireFailure:r,recognizeWith:n}={})=>{const o=e.customTooltipModel.utils,i=e.debouncer(o.displayTooltip,o.DEBOUNCE_THRESHOLD);return{type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"tap",interval:10,pointers:1,enable(t,r){return!r||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(r){r.preventDefault();const{target:n}=r.srcEvent;if(n&&("INPUT"===n.nodeName||n.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",r);if(n&&n.hasAttribute("data-action")&&n.hasAttribute("data-component-key"))return void this.chart.component(n.getAttribute("data-component-key")).emit(n.getAttribute("data-action"));if(n&&n.children&&n.children[0]&&"legend-cat"===n.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let a=gc(r,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(a={cx:a.x,cy:a.y,r:5});const s=this.chart.shapesAt(a,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"}),l=this.chart.component("tooltip"),u="mouse"!==r.pointerType&&l&&l.show;if(s.length){if(this.chart.brushFromShapes(s,{components:[{key:s[0].key,action:r.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect(),u&&this.components.some((e=>"slices"===e.key))){const{customTooltipModel:t}=e;if(t.useCustomTooltip&&o.checkIfPromisesExist({customTooltipModel:t})){const n=o.getNodes(r,this.chart);i(r,l,{nodes:n,opts:e,customTooltipModel:t})}else l.emit("show",r,{nodes:s})}}else u&&l.emit("hide")}}}},bc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"lasso",enable(t,r){if(this.isStarted||!r)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return!e.isLocked(n)&&n.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),xc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Tap",requireFailure:t,recognizeWith:r,options:{event:"areatap",pointers:2,enable(t,r){if(this.started||!r)return!0;if(e.constraints.active||e.constraints.select)return!1;const n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return n.some((e=>"slices"===e.key))&&!e.isLocked(n)}},events:{areatap(t){const r=this.chart.component("area");r&&!this.started&&(e.interactions.emit("selections-start"),r.emit("areaStart",t.pointers[0]),r.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{r.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function qc({chart:e},t,r){const n=e.component("tooltip");n&&n.show&&(n.emit("hide"),r.customTooltipModel.useCustomTooltip&&t&&t({},n,{nodes:[],opts:r,customTooltipModel:r.customTooltipModel,hide:!0}))}function Dc(e){const t=e.customTooltipModel.utils,r=e.debouncer(t.displayTooltip,t.DEBOUNCE_THRESHOLD);return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&yc(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const r=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(r)}(t,e))}n&&t.preventDefault(),qc(this,r,e)},mousemove(n){if(!e.constraints.passive){const o=this.chart.componentsFromPoint({x:n.clientX,y:n.clientY}),i=this.chart.component("tooltip");if(i&&i.show&&o.some((e=>"slices"===e.key))){const{customTooltipModel:o}=e;if(o.useCustomTooltip&&t.checkIfPromisesExist({customTooltipModel:o})){const a=t.getNodes(n,this.chart);r(n,i,{nodes:a,opts:e,customTooltipModel:o})}else i.emit("show",n)}else i&&i.show&&i.emit("hide")}},mouseup(t){2===t.button&&qc(this,r,e)},mouseleave(){qc(this,r,e)}}}}const Cc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"rotate",pointers:1,threshold:10,enable(t,r){return!(!this.started&&r)||!e.constraints.active&&!e.interactions.lasso.active()&&yc(r,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,r=this.chart.element.getBoundingClientRect();this.pieCenter={x:r.left+t.x+t.width/2,y:r.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const r=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",r-this.prevAngle),this.prevAngle=r},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),wc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"legendPan",pointers:1,threshold:10,enable(t,r){return!(!this.isStarted&&r)||!e.constraints.active&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),Mc=(e,t)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[Cc(e,{}),vc(e,t,{})]:[hc(e,{}),xc(e,{}),Cc(e,{}),bc(e,{}),wc(e,{}),vc(e,t,{})]});function Sc(e,t,r){const n=e.getIsSingleSelect(0),{constraints:o}=r;return o.active&&o.passive?[]:[Mc(t,n),Dc(t)]}function Ec({settings:e},t){const r={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(r.outerRadius={data:{field:t.encodings.slice.outerRadius}}),r}function Ic({layout:e},t,r){if(!e.dimensionTitle)return!1;const n=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:n&&n.qHyperCubeDef,isDimension:!0,disabled:()=>r.constraints.active||!r.model,model:t.model,app:t.app,translator:t.translator,rtl:r.rtl,selections:t.selections},style:{fontFamily:r.theme.getStyle("object","axis.title","fontFamily"),fontSize:r.theme.getStyle("object","axis.title","fontSize"),color:r.theme.getStyle("object","axis.title","color")}}}function Tc({layout:e},t,r){return function(e,t,r){if(!e)return!1;const{translator:n}=t,{rtl:o}=r;return{key:"disclaimer",type:"disclaimer",layout:{dock:G[e].alignment},settings:{label:n.get("Object.Disclaimer."+e),rtl:o}}}(function(e,t){const r={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(r.props.radius={field:t.encodings.slice.outerRadius});let n=t.ds.extract(r);if(0===n.length)return"NoDataExist";const o=re(e,"qHyperCube.qSize.qcy");if(re(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(n=t.encodings.slice.outerRadius?n.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):n.filter((e=>"NaN"!==e.num.value)),0===n.length)return"OnlyNanData";const i=n;return n=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?n.filter((e=>e.num.value>0&&e.radius.value>0)):n.filter((e=>e.num.value>0)),0===n.length?"OnlyNegativeOrZeroValues":i.length!==n.length&&"NegativeOrZeroValues"}(e,t),t,r)}function Ac({layout:e,context:t,selectionService:r},n={}){const o=function({layout:e}={},t={}){const r={};return K(r,t.colorService.getScales()),t.encodings.slice.outerRadius&&K(r,function({layout:e},t){const r={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(r.radius.min=0),r}({layout:e},t)),r}({layout:e},n),i={scales:o};let a=[];const s=Tc({layout:e},n,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=n.colorService.getLegend({eventName:"legend",key:"legend",viewState:n.viewState,chart:n.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[Yu({layout:e,settings:i},n),Ku({layout:e},n,t),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Ju({layout:e},n,t),Ic({layout:e},n,t),...u.components,Uu({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:n.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},ac({layout:{dataPoint:K({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},n),mc({layout:e},{...n,coloring:n.colorService.getSettings()},t),(!1!==e.showDisclaimer||!n.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:Sc(r,n,t),scales:o,components:n.pluginService.extendComponents(a),palettes:n.colorService.getPalettes(),formatters:Ec({settings:i},n),strategy:te(0,n)}}function Oc({instance:e,services:t,picasso:n,flags:o}){const i=h(),a=D(),s=C(),l=w(),u=E(),c=I(),p=M(),d=y(),f=T(),{qLocaleInfo:m}=A(),[g]=O((()=>{if(!t)return Promise.resolve();zu.attrExpr.updateProperties(a,p);return Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:c,legendProps:p.legend,layout:p,localeInfo:m,hc:p.qHyperCube,colorProps:{...p.color,useBaseColors:e(p)}})}),a&&!p.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])}),[t]);q((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(p)}),[p]),q((()=>{if(!e||!g)return;const{chart:h,viewState:y,interactions:v}=e,{colorService:b,pluginService:x}=t,q=i.viewState||{};p.snapshotData||(y.preventSet("legendScrollOffset",q.legendScrollOffset||0),y.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(p,y);const D=n.data("q")({key:"qHyperCube",data:p.qHyperCube,config:{localeInfo:m}}),C=[{type:"q",key:"qHyperCube",data:p.qHyperCube,config:{localeInfo:m}},...b.getData()],w={slice:{arc:"qMeasureInfo/0"}};p.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const M=function({layout:e,app:t,picasso:r,model:n,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:r,model:n,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Nu,miniChartToken:{},embed:s}}({layout:p,app:s,model:a,picasso:n,chart:h,translator:l,localeInfo:m,embed:u}),S=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(n.data("q")({data:p.qHyperCube,config:{localeInfo:m}}),w),E=d?()=>{const e=h.brush("selection");r.selections(e,{},p).forEach((e=>{d.select(e)}))}:()=>{},I=p.snapshotData&&!i.freeResize?{width:(p.snapshotData.content.size||p.snapshotData.object.size).w,height:(p.snapshotData.content.size||p.snapshotData.object.size).h}:void 0,T=t=>e.selectionService.getIsSelectionLocked(t),A=()=>Ac({layout:p,context:{rtl:"rtl"===i.direction,theme:c,translator:l,constraints:f,model:a},selectionService:e.selectionService},{picasso:n,ds:D,model:a,app:s,chart:h,onSelect:E,isLocked:T,interactions:v,constraints:f,translator:l,viewState:y,dataRowCount:S,encodings:w,colorService:b,pluginService:x,customTooltipModel:M,debouncer:Ga,properties:g[1],logicalSize:I,flags:o});e.generateSettings=A,h.update({data:C,settings:A()}),i.effect&&p.effectProperties?i.effect.update(p,h,{encodings:w}):p.effectPath||h.brush("highlight").end()}),[e,g,i.direction,i.effectProperties,f,c.name(),l.language()])}function jc({instance:e,services:t}){const r=g(),n=M();k((o=>{if(!(n.snapshotData&&n.snapshotData.content&&n.snapshotData.content.chartData)&&(function(e,t){const r=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:r.width,h:r.height}}(o,r),e&&t))return function({layout:e,chart:t,viewState:r,colorService:n}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:ne(t,"legend-cat"),rotation:r.get("rotation")},n.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),L((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:ne(e.chart,"legend-cat")})})),[e])}var kc={exports:{}};window;var Lc=V(kc.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s="./index.js")}({"../node_modules/extend/index.js":
10
10
  /*!***************************************!*\
11
11
  !*** ../node_modules/extend/index.js ***!
12
12
  \***************************************/
13
13
  /*! no static exports found */
14
- function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},u=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,p=arguments[0],f=1,d=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},f=2),(null==p||"object"!==F(p)&&"function"!=typeof p)&&(p={});f<d;++f)if(null!=(t=arguments[f]))for(r in t)n=c(p,r),p!==(i=c(t,r))&&(m&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&u(n)?n:{},l(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&l(p,{name:r,newValue:i}));return p}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
14
+ function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(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,o,i,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!==(o=c(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:r,newValue:o}));return p}},"../node_modules/qlik-modifiers/dist/qlik-modifiers.js":
15
15
  /*!*************************************************************!*\
16
16
  !*** ../node_modules/qlik-modifiers/dist/qlik-modifiers.js ***!
17
17
  \*************************************************************/
18
18
  /*! no static exports found */
19
- function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==F(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},u=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,p=arguments[0],f=1,d=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},f=2),(null==p||"object"!=F(p)&&"function"!=typeof p)&&(p={});f<d;++f)if(null!=(t=arguments[f]))for(r in t)n=c(p,r),p!==(i=c(t,r))&&(m&&i&&(u(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&u(n)?n:{},l(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&l(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o={setValue:function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},getValue:function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function u(e){return a+e+s}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function 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 d(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function h(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function g(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,u=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=v(l(n[0],i),d(0));return"".concat(a,"({1<").concat(c,">}").concat(u,")")}if(n&&2===n.length){var p=l(n[0],i),f=l(n[1],i),m=d(0),h=d(1),g=v(p,m),y=v(f,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function y(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,r=e.layout;return o.getValue(t,"qHyperCubeDef.qDimensions",o.getValue(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:c,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=g({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=d(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var p=d(0),m=d(1);return"If(Count(".concat(p,") * Count(").concat(m,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!c(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:h,getAboveComp:function(e,t,r,n){return m(e,t)+r+h(n)},getFunctionPrefix:y,getFunctionSuffix:b,getRangeComp:function(e,t){return y(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:g,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=d(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(a);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+a.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:l,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=x({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(a),r=e.indexOf(s);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:d,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function C(e){return(C="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var w=i.a.bind(null,!0),S={},M=Array.isArray;function E(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function O(e){return void 0===e}function I(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]=O(e[r||t])?o:e[t],e=e[r||t]}})),e}function A(e,t){var r=!0;if(E(e)&&E(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){A(e[n],t[n])||(r=!1)})),r);if(M(e)&&M(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!A(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?w({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);A(o,a)||I(t,i)||(O(a)?n.push({op:"add",path:s,value:o}):E(o)&&E(a)?n=n.concat(S.generate(a,o,s)):M(o)&&M(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&O(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(A(t,i))return n;if(!O(t[0])&&O(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 u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(n.push({op:"move",path:"".concat(r,"/").concat(u),from:"".concat(r,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){O(t[i])&&!I(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(M(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(M(o)&&M(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,D(u))}else if(E(o)&&E(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!I(r,e)&&delete r[e]})),w(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var l=T(e,t.from);M(n)?n.splice(+i,0,l.splice(+a,1)[0]):(n[i]=l[a],delete l[a])}else"remove"===t.op&&(M(n)?n.splice(+i,1):delete n[i])}))},S.clone=function(e){return w({},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)):w(e,t)};var j=S,k={saveSoftProperties:function(e,t,r){if(!e)return Promise.resolve();var n=j.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 P(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===L)return r[n]}function N(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===L)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var R={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,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=q.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=q.getNumStepComp(r,u),f=q.getAboveComp(r,u,c,p),d=q.getRangeComp("RangeSum",f);if(q.needDimension({modifier:r,properties:n,layout:i})){var m=q.getDimComp(l,1),h=q.getDimComp(l,0),v=q.getAggrComp(d,m,h);d=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:l,dimensionAndFieldList:s,valueComp:v}):v}return d},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(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(N(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(N(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(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=P(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=P(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(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=P(t,e);return o&&!o.disabled}}}},V="movingAverage";function H(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function z(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var U={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,a=e.layout,s=e.numDimensions,u=e.dimensionAndFieldList;if(!n)return r;var l=s;void 0===l&&(l=q.getNumDimensions({properties:i,layout:a}));var c=o.getValue(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,f=q.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:p}),d=q.getNumStepComp(n,l),m=q.getAboveComp(n,l,f,d);if(n.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),v=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,l);t="".concat(h," / ").concat(v)}var g=t;if(q.needDimension({modifier:n,properties:i,layout:a})){var y=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(g,y,b);g=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:u,funcComp:"Only",valueComp:x}):x}return g},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,U)},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=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(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(V))return!1;var o=H(t,e);return o&&!o.disabled}}}},W="difference";function Y(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function K(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},J={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,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=q.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=q.getAboveComp(r,u,c),f="".concat(c," - ").concat(p);if(q.needDimension({modifier:r,properties:n,layout:i})){var d=q.getDimComp(l,1),m=q.getDimComp(l,0),h=q.getAggrComp(f,d,m);f=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:l,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return f},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(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(W))return!1;var o=Y(t,e);return o&&!o.disabled}}}},Z={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},G="normalization";function X(e,t){var r=o.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===G)return r[n]}function Q(e,t){var r=function(e,t){var r=o.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===G)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:Z.DIMENSION.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:Z.DIMENSION.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:Z.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,r){if(e<2){var n=ee(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=ee(t,1);t.splice(n,1)}return t}(X(e,n).selectionScope,o)}function re(e,t,r){var n=[{value:Z.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:Z.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:Z.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=ee(t,0);t.splice(n,1)}return t}(X(e,r).dimensionalScope,n)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:Z.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:Z.SELECTION.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),">"):""}function ue(e,t,r,n,i,o,a){var s=ie(t),u=oe(t,r,n),l=""===s&&""===u?"":s||u,c=ae(i,o),p=se(i,o,a),f=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(p," Aggr(").concat(l," ").concat(e,", ").concat(f,"))")}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,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var u=a;void 0===u&&(u=q.getNumDimensions({properties:n,layout:i}));var l=o.getValue(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:l,dimensionAndFieldList:s}),p=r.selectionScope,f=r.dimensionalScope;return ue(c,p,r.field,r.value,f,u,r.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Z.SELECTION.DISREGARD_SELECTION,options:function(r){return re(r,t,e)}},field:{refFn:function(t){return"".concat(Q(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return X(t,e).selectionScope===Z.SELECTION.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return X(t,e).selectionScope===Z.SELECTION.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Z.DIMENSION.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return te(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return(X(t,e).dimensionalScope||0)===Z.DIMENSION.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(G))return!1;var o=X(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se};function ce(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},r=o.getValue(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o.getValue(e,r)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(n[t]){var i=u(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,r=e.dimensionLibraryIds;i={},t.forEach((function(e){i[e]=!0})),a={},r.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}var pe={getExpression:function(e){return o.getValue(e,"qDef.base.qDef")||o.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return o.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return o.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return o.getValue(e,"qDef.base.qLibraryId")||o.getValue(e,"qLibraryId")},getLabelRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},fe={initBase:function(e,t){(t||fe.isValid(e))&&(o.setValue(e,"qDef.base.qDef",o.getValue(e,"qDef.qDef")),o.setValue(e,"qDef.base.qLibraryId",o.getValue(e,"qLibraryId")),o.setValue(e,"qDef.base.qLabel",o.getValue(e,"qDef.qLabel")),o.setValue(e,"qDef.base.qLabelExpression",o.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){fe.isValid(e)&&(o.setValue(e,"qDef.qDef",o.getValue(e,"qDef.base.qDef")),o.setValue(e,"qLibraryId",o.getValue(e,"qDef.base.qLibraryId")),o.setValue(e,"qDef.qLabel",o.getValue(e,"qDef.base.qLabel")),o.setValue(e,"qDef.qLabelExpression",o.getValue(e,"qDef.base.qLabelExpression")),o.getValue(e,"qDef.qAggrFunc")&&o.getValue(e,"qDef.base.qAggrFunc")&&o.setValue(e,"qDef.qAggrFunc",o.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=o.getValue(e,"qDef.base.qDef"),r=o.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},de=fe;function me(e){return(me="function"==typeof Symbol&&"symbol"==F(Symbol.iterator)?function(e){return F(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":F(e)})(e)}var he={accumulation:_,movingAverage:B,difference:J,normalization:le},ve=(t.default={modifiers:he,apply:ge,applyModifiers:ye,cleanUpMeasure:be,destroy:function(e){e&&ve[e.id]&&ve[e.id].masterItemSubscriber&&(ve[e.id].masterItemSubscriber&&ve[e.id].masterItemSubscriber.unsubscribe(),delete ve[e.id])},hasActiveModifiers:xe,getActiveModifier:qe,initBase:de.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return he[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return he[e]&&he[e].isApplicable({properties:r,layout:n})}))},measureBase:pe,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=we(e);Ae({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Ne({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:De},{});function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,a=void 0!==n&&n,s=e.masterItem;ve[t.id]=ve[t.id]||{isFirstTime:!0};var u=ve[t.id].isFirstTime;if(ve[t.id].isFirstTime=!1,r&&"object"===me(r))return ye({model:t,properties:r});var l=t?t.layout:void 0,c=o.getValue(l,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var p=o.getValue(l,"qHyperCube.qMeasureInfo"),f=ve[t.id].lastReloadTime;if(ve[t.id].lastReloadTime=o.getValue(t,"app.layout.qLastReloadTime"),xe({measures:p,layout:l})){var d=function(e){var t=e.measures,r=e.layout,n=e.model,i=e.lastReloadTime;return o.getValue(n,"app.layout.qLastReloadTime")!==i&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:l,model:t,lastReloadTime:f});return d||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 Ae({modifiers:we(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:l,masterItem:s,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Me(r);var n=Re(r);return je({model:t}).then((function(i){return ke({libraryIds:n,model:t}).then((function(n){return d&&function(e){var t=e.properties;Ce(t).forEach((function(e){return function(e){var t=e.measure,r=e.properties;if(Te({measure:t,properties:r})){var n=0,i=t.qDef.modifiers;Array.isArray(i)&&i.forEach((function(e){if("object"===me(e)&&!e.disabled){if(n++,"object"!==me(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=he[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Oe(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),ye({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===me(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Re(r);return Fe({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return Ce(r).forEach((function(e){return be(e)})),Pe({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ye(e){var t=e.model,r=e.oldProperties,n=e.properties,a=e.measures,s=e.runUpdateIfChange,u=void 0!==s&&s,l=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=u?i()(!0,{},n):n),Me(n);var f=Re(n);return Fe({model:t,libraryIds:f,masterItem:l}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=Ce(r)),!t.length)return Promise.resolve();if(!xe({measures:t,properties:r}))return t.forEach((function(e){return be(e)})),Promise.resolve();var u=a?void 0:Re(r);return je({model:n,dimensionAndFieldList:s}).then((function(e){return ke({libraryIds:u,model:n,libraryItemsProps:a}).then((function(n){t.forEach((function(t){Ae({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;de.isValid(t)||de.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===me(e)&&!e.disabled){if(s++,"object"!==me(he[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");he[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,r=e.modifier,n=e.libraryId,o=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,u=a[n],l=u.qMeasure.qDef,c=he[r.type].generateExpression({expression:l,modifier:r,properties:o,dimensionAndFieldList:s});r.outputExpression=c,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||u.qMeasure.qLabel)&&(t.qDef.qLabel=u.qMeasure.qLabel),(t.qDef.qLabelExpression||u.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=u.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&u.qMeasure.qNumFormat&&(t.qDef.qNumFormat=u.qMeasure.qNumFormat,t.qDef.isCustomFormatted=u.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=u.qMeasure.coloring,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:r,libraryItemsProps:n,dimensionAndFieldList:a}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof he[r.type].updateModifier&&he[r.type].updateModifier(r,n.qHyperCubeDef);var a=pe.getExpression(t),s=he[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o.getValue(e,"qDef.qAggrFunc");"Expr"!==t||De(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&De(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Ee(t)):be(t)}))}))}))}({measures:a,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return u?Pe({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function be(e){!function(e){var t=we(e);return Array.isArray(t)&&t.some((function(e){return"object"===me(e)&&!e.disabled&&!he[e.type]}))}(e)?de.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ee(e)}function xe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({modifiers:we(e),properties:r,layout:n})}))}function qe(e){var t=we(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(he[n.type]&&!n.disabled)return n}}function De(e){var t=qe(e);return!t||he[t.type].enableTotalsFunction(e)}function Ce(e){return o.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(o.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function we(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Se(e){return o.getValue(e,"outputExpression.qValueExpression.qExpr")||o.getValue(e,"outputExpression")}function Me(e){Ce(e).forEach((function(e){return function(e){var t=qe(e);t&&(void 0!==t.outputExpression&&Se(t)!==e.qDef.qDef?delete e.qDef.base:!de.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Ee(e){var t=we(e);Array.isArray(t)&&t.forEach((function(t){"object"===me(t)&&(t.disabled||!he[t.type]&&Se(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Oe(e){return e.base||e.qDef&&e.qDef.base}function Ie(e){var t=Oe(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,r=e.properties,n=e.layout;return!Ie(t)&&Ae({modifiers:we(t),properties:r,layout:n})}function Ae(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==me(e)||e.disabled||!he[e.type])&&(void 0===i[e.type]&&(i[e.type]=he[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function je(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 Le(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Pe(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o.getValue(t,"qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qMeasures"),Le)||JSON.stringify(o.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(o.getValue(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o.getValue(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k.saveSoftProperties(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Ne(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===me(e)&&!e.disabled&&he[e.type]&&he[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Re(e){var t=Ce(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=we(t);if(Ae({modifiers:n,properties:e})){var o=Ie(t);o&&r.push(o),i=i||Ne({modifiers:n,properties:e})}})),o.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Fe(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ve[t.id].masterItemSubscriber=ve[t.id].masterItemSubscriber||ce({model:t,callback:function(e){return ge({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ve[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
19
+ function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(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,o,i,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!==(o=c(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:r,newValue:o}));return p}},function(e,t,r){r.r(t);var n=r(0),o=r.n(n),i={setValue:function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},getValue:function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i}},a="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function l(e){return a+e+s}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var 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,o=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===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function c(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function d(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function f(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function h(e){return void 0===e?")":", 0, ".concat(e,")")}function g(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=g(u(n[0],o),f(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var p=u(n[0],o),d=u(n[1],o),m=f(0),h=f(1),y=g(p,m),v=g(d,h);return"".concat(a,"({1<").concat(y,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function b(){return")"}function x(e){var t=e.properties,r=e.layout;return i.getValue(t,"qHyperCubeDef.qDimensions",i.getValue(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:c,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=l(d(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),u=i?"":", 0";if(n&&1===n.length){var c=f(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(n&&2===n.length){var p=f(0),m=f(1);return"If(Count(".concat(p,") * Count(").concat(m,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!c(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:h,getAboveComp:function(e,t,r,n){return m(e,t)+r+h(n)},getFunctionPrefix:v,getFunctionSuffix:b,getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===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=f(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:d,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(a);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+a.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=x({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:l,canExtract:function(e){var t=e.indexOf(a),r=e.indexOf(s);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:f,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function C(e){return(C="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 w=o.a.bind(null,!0),M={},S=Array.isArray;function E(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function I(e){return void 0===e}function T(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=I(e[r||t])?i:e[t],e=e[r||t]}})),e}function O(e,t){var r=!0;if(E(e)&&E(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){O(e[n],t[n])||(r=!1)})),r);if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!O(e[n],t[n]))return!1;return!0}return e===t}M.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?w({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);O(i,a)||T(t,o)||(I(a)?n.push({op:"add",path:s,value:i}):E(i)&&E(a)?n=n.concat(M.generate(a,i,s)):S(i)&&S(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&I(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(O(t,o))return n;if(!I(t[0])&&I(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(M.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){I(t[o])&&!T(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},M.apply=function(e,t){t.forEach((function(t){var r,n=A(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?n[o]:n[+o]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(S(n))"-"===o&&(o=n.length),n.splice(+o,"add"===t.op?0:1,t.value);else if(S(i)&&S(t.value)){var s,l=t.value.slice();i.length=0,(s=i).push.apply(s,D(l))}else if(E(i)&&E(t.value))r=i,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!T(r,e)&&delete r[e]})),w(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[o]=t.value}else if("move"===t.op){var u=A(e,t.from);S(n)?n.splice(+o,0,u.splice(+a,1)[0]):(n[o]=u[a],delete u[a])}else"remove"===t.op&&(S(n)?n.splice(+o,1):delete n[o])}))},M.clone=function(e){return w({},e)},M.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},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):w(e,t)};var j=M,k={saveSoftProperties:function(e,t,r){if(!e)return Promise.resolve();var n=j.generate(t,r);return o()(!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 N(e,t){var r=i.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===L)return r[n]}function P(e,t){var r=function(e,t){var r=i.getValue(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 R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,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,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:n,layout:o}));var u=i.getValue(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:o})){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,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(P(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(P(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=N(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=N(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 o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(L))return!1;var i=N(t,e);return i&&!i.disabled}}}},V="movingAverage";function _(e,t){var r=i.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function H(e,t){var r=function(e,t){var r=i.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},U={translationKey:"properties.modifier.movingAverage",needDimension: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,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=q.getNumDimensions({properties:o,layout:a}));var c=i.getValue(o,"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,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:n,properties:o,layout:a})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);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(H(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(H(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(H(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(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var 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=_(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(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 o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;var i=_(t,e);return i&&!i.disabled}}}},B="difference";function W(e,t){var r=i.getValue(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function $(e,t){var r=function(e,t){var r=i.getValue(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={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,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:n,layout:o}));var u=i.getValue(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:o})){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(Y).forEach((function(t){void 0===e[t]&&(e[t]=Y[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(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 o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=W(t,e);return i&&!i.disabled}}}},J={SELECTION:{CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},DIMENSION:{ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2}},Z="normalization";function G(e,t){var r=i.getValue(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=i.getValue(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 o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:J.DIMENSION.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.DIMENSION.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DIMENSION.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=Q(t,0);t.splice(n,1)}return t}(o,i),function(e,t,r){if(0===e){var n=Q(t,1);t.splice(n,1)}return t}(G(e,n).selectionScope,i)}function te(e,t,r){var n=[{value:J.SELECTION.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:J.SELECTION.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:J.SELECTION.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Q(t,0);t.splice(n,1)}return t}(G(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DIMENSION.DISREGARD_ALL_DIMENSIONS,selectionScope:J.SELECTION.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function oe(e,t,r){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(r),">"):""}function se(e,t,r,n,o,i,a){var s=ne(t),l=oe(t,r,n),u=""===s&&""===l?"":s||l,c=ie(o,i),p=ae(o,i,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return 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,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=q.getNumDimensions({properties:n,layout:o}));var u=i.getValue(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return se(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:J.SELECTION.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 G(t,e).selectionScope===J.SELECTION.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 G(t,e).selectionScope===J.SELECTION.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:J.DIMENSION.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(G(t,e).dimensionalScope||0)===J.DIMENSION.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Z))return!1;var i=G(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:ne,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae};function ue(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i.getValue(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i.getValue(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"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,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.measureLibraryIds,r=e.dimensionLibraryIds;o={},t.forEach((function(e){o[e]=!0})),a={},r.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}var ce={getExpression:function(e){return i.getValue(e,"qDef.base.qDef")||i.getValue(e,"qDef.qDef")},getExpressionRef:function(e){return i.getValue(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return i.getValue(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return i.getValue(e,"qDef.base.qLibraryId")||i.getValue(e,"qLibraryId")},getLabelRef:function(e){return i.getValue(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i.getValue(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},pe={initBase:function(e,t){(t||pe.isValid(e))&&(i.setValue(e,"qDef.base.qDef",i.getValue(e,"qDef.qDef")),i.setValue(e,"qDef.base.qLibraryId",i.getValue(e,"qLibraryId")),i.setValue(e,"qDef.base.qLabel",i.getValue(e,"qDef.qLabel")),i.setValue(e,"qDef.base.qLabelExpression",i.getValue(e,"qDef.qLabelExpression")))},restoreBase:function(e){pe.isValid(e)&&(i.setValue(e,"qDef.qDef",i.getValue(e,"qDef.base.qDef")),i.setValue(e,"qLibraryId",i.getValue(e,"qDef.base.qLibraryId")),i.setValue(e,"qDef.qLabel",i.getValue(e,"qDef.base.qLabel")),i.setValue(e,"qDef.qLabelExpression",i.getValue(e,"qDef.base.qLabelExpression")),i.getValue(e,"qDef.qAggrFunc")&&i.getValue(e,"qDef.base.qAggrFunc")&&i.setValue(e,"qDef.qAggrFunc",i.getValue(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=i.getValue(e,"qDef.base.qDef"),r=i.getValue(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},de=pe;function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var me={accumulation:F,movingAverage:U,difference:K,normalization:le},he=(t.default={modifiers:me,apply:ge,applyModifiers:ye,cleanUpMeasure:ve,destroy:function(e){e&&he[e.id]&&he[e.id].masterItemSubscriber&&(he[e.id].masterItemSubscriber&&he[e.id].masterItemSubscriber.unsubscribe(),delete he[e.id])},hasActiveModifiers:be,getActiveModifier:xe,initBase:de.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return me[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return me[e]&&me[e].isApplicable({properties:r,layout:n})}))},measureBase:ce,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Ce(e);Ae({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Ne({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:qe},{});function ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,a=void 0!==n&&n,s=e.masterItem;he[t.id]=he[t.id]||{isFirstTime:!0};var l=he[t.id].isFirstTime;if(he[t.id].isFirstTime=!1,r&&"object"===fe(r))return ye({model:t,properties:r});var u=t?t.layout:void 0,c=i.getValue(u,"qSelectionInfo.qInSelections");if(a||c)return Promise.resolve(!1);var p=i.getValue(u,"qHyperCube.qMeasureInfo"),d=he[t.id].lastReloadTime;if(he[t.id].lastReloadTime=i.getValue(t,"app.layout.qLastReloadTime"),be({measures:p,layout:u})){var f=function(e){var t=e.measures,r=e.layout,n=e.model,o=e.lastReloadTime;return i.getValue(n,"app.layout.qLastReloadTime")!==o&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({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,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ae({modifiers:Ce(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=o()(!0,{},e);Me(r);var n=Pe(r);return Oe({model:t}).then((function(o){return je({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;De(t).forEach((function(e){return function(e){var t=e.measure,r=e.properties;if(Te({measure:t,properties:r})){var n=0,o=t.qDef.modifiers;Array.isArray(o)&&o.forEach((function(e){if("object"===fe(e)&&!e.disabled){if(n++,"object"!==fe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=me[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ee(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),ye({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===fe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Pe(r);return Re({model:t,libraryIds:n}).then((function(){var e=o()(!0,{},r);return De(r).forEach((function(e){return ve(e)})),Le({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ye(e){var t=e.model,r=e.oldProperties,n=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?o()(!0,{},n):n),Me(n);var d=Pe(n);return Re({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=De(r)),!t.length)return Promise.resolve();if(!be({measures:t,properties:r}))return t.forEach((function(e){return ve(e)})),Promise.resolve();var l=a?void 0:Pe(r);return Oe({model:n,dimensionAndFieldList:s}).then((function(e){return je({libraryIds:l,model:n,libraryItemsProps:a}).then((function(n){t.forEach((function(t){Ae({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;de.isValid(t)||de.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===fe(e)&&!e.disabled){if(s++,"object"!==fe(me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");me[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.libraryId,i=e.properties,a=e.libraryItemsProps,s=e.dimensionAndFieldList,l=a[n],u=l.qMeasure.qDef,c=me[r.type].generateExpression({expression:u,modifier:r,properties:i,dimensionAndFieldList:s});r.outputExpression=c,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||l.qMeasure.qLabel)&&(t.qDef.qLabel=l.qMeasure.qLabel),(t.qDef.qLabelExpression||l.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=l.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&l.qMeasure.qNumFormat&&(t.qDef.qNumFormat=l.qMeasure.qNumFormat,t.qDef.isCustomFormatted=l.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=l.qMeasure.coloring,r.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:a}):function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList;"function"==typeof me[r.type].updateModifier&&me[r.type].updateModifier(r,n.qHyperCubeDef);var a=ce.getExpression(t),s=me[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:i});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=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i.getValue(e,"qDef.qAggrFunc");"Expr"!==t||qe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&qe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Se(t)):ve(t)}))}))}))}({measures:a,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Le({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ve(e){!function(e){var t=Ce(e);return Array.isArray(t)&&t.some((function(e){return"object"===fe(e)&&!e.disabled&&!me[e.type]}))}(e)?de.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function be(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({modifiers:Ce(e),properties:r,layout:n})}))}function xe(e){var t=Ce(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(me[n.type]&&!n.disabled)return n}}function qe(e){var t=xe(e);return!t||me[t.type].enableTotalsFunction(e)}function De(e){return i.getValue(e,"qHyperCubeDef.qMeasures",[]).concat(i.getValue(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ce(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function we(e){return i.getValue(e,"outputExpression.qValueExpression.qExpr")||i.getValue(e,"outputExpression")}function Me(e){De(e).forEach((function(e){return function(e){var t=xe(e);t&&(void 0!==t.outputExpression&&we(t)!==e.qDef.qDef?delete e.qDef.base:!de.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Se(e){var t=Ce(e);Array.isArray(t)&&t.forEach((function(t){"object"===fe(t)&&(t.disabled||!me[t.type]&&we(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ee(e){return e.base||e.qDef&&e.qDef.base}function Ie(e){var t=Ee(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,r=e.properties,n=e.layout;return!Ie(t)&&Ae({modifiers:Ce(t),properties:r,layout:n})}function Ae(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==fe(e)||e.disabled||!me[e.type])&&(void 0===o[e.type]&&(o[e.type]=me[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Oe(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function je(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.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 ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Le(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i.getValue(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(i.getValue(r,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(i.getValue(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(i.getValue(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i.getValue(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k.saveSoftProperties(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Ne(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===fe(e)&&!e.disabled&&me[e.type]&&me[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Pe(e){var t=De(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Ce(t);if(Ae({modifiers:n,properties:e})){var i=Ie(t);i&&r.push(i),o=o||Ne({modifiers:n,properties:e})}})),i.getValue(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Re(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(he[t.id].masterItemSubscriber=he[t.id].masterItemSubscriber||ue({model:t,callback:function(e){return ge({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),he[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},"./axis-chart/export-properties/index.js":
20
20
  /*!***********************************************!*\
21
21
  !*** ./axis-chart/export-properties/index.js ***!
22
22
  \***********************************************/
23
23
  /*! exports provided: default */
24
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
24
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
25
25
  /*! ../../quarantine/quarantine-property */
26
- "./quarantine/quarantine-property.js"),i=r(
26
+ "./quarantine/quarantine-property.js"),o=r(
27
27
  /*! ../../color-chart */
28
- "./color-chart/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,u=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),l=u.properties;return s?(Object(n.default)(l,"measureAxis.min","supportedAutoMinMax"),Object(n.default)(l,"measureAxis.max","supportedAutoMinMax")):(Object(n.default)(l,"measureAxis.min","unsupportedAutoMinMax"),Object(n.default)(l,"measureAxis.max","unsupportedAutoMinMax")),u}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
28
+ "./color-chart/index.js");function i(e){var t=e.propertyTree,r=e.hypercubePath,i=e.viewDataMode,a=e.supportedAutoMinMax,s=void 0===a||a,l=o.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:i}),u=l.properties;return s?(Object(n.default)(u,"measureAxis.min","supportedAutoMinMax"),Object(n.default)(u,"measureAxis.max","supportedAutoMinMax")):(Object(n.default)(u,"measureAxis.min","unsupportedAutoMinMax"),Object(n.default)(u,"measureAxis.max","unsupportedAutoMinMax")),l}},"./axis-chart/import-properties/helpers/get-measures-per-axis.js":
29
29
  /*!***********************************************************************!*\
30
30
  !*** ./axis-chart/import-properties/helpers/get-measures-per-axis.js ***!
31
31
  \***********************************************************************/
32
32
  /*! exports provided: default */
33
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=["bar","marker","line"];function i(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,i=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),n.includes(i)&&t[o].type[i]++,t[o].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
33
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=["bar","marker","line"];function o(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,o=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),n.includes(o)&&t[i].type[o]++,t[i].type.total++}})),t}},"./axis-chart/import-properties/helpers/handle-auto-min-max.js":
34
34
  /*!*********************************************************************!*\
35
35
  !*** ./axis-chart/import-properties/helpers/handle-auto-min-max.js ***!
36
36
  \*********************************************************************/
37
37
  /*! exports provided: default */
38
38
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
39
39
  /*! extend */
40
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
40
+ "../node_modules/extend/index.js"),o=r.n(n),i=r(
41
41
  /*! ../../../quarantine/unquarantine-property */
42
- "./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(o.default)(r,"unsupportedAutoMinMax")||i()(r.measureAxis,t.measureAxis):Object(o.default)(r,"supportedAutoMinMax")||i()(r.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
42
+ "./quarantine/unquarantine-property.js");function a(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?Object(i.default)(r,"unsupportedAutoMinMax")||o()(r.measureAxis,t.measureAxis):Object(i.default)(r,"supportedAutoMinMax")||o()(r.measureAxis,t.measureAxis)}},"./axis-chart/import-properties/helpers/handle-measures-axis.js":
43
43
  /*!**********************************************************************!*\
44
44
  !*** ./axis-chart/import-properties/helpers/handle-measures-axis.js ***!
45
45
  \**********************************************************************/
46
46
  /*! exports provided: default */
47
47
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
48
48
  /*! extend */
49
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
49
+ "../node_modules/extend/index.js"),o=r.n(n),i=r(
50
50
  /*! ./should-update-measure-axis */
51
51
  "./axis-chart/import-properties/helpers/should-update-measure-axis.js"),a=r(
52
52
  /*! ./get-measures-per-axis */
53
- "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,r=e.exportFormat,n=e.initialProperties,s=e.properties,u=e.measureType,l=s.qHyperCubeDef,c=s.measureAxis;if(Object(o.default)({exportFormat:r,initialProperties:n})){var p=Object(a.default)(l);p.length?(u&&(t=p.filter((function(e){return e.type[u]>0})).sort((function(e,t){return t.type[u]-e.type[u]}))),t&&t.length||(t=p.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&i()(c,r.properties.measureAxes[t[0].axis])):i()(c,r.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
53
+ "./axis-chart/import-properties/helpers/get-measures-per-axis.js");function s(e){var t,r=e.exportFormat,n=e.initialProperties,s=e.properties,l=e.measureType,u=s.qHyperCubeDef,c=s.measureAxis;if(Object(i.default)({exportFormat:r,initialProperties:n})){var p=Object(a.default)(u);p.length?(l&&(t=p.filter((function(e){return e.type[l]>0})).sort((function(e,t){return t.type[l]-e.type[l]}))),t&&t.length||(t=p.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&o()(c,r.properties.measureAxes[t[0].axis])):o()(c,r.properties.measureAxes[0])}}},"./axis-chart/import-properties/helpers/index.js":
54
54
  /*!*******************************************************!*\
55
55
  !*** ./axis-chart/import-properties/helpers/index.js ***!
56
56
  \*******************************************************/
57
57
  /*! exports provided: default */
58
58
  function(e,t,r){r.r(t);var n=r(
59
59
  /*! ./handle-auto-min-max */
60
- "./axis-chart/import-properties/helpers/handle-auto-min-max.js"),i=r(
60
+ "./axis-chart/import-properties/helpers/handle-auto-min-max.js"),o=r(
61
61
  /*! ./handle-measures-axis */
62
- "./axis-chart/import-properties/helpers/handle-measures-axis.js"),o=r(
62
+ "./axis-chart/import-properties/helpers/handle-measures-axis.js"),i=r(
63
63
  /*! ./set-inter-column-sort-order */
64
- "./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:n.default,handleMeasuresAxis:i.default,setInterColumnSortOrder:o.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
64
+ "./axis-chart/import-properties/helpers/set-inter-column-sort-order.js");t.default={handleAutoMinMax:n.default,handleMeasuresAxis:o.default,setInterColumnSortOrder:i.default}},"./axis-chart/import-properties/helpers/set-inter-column-sort-order.js":
65
65
  /*!*****************************************************************************!*\
66
66
  !*** ./axis-chart/import-properties/helpers/set-inter-column-sort-order.js ***!
67
67
  \*****************************************************************************/
@@ -76,61 +76,61 @@ function(e,t,r){function n(e){var t=e.exportFormat,r=e.initialProperties;return!
76
76
  !*** ./axis-chart/import-properties/index.js ***!
77
77
  \***********************************************/
78
78
  /*! exports provided: default */
79
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
79
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
80
80
  /*! ./helpers */
81
- "./axis-chart/import-properties/helpers/index.js"),i=r(
81
+ "./axis-chart/import-properties/helpers/index.js"),o=r(
82
82
  /*! ../../color-chart */
83
- "./color-chart/index.js");function o(e){var t=e.exportFormat,r=e.initialProperties,o=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,u=e.measureType,l=i.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:o,defaultPropertyValues:a,hypercubePath:s}),c=l.qProperty;return n.default.handleAutoMinMax({initialProperties:r,properties:c}),n.default.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:c,measureType:u}),n.default.setInterColumnSortOrder(c.qHyperCubeDef),l}},"./axis-chart/index.js":
83
+ "./color-chart/index.js");function i(e){var t=e.exportFormat,r=e.initialProperties,i=e.dataDefinition,a=e.defaultPropertyValues,s=e.hypercubePath,l=e.measureType,u=o.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:i,defaultPropertyValues:a,hypercubePath:s}),c=u.qProperty;return n.default.handleAutoMinMax({initialProperties:r,properties:c}),n.default.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:c,measureType:l}),n.default.setInterColumnSortOrder(c.qHyperCubeDef),u}},"./axis-chart/index.js":
84
84
  /*!*****************************!*\
85
85
  !*** ./axis-chart/index.js ***!
86
86
  \*****************************/
87
87
  /*! exports provided: default */
88
88
  function(e,t,r){r.r(t);var n=r(
89
89
  /*! ./export-properties */
90
- "./axis-chart/export-properties/index.js"),i=r(
90
+ "./axis-chart/export-properties/index.js"),o=r(
91
91
  /*! ./import-properties */
92
- "./axis-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./color-chart/export-properties/index.js":
92
+ "./axis-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:o.default}},"./color-chart/export-properties/index.js":
93
93
  /*!************************************************!*\
94
94
  !*** ./color-chart/export-properties/index.js ***!
95
95
  \************************************************/
96
96
  /*! exports provided: default */
97
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
97
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
98
98
  /*! ../../utils/attribute-expression-util */
99
- "./utils/attribute-expression-util/index.js"),i=r(
99
+ "./utils/attribute-expression-util/index.js"),o=r(
100
100
  /*! ../../hypercube */
101
- "./hypercube/index.js");function o(e){var t=e.propertyTree,r=e.hypercubePath,o=e.viewDataMode,a=i.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:o}),s=a.data[0],u=s.dimensions.concat(s.excludedDimensions),l=s.measures.concat(s.excludedMeasures),c=n.default.IDMAP,p=c.COLOR_BY_ALTERNATIVE,f=c.COLOR_BY_EXPRESSION;return n.default.moveByIdFromGroup(u,[],"qAttributeDimensions",p),n.default.moveByIdFromGroup(u,[],"qAttributeExpressions",p),n.default.moveByIdFromGroup(l,[],"qAttributeExpressions",f),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
101
+ "./hypercube/index.js");function i(e){var t=e.propertyTree,r=e.hypercubePath,i=e.viewDataMode,a=o.default.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:i}),s=a.data[0],l=s.dimensions.concat(s.excludedDimensions),u=s.measures.concat(s.excludedMeasures),c=n.default.IDMAP,p=c.COLOR_BY_ALTERNATIVE,d=c.COLOR_BY_EXPRESSION;return n.default.moveByIdFromGroup(l,[],"qAttributeDimensions",p),n.default.moveByIdFromGroup(l,[],"qAttributeExpressions",p),n.default.moveByIdFromGroup(u,[],"qAttributeExpressions",d),a}},"./color-chart/import-properties/helpers/add-color-by-expression.js":
102
102
  /*!**************************************************************************!*\
103
103
  !*** ./color-chart/import-properties/helpers/add-color-by-expression.js ***!
104
104
  \**************************************************************************/
105
105
  /*! exports provided: default */
106
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
106
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
107
107
  /*! ../../../utils */
108
- "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=n.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),n.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
108
+ "./utils/index.js");function o(e){var t=n.default.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=n.default.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),n.default.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)}},"./color-chart/import-properties/helpers/change-property.js":
109
109
  /*!******************************************************************!*\
110
110
  !*** ./color-chart/import-properties/helpers/change-property.js ***!
111
111
  \******************************************************************/
112
112
  /*! exports provided: default */
113
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
113
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
114
114
  /*! ../../../utils */
115
- "./utils/index.js"),i=r(
115
+ "./utils/index.js"),o=r(
116
116
  /*! ./update-layout-exclude */
117
- "./color-chart/import-properties/helpers/update-layout-exclude.js");function o(e,t,r){n.default.setValue(e,t,r),n.default.isAtomicValue(r)&&Object(i.default)(e,t,r)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
117
+ "./color-chart/import-properties/helpers/update-layout-exclude.js");function i(e,t,r){n.default.setValue(e,t,r),n.default.isAtomicValue(r)&&Object(o.default)(e,t,r)}},"./color-chart/import-properties/helpers/clear-attribute-by-type.js":
118
118
  /*!**************************************************************************!*\
119
119
  !*** ./color-chart/import-properties/helpers/clear-attribute-by-type.js ***!
120
120
  \**************************************************************************/
121
121
  /*! exports provided: default */
122
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
122
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
123
123
  /*! ../../../utils/array-util */
124
- "./utils/array-util.js");function i(e,t,r){if(Array.isArray(e[t])){var i=n.default.findIndexByPropertyValue(e[t],"id",r);i>=0&&e[t].splice(i,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
124
+ "./utils/array-util.js");function o(e,t,r){if(Array.isArray(e[t])){var o=n.default.findIndexByPropertyValue(e[t],"id",r);o>=0&&e[t].splice(o,1)}else e[t]=[]}},"./color-chart/import-properties/helpers/clear-color-by-item.js":
125
125
  /*!**********************************************************************!*\
126
126
  !*** ./color-chart/import-properties/helpers/clear-color-by-item.js ***!
127
127
  \**********************************************************************/
128
128
  /*! exports provided: default */
129
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
129
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
130
130
  /*! ../../../utils/attribute-expression-util */
131
- "./utils/attribute-expression-util/index.js"),i=r(
131
+ "./utils/attribute-expression-util/index.js"),o=r(
132
132
  /*! ./clear-attribute-by-type */
133
- "./color-chart/import-properties/helpers/clear-attribute-by-type.js");function o(e,t){var r=n.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)})),t.forEach((function(e){Object(i.default)(e,"qAttributeDimensions",r),Object(i.default)(e,"qAttributeExpressions",r)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
133
+ "./color-chart/import-properties/helpers/clear-attribute-by-type.js");function i(e,t){var r=n.default.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){Object(o.default)(e,"qAttributeDimensions",r),Object(o.default)(e,"qAttributeExpressions",r)})),t.forEach((function(e){Object(o.default)(e,"qAttributeDimensions",r),Object(o.default)(e,"qAttributeExpressions",r)}))}},"./color-chart/import-properties/helpers/delete-total-mode.js":
134
134
  /*!********************************************************************!*\
135
135
  !*** ./color-chart/import-properties/helpers/delete-total-mode.js ***!
136
136
  \********************************************************************/
@@ -140,39 +140,39 @@ function(e,t,r){function n(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalM
140
140
  !*** ./color-chart/import-properties/helpers/get-can-color-by.js ***!
141
141
  \*******************************************************************/
142
142
  /*! exports provided: default */
143
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
143
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
144
144
  /*! ./get-color-options */
145
- "./color-chart/import-properties/helpers/get-color-options.js");function i(e,t){var r={primary:!0};if(e){var i=Object(n.default)(t);r.byDimension=i.dimension(e),r.byMeasure=i.measure(e),r.byMultiple=i.multiColor(e),r.byExpression=i.expression(e)}return r}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
145
+ "./color-chart/import-properties/helpers/get-color-options.js");function o(e,t){var r={primary:!0};if(e){var o=Object(n.default)(t);r.byDimension=o.dimension(e),r.byMeasure=o.measure(e),r.byMultiple=o.multiColor(e),r.byExpression=o.expression(e)}return r}},"./color-chart/import-properties/helpers/get-color-by-definition.js":
146
146
  /*!**************************************************************************!*\
147
147
  !*** ./color-chart/import-properties/helpers/get-color-by-definition.js ***!
148
148
  \**************************************************************************/
149
149
  /*! exports provided: default */
150
150
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
151
151
  /*! ./get-expression */
152
- "./color-chart/import-properties/helpers/get-expression.js"),i=r(
152
+ "./color-chart/import-properties/helpers/get-expression.js"),o=r(
153
153
  /*! ./get-dimension-label */
154
- "./color-chart/import-properties/helpers/get-dimension-label.js"),o=r(
154
+ "./color-chart/import-properties/helpers/get-dimension-label.js"),i=r(
155
155
  /*! ./get-measure-label */
156
156
  "./color-chart/import-properties/helpers/get-measure-label.js"),a=r(
157
157
  /*! ./get-measure-library-id */
158
- "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,r,s){var u,l,c={};switch(e){case"dimension":r.qLibraryId?(c.type="dimension",c.name=r.qLibraryId,c.id=r.qLibraryId):(c.type="field",t?(c.name=r.label||r.qDef,c.id=r.qDef):(c.name=r.qDef.qFieldDefs[0],c.label=Object(i.default)(r)));break;case"measure":(u=Object(a.default)(r,t))?(c.type="measure",c.name=u,c.id=u,(l=Object(n.default)(r,s))&&(c.expression=l)):(c.type="expression",t?(c.name=r.label||r.qExpression,c.id=r.qExpression):(c.name=r.qDef.qDef,c.label=Object(o.default)(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
158
+ "./color-chart/import-properties/helpers/get-measure-library-id.js");function s(e,t,r,s){var l,u,c={};switch(e){case"dimension":r.qLibraryId?(c.type="dimension",c.name=r.qLibraryId,c.id=r.qLibraryId):(c.type="field",t?(c.name=r.label||r.qDef,c.id=r.qDef):(c.name=r.qDef.qFieldDefs[0],c.label=Object(o.default)(r)));break;case"measure":(l=Object(a.default)(r,t))?(c.type="measure",c.name=l,c.id=l,(u=Object(n.default)(r,s))&&(c.expression=u)):(c.type="expression",t?(c.name=r.label||r.qExpression,c.id=r.qExpression):(c.name=r.qDef.qDef,c.label=Object(i.default)(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return c}},"./color-chart/import-properties/helpers/get-color-options.js":
159
159
  /*!********************************************************************!*\
160
160
  !*** ./color-chart/import-properties/helpers/get-color-options.js ***!
161
161
  \********************************************************************/
162
162
  /*! exports provided: default */
163
163
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
164
164
  /*! ./patches/default */
165
- "./color-chart/import-properties/helpers/patches/default.js"),i=r(
165
+ "./color-chart/import-properties/helpers/patches/default.js"),o=r(
166
166
  /*! ./patches/scatter-plot */
167
- "./color-chart/import-properties/helpers/patches/scatter-plot.js"),o=r(
167
+ "./color-chart/import-properties/helpers/patches/scatter-plot.js"),i=r(
168
168
  /*! ./patches/pie-chart */
169
169
  "./color-chart/import-properties/helpers/patches/pie-chart.js"),a=r(
170
170
  /*! ./patches/line-chart */
171
171
  "./color-chart/import-properties/helpers/patches/line-chart.js"),s=r(
172
172
  /*! ./patches/map */
173
- "./color-chart/import-properties/helpers/patches/map.js"),u=r(
173
+ "./color-chart/import-properties/helpers/patches/map.js"),l=r(
174
174
  /*! ./patches/distribution-plot */
175
- "./color-chart/import-properties/helpers/patches/distribution-plot.js"),l={scatterplot:i.default,piechart:o.default,linechart:a.default,map:s.default,distributionplot:u.default};function c(e){return(l[e]||n.default).colorModeOptions||n.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
175
+ "./color-chart/import-properties/helpers/patches/distribution-plot.js"),u={scatterplot:o.default,piechart:i.default,linechart:a.default,map:s.default,distributionplot:l.default};function c(e){return(u[e]||n.default).colorModeOptions||n.default.colorModeOptions}},"./color-chart/import-properties/helpers/get-dimension-label.js":
176
176
  /*!**********************************************************************!*\
177
177
  !*** ./color-chart/import-properties/helpers/get-dimension-label.js ***!
178
178
  \**********************************************************************/
@@ -182,9 +182,9 @@ function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExp
182
182
  !*** ./color-chart/import-properties/helpers/get-expression.js ***!
183
183
  \*****************************************************************/
184
184
  /*! exports provided: default */
185
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
185
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
186
186
  /*! qlik-modifiers */
187
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return i.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
187
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),o=r.n(n);function i(e,t){return o.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}},"./color-chart/import-properties/helpers/get-measure-label.js":
188
188
  /*!********************************************************************!*\
189
189
  !*** ./color-chart/import-properties/helpers/get-measure-label.js ***!
190
190
  \********************************************************************/
@@ -194,96 +194,96 @@ function(e,t,r){function n(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExp
194
194
  !*** ./color-chart/import-properties/helpers/get-measure-library-id.js ***!
195
195
  \*************************************************************************/
196
196
  /*! exports provided: default */
197
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
197
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
198
198
  /*! qlik-modifiers */
199
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e,t){return t?e.qLibraryId:i.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
199
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),o=r.n(n);function i(e,t){return t?e.qLibraryId:o.a.measureBase.getLibraryId(e)}},"./color-chart/import-properties/helpers/index.js":
200
200
  /*!********************************************************!*\
201
201
  !*** ./color-chart/import-properties/helpers/index.js ***!
202
202
  \********************************************************/
203
203
  /*! exports provided: default */
204
204
  function(e,t,r){r.r(t);var n=r(
205
205
  /*! ./change-property */
206
- "./color-chart/import-properties/helpers/change-property.js"),i=r(
206
+ "./color-chart/import-properties/helpers/change-property.js"),o=r(
207
207
  /*! ./get-can-color-by */
208
- "./color-chart/import-properties/helpers/get-can-color-by.js"),o=r(
208
+ "./color-chart/import-properties/helpers/get-can-color-by.js"),i=r(
209
209
  /*! ./should-update-color-by */
210
210
  "./color-chart/import-properties/helpers/should-update-color-by.js"),a=r(
211
211
  /*! ./update-color-by */
212
212
  "./color-chart/import-properties/helpers/update-color-by.js"),s=r(
213
213
  /*! ./delete-total-mode */
214
- "./color-chart/import-properties/helpers/delete-total-mode.js"),u=r(
214
+ "./color-chart/import-properties/helpers/delete-total-mode.js"),l=r(
215
215
  /*! ./should-add-color-by-expression */
216
- "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),l=r(
216
+ "./color-chart/import-properties/helpers/should-add-color-by-expression.js"),u=r(
217
217
  /*! ./add-color-by-expression */
218
218
  "./color-chart/import-properties/helpers/add-color-by-expression.js"),c=r(
219
219
  /*! ./switch-to-auto-color */
220
220
  "./color-chart/import-properties/helpers/switch-to-auto-color.js"),p=r(
221
221
  /*! ./should-switch-to-color-persistent */
222
- "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:n.default,getCanColorBy:i.default,shouldUpdateColorBy:o.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:u.default,addColorByExpression:l.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:p.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
222
+ "./color-chart/import-properties/helpers/should-switch-to-color-persistent.js");t.default={changeProperty:n.default,getCanColorBy:o.default,shouldUpdateColorBy:i.default,updateColorBy:a.default,deleteTotalMode:s.default,shouldAddColorByExpression:l.default,addColorByExpression:u.default,switchToAutoColor:c.default,shouldSwitchToColorPersistent:p.default}},"./color-chart/import-properties/helpers/is-map-point-layer.js":
223
223
  /*!*********************************************************************!*\
224
224
  !*** ./color-chart/import-properties/helpers/is-map-point-layer.js ***!
225
225
  \*********************************************************************/
226
226
  /*! exports provided: default */
227
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
227
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
228
228
  /*! ../../../utils */
229
- "./utils/index.js");function i(e,t,r){var i=n.default.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=n.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===i&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
229
+ "./utils/index.js");function o(e,t,r){var o=n.default.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=n.default.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===o&&"point"===s}},"./color-chart/import-properties/helpers/patches/default.js":
230
230
  /*!******************************************************************!*\
231
231
  !*** ./color-chart/import-properties/helpers/patches/default.js ***!
232
232
  \******************************************************************/
233
233
  /*! exports provided: default */
234
234
  function(e,t,r){r.r(t);var n=r(
235
235
  /*! ../../../../utils/hypercube-util */
236
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>0&&n.default.getNumMeasures(e)<=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
236
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>0&&n.default.getNumMeasures(e)<=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/patches/distribution-plot.js":
237
237
  /*!****************************************************************************!*\
238
238
  !*** ./color-chart/import-properties/helpers/patches/distribution-plot.js ***!
239
239
  \****************************************************************************/
240
240
  /*! exports provided: default */
241
241
  function(e,t,r){r.r(t);var n=r(
242
242
  /*! ../../../../utils/hypercube-util */
243
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/line-chart.js":
243
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/patches/line-chart.js":
244
244
  /*!*********************************************************************!*\
245
245
  !*** ./color-chart/import-properties/helpers/patches/line-chart.js ***!
246
246
  \*********************************************************************/
247
247
  /*! exports provided: default */
248
248
  function(e,t,r){r.r(t);var n=r(
249
249
  /*! ../../../../utils/hypercube-util */
250
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)<=1},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/map.js":
250
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)<=1},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/patches/map.js":
251
251
  /*!**************************************************************!*\
252
252
  !*** ./color-chart/import-properties/helpers/patches/map.js ***!
253
253
  \**************************************************************/
254
254
  /*! exports provided: default */
255
255
  function(e,t,r){r.r(t);var n=r(
256
256
  /*! ../../../../utils/hypercube-util */
257
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>=1},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
257
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(e){return n.default.getNumDimensions(e)>=1},multiColor:function(e){return n.default.getNumMeasures(e)>1},measure:function(e){return n.default.getNumDimensions(e)>=1},expression:function(e){return n.default.getNumDimensions(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/patches/pie-chart.js":
258
258
  /*!********************************************************************!*\
259
259
  !*** ./color-chart/import-properties/helpers/patches/pie-chart.js ***!
260
260
  \********************************************************************/
261
261
  /*! exports provided: default */
262
262
  function(e,t,r){r.r(t);var n=r(
263
263
  /*! ../../../../utils/hypercube-util */
264
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
264
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/patches/scatter-plot.js":
265
265
  /*!***********************************************************************!*\
266
266
  !*** ./color-chart/import-properties/helpers/patches/scatter-plot.js ***!
267
267
  \***********************************************************************/
268
268
  /*! exports provided: default */
269
269
  function(e,t,r){r.r(t);var n=r(
270
270
  /*! ../../../../utils/hypercube-util */
271
- "./utils/hypercube-util.js"),i={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:i}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
271
+ "./utils/hypercube-util.js"),o={primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return n.default.getNumMeasures(e)>=1}};t.default={colorModeOptions:o}},"./color-chart/import-properties/helpers/resolve-color-by-property-def.js":
272
272
  /*!********************************************************************************!*\
273
273
  !*** ./color-chart/import-properties/helpers/resolve-color-by-property-def.js ***!
274
274
  \********************************************************************************/
275
275
  /*! exports provided: default */
276
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
276
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
277
277
  /*! ../../../utils */
278
- "./utils/index.js"),i=r(
278
+ "./utils/index.js"),o=r(
279
279
  /*! ../../../utils/attribute-expression-util */
280
- "./utils/attribute-expression-util/index.js"),o=r(
280
+ "./utils/attribute-expression-util/index.js"),i=r(
281
281
  /*! ./clear-color-by-item */
282
282
  "./color-chart/import-properties/helpers/clear-color-by-item.js"),a=r(
283
283
  /*! ./set-attribute-by-expression */
284
284
  "./color-chart/import-properties/helpers/set-attribute-by-expression.js"),s=r(
285
285
  /*! ./set-attribute-by-library */
286
- "./color-chart/import-properties/helpers/set-attribute-by-library.js");function u(e){var t=e.properties,r=e.isDimension,u=e.dimensions,l=e.excludedDimensions,c=e.measures,p=e.label;Object(o.default)(u,l);var f=u[u.length-1];if(f){var d=r?n.default.getValue(t,"color.byDimDef"):n.default.getValue(t,"color.byMeasureDef"),m=n.default.getValue(t,"color.formatting.qNumFormat"),h=n.default.getValue(t,"color.formatting.isCustomFormatted");if(d){var v=i.default.create(i.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(d.type){case"expression":Object(a.default)({attributeExpression:v,label:p,item:d,isDimension:r,qNumFormat:m,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:v,measures:c,item:d,isDimension:r,qNumFormat:m,isCustomFormatted:h})}r?(v.qSortBy={qSortByAscii:1},f.qAttributeDimensions.push(v)):f.qAttributeExpressions.push(v)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
286
+ "./color-chart/import-properties/helpers/set-attribute-by-library.js");function l(e){var t=e.properties,r=e.isDimension,l=e.dimensions,u=e.excludedDimensions,c=e.measures,p=e.label;Object(i.default)(l,u);var d=l[l.length-1];if(d){var f=r?n.default.getValue(t,"color.byDimDef"):n.default.getValue(t,"color.byMeasureDef"),m=n.default.getValue(t,"color.formatting.qNumFormat"),h=n.default.getValue(t,"color.formatting.isCustomFormatted");if(f){var g=o.default.create(o.default.IDMAP.COLOR_BY_ALTERNATIVE);switch(f.type){case"expression":Object(a.default)({attributeExpression:g,label:p,item:f,isDimension:r,qNumFormat:m,isCustomFormatted:h});break;case"libraryItem":Object(s.default)({attributeExpression:g,measures:c,item:f,isDimension:r,qNumFormat:m,isCustomFormatted:h})}r?(g.qSortBy={qSortByAscii:1},d.qAttributeDimensions.push(g)):d.qAttributeExpressions.push(g)}}}},"./color-chart/import-properties/helpers/set-alt-label.js":
287
287
  /*!****************************************************************!*\
288
288
  !*** ./color-chart/import-properties/helpers/set-alt-label.js ***!
289
289
  \****************************************************************/
@@ -293,86 +293,86 @@ function(e,t,r){function n(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r
293
293
  !*** ./color-chart/import-properties/helpers/set-attribute-by-expression.js ***!
294
294
  \******************************************************************************/
295
295
  /*! exports provided: default */
296
- function(e,t,r){function n(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
296
+ function(e,t,r){function n(e){var t=e.attributeExpression,r=e.label,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,o?t.qDef=n.key:(t.qExpression=n.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/set-attribute-by-library.js":
297
297
  /*!***************************************************************************!*\
298
298
  !*** ./color-chart/import-properties/helpers/set-attribute-by-library.js ***!
299
299
  \***************************************************************************/
300
300
  /*! exports provided: default */
301
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
301
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
302
302
  /*! ../../../utils/array-util */
303
- "./utils/array-util.js");function i(e){var t=e.attributeExpression,r=e.measures,i=e.item,o=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;o||(t.matchMeasure=n.default.findIndexByPropertyValue(r,"qLibraryId",i.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==i.expression?t.qExpression=i.expression:t.qLibraryId=i.key,t.colorMapRef=i.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
303
+ "./utils/array-util.js");function o(e){var t=e.attributeExpression,r=e.measures,o=e.item,i=e.isDimension,a=e.qNumFormat,s=e.isCustomFormatted;i||(t.matchMeasure=n.default.findIndexByPropertyValue(r,"qLibraryId",o.key),a&&(t.qNumFormat=a,t.isCustomFormatted=s)),void 0!==o.expression?t.qExpression=o.expression:t.qLibraryId=o.key,t.colorMapRef=o.key}},"./color-chart/import-properties/helpers/set-color-by-dimension-1.js":
304
304
  /*!***************************************************************************!*\
305
305
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-1.js ***!
306
306
  \***************************************************************************/
307
307
  /*! exports provided: default */
308
308
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
309
309
  /*! ../../../utils */
310
- "./utils/index.js"),i=r(
310
+ "./utils/index.js"),o=r(
311
311
  /*! ./get-color-by-definition */
312
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
312
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),i=r(
313
313
  /*! ./set-color-by-property-def */
314
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,r.length-1);var s=r[a.activeDimensionIndex],u=Object(i.default)("dimension",!1,s);u.activeDimensionIndex=a.activeDimensionIndex,Object(o.default)(e,u)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
314
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"color.byDimDef");a.activeDimensionIndex=Math.min(a.activeDimensionIndex,r.length-1);var s=r[a.activeDimensionIndex],l=Object(o.default)("dimension",!1,s);l.activeDimensionIndex=a.activeDimensionIndex,Object(i.default)(e,l)}},"./color-chart/import-properties/helpers/set-color-by-dimension-2.js":
315
315
  /*!***************************************************************************!*\
316
316
  !*** ./color-chart/import-properties/helpers/set-color-by-dimension-2.js ***!
317
317
  \***************************************************************************/
318
318
  /*! exports provided: default */
319
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
319
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
320
320
  /*! ../../../utils */
321
- "./utils/index.js"),i=r(
321
+ "./utils/index.js"),o=r(
322
322
  /*! ../../../utils/array-util */
323
- "./utils/array-util.js"),o=r(
323
+ "./utils/array-util.js"),i=r(
324
324
  /*! ../../../utils/attribute-expression-util */
325
325
  "./utils/attribute-expression-util/index.js"),a=r(
326
326
  /*! ./get-color-by-definition */
327
327
  "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
328
328
  /*! ./set-color-by-property-def */
329
- "./color-chart/import-properties/helpers/set-color-by-property-def.js"),u=r(
329
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js"),l=r(
330
330
  /*! ./is-map-point-layer */
331
- "./color-chart/import-properties/helpers/is-map-point-layer.js");function l(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),l=r[Object(u.default)(r,e,t)?0:r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,p=i.default.findItemByPropertyValue(l.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!p,p||l)),!!p}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
331
+ "./color-chart/import-properties/helpers/is-map-point-layer.js");function u(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),u=r[Object(l.default)(r,e,t)?0:r.length-1],c=i.default.IDMAP.COLOR_BY_ALTERNATIVE,p=o.default.findItemByPropertyValue(u.qAttributeDimensions,"id",c);return Object(s.default)(e,Object(a.default)("dimension",!!p,p||u)),!!p}},"./color-chart/import-properties/helpers/set-color-by-measure-1.js":
332
332
  /*!*************************************************************************!*\
333
333
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-1.js ***!
334
334
  \*************************************************************************/
335
335
  /*! exports provided: default */
336
336
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
337
337
  /*! ../../../utils */
338
- "./utils/index.js"),i=r(
338
+ "./utils/index.js"),o=r(
339
339
  /*! ./get-color-by-definition */
340
- "./color-chart/import-properties/helpers/get-color-by-definition.js"),o=r(
340
+ "./color-chart/import-properties/helpers/get-color-by-definition.js"),i=r(
341
341
  /*! ./set-color-by-property-def */
342
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qMeasures"),[]),a=n.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,r.length-1),a.activeMeasureIndex>-1){var s=r[a.activeMeasureIndex],u=Object(i.default)("measure",!1,s,!0);u.activeMeasureIndex=a.activeMeasureIndex,Object(o.default)(e,u)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
342
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function a(e,t){var r=n.default.getValue(e,"".concat(t,"qMeasures"),[]),a=n.default.getValue(e,"color.byMeasureDef");if(a.activeMeasureIndex=Math.min(a.activeMeasureIndex,r.length-1),a.activeMeasureIndex>-1){var s=r[a.activeMeasureIndex],l=Object(o.default)("measure",!1,s,!0);l.activeMeasureIndex=a.activeMeasureIndex,Object(i.default)(e,l)}}},"./color-chart/import-properties/helpers/set-color-by-measure-2.js":
343
343
  /*!*************************************************************************!*\
344
344
  !*** ./color-chart/import-properties/helpers/set-color-by-measure-2.js ***!
345
345
  \*************************************************************************/
346
346
  /*! exports provided: default */
347
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return u}));var n=r(
347
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return l}));var n=r(
348
348
  /*! ../../../utils */
349
- "./utils/index.js"),i=r(
349
+ "./utils/index.js"),o=r(
350
350
  /*! ../../../utils/array-util */
351
- "./utils/array-util.js"),o=r(
351
+ "./utils/array-util.js"),i=r(
352
352
  /*! ../../../utils/attribute-expression-util */
353
353
  "./utils/attribute-expression-util/index.js"),a=r(
354
354
  /*! ./get-color-by-definition */
355
355
  "./color-chart/import-properties/helpers/get-color-by-definition.js"),s=r(
356
356
  /*! ./set-color-by-property-def */
357
- "./color-chart/import-properties/helpers/set-color-by-property-def.js");function u(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),u=n.default.getValue(e,"".concat(t,"qMeasures"),[]),l=r[r.length-1],c=o.default.IDMAP.COLOR_BY_ALTERNATIVE,p=i.default.findItemByPropertyValue(l.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!p,p||u[0])),!!p}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
357
+ "./color-chart/import-properties/helpers/set-color-by-property-def.js");function l(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),l=n.default.getValue(e,"".concat(t,"qMeasures"),[]),u=r[r.length-1],c=i.default.IDMAP.COLOR_BY_ALTERNATIVE,p=o.default.findItemByPropertyValue(u.qAttributeExpressions,"id",c);return Object(s.default)(e,Object(a.default)("measure",!!p,p||l[0])),!!p}},"./color-chart/import-properties/helpers/set-color-by-property-def.js":
358
358
  /*!****************************************************************************!*\
359
359
  !*** ./color-chart/import-properties/helpers/set-color-by-property-def.js ***!
360
360
  \****************************************************************************/
361
361
  /*! exports provided: default */
362
362
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
363
363
  /*! ../../../utils/hypercube-util */
364
- "./utils/hypercube-util.js"),i=r(
364
+ "./utils/hypercube-util.js"),o=r(
365
365
  /*! ../../../utils/number-format-util */
366
- "./utils/number-format-util.js"),o=r(
366
+ "./utils/number-format-util.js"),i=r(
367
367
  /*! ./set-alt-label */
368
- "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,r,a){var s=r?"expression":t.type,u=e.color,l=u.mode,c=n.default.getItemLabel(t);switch(Object(o.default)(e,c||""),s){case"field":l="byDimension",u.byDimDef={label:t.label||n.default.wrapFieldName(t.name),key:n.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":l="byMeasure",u.byMeasureDef={label:r||c,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":l="byDimension",u.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":l="byMeasure",u.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},u.formatting&&i.default.useMasterNumberFormat(u.formatting)}a||(u.auto=!1,u.mode=l)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
368
+ "./color-chart/import-properties/helpers/set-alt-label.js");function a(e,t,r,a){var s=r?"expression":t.type,l=e.color,u=l.mode,c=n.default.getItemLabel(t);switch(Object(i.default)(e,c||""),s){case"field":u="byDimension",l.byDimDef={label:t.label||n.default.wrapFieldName(t.name),key:n.default.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":u="byMeasure",l.byMeasureDef={label:r||c,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":u="byDimension",l.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":u="byMeasure",l.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},l.formatting&&o.default.useMasterNumberFormat(l.formatting)}a||(l.auto=!1,l.mode=u)}},"./color-chart/import-properties/helpers/should-add-color-by-expression.js":
369
369
  /*!*********************************************************************************!*\
370
370
  !*** ./color-chart/import-properties/helpers/should-add-color-by-expression.js ***!
371
371
  \*********************************************************************************/
372
372
  /*! exports provided: default */
373
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
373
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
374
374
  /*! ../../../utils */
375
- "./utils/index.js");function i(e){var t=e.shouldUpdateColorBy,r=e.properties,i=n.default.getValue(r,"qHyperCubeDef.qMeasures",[]),o=n.default.getValue(r,"color.mode","");return!t&&"byExpression"===o&&i.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
375
+ "./utils/index.js");function o(e){var t=e.shouldUpdateColorBy,r=e.properties,o=n.default.getValue(r,"qHyperCubeDef.qMeasures",[]),i=n.default.getValue(r,"color.mode","");return!t&&"byExpression"===i&&o.length>0}},"./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js":
376
376
  /*!**********************************************************************************!*\
377
377
  !*** ./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js ***!
378
378
  \**********************************************************************************/
@@ -397,9 +397,9 @@ function(e,t,r){function n(e,t){return(!e||!e.key)&&t.length>0}r.r(t),r.d(t,"def
397
397
  !*** ./color-chart/import-properties/helpers/should-switch-to-color-persistent.js ***!
398
398
  \************************************************************************************/
399
399
  /*! exports provided: default */
400
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
400
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
401
401
  /*! ../../../utils */
402
- "./utils/index.js");function i(e){var t=n.default.getValue(e,"qHyperCubeDef.qDimensions",[]),r=n.default.getValue(e,"color.persistent",!1);return t.length>1&&!r}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
402
+ "./utils/index.js");function o(e){var t=n.default.getValue(e,"qHyperCubeDef.qDimensions",[]),r=n.default.getValue(e,"color.persistent",!1);return t.length>1&&!r}},"./color-chart/import-properties/helpers/should-update-color-by-dimension.js":
403
403
  /*!***********************************************************************************!*\
404
404
  !*** ./color-chart/import-properties/helpers/should-update-color-by-dimension.js ***!
405
405
  \***********************************************************************************/
@@ -409,132 +409,132 @@ function(e,t,r){function n(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t
409
409
  !*** ./color-chart/import-properties/helpers/should-update-color-by-measure.js ***!
410
410
  \*********************************************************************************/
411
411
  /*! exports provided: default */
412
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
412
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
413
413
  /*! ../../../utils */
414
- "./utils/index.js");function i(e){var t=e.auto,r=e.colorMode,i=e.dimensions,o=e.measures,a=e.properties,s=n.default.getValue(a,"visualization");return!(t||"byMeasure"!==r||!i.length||"map"!==s&&!o.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
414
+ "./utils/index.js");function o(e){var t=e.auto,r=e.colorMode,o=e.dimensions,i=e.measures,a=e.properties,s=n.default.getValue(a,"visualization");return!(t||"byMeasure"!==r||!o.length||"map"!==s&&!i.length)}},"./color-chart/import-properties/helpers/should-update-color-by.js":
415
415
  /*!*************************************************************************!*\
416
416
  !*** ./color-chart/import-properties/helpers/should-update-color-by.js ***!
417
417
  \*************************************************************************/
418
418
  /*! exports provided: default */
419
- function(e,t,r){function n(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
419
+ function(e,t,r){function n(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,o=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!o.length))}r.r(t),r.d(t,"default",(function(){return n}))},"./color-chart/import-properties/helpers/switch-to-auto-color.js":
420
420
  /*!***********************************************************************!*\
421
421
  !*** ./color-chart/import-properties/helpers/switch-to-auto-color.js ***!
422
422
  \***********************************************************************/
423
423
  /*! exports provided: default */
424
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
424
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
425
425
  /*! ../../../utils */
426
- "./utils/index.js");function i(e){n.default.setValue(e,"color.mode","primary"),n.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
426
+ "./utils/index.js");function o(e){n.default.setValue(e,"color.mode","primary"),n.default.setValue(e,"color.auto",!0)}},"./color-chart/import-properties/helpers/update-color-by-dimension.js":
427
427
  /*!****************************************************************************!*\
428
428
  !*** ./color-chart/import-properties/helpers/update-color-by-dimension.js ***!
429
429
  \****************************************************************************/
430
430
  /*! exports provided: default */
431
431
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
432
432
  /*! ../../../utils */
433
- "./utils/index.js"),i=r(
433
+ "./utils/index.js"),o=r(
434
434
  /*! ./set-alt-label */
435
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
435
+ "./color-chart/import-properties/helpers/set-alt-label.js"),i=r(
436
436
  /*! ./resolve-color-by-property-def */
437
437
  "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
438
438
  /*! ./should-set-color-by-dimension-1 */
439
439
  "./color-chart/import-properties/helpers/should-set-color-by-dimension-1.js"),s=r(
440
440
  /*! ./should-set-color-by-dimension-2 */
441
- "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),u=r(
441
+ "./color-chart/import-properties/helpers/should-set-color-by-dimension-2.js"),l=r(
442
442
  /*! ./set-color-by-dimension-1 */
443
- "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),l=r(
443
+ "./color-chart/import-properties/helpers/set-color-by-dimension-1.js"),u=r(
444
444
  /*! ./set-color-by-dimension-2 */
445
- "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),f=n.default.getValue(e,"color.byDimDef");if(f&&Object(i.default)(e,f.label),Object(a.default)(f))Object(u.default)(e,t);else if(Object(s.default)(f)&&Object(l.default)(e,t))return;var d=n.default.getValue(e,"color.byDimDef.label");Object(o.default)({properties:e,isDimension:!0,dimensions:r,excludedDimensions:p,measures:c,label:d})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
445
+ "./color-chart/import-properties/helpers/set-color-by-dimension-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=n.default.getValue(e,"color.byDimDef");if(d&&Object(o.default)(e,d.label),Object(a.default)(d))Object(l.default)(e,t);else if(Object(s.default)(d)&&Object(u.default)(e,t))return;var f=n.default.getValue(e,"color.byDimDef.label");Object(i.default)({properties:e,isDimension:!0,dimensions:r,excludedDimensions:p,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-measure.js":
446
446
  /*!**************************************************************************!*\
447
447
  !*** ./color-chart/import-properties/helpers/update-color-by-measure.js ***!
448
448
  \**************************************************************************/
449
449
  /*! exports provided: default */
450
450
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
451
451
  /*! ../../../utils */
452
- "./utils/index.js"),i=r(
452
+ "./utils/index.js"),o=r(
453
453
  /*! ./set-alt-label */
454
- "./color-chart/import-properties/helpers/set-alt-label.js"),o=r(
454
+ "./color-chart/import-properties/helpers/set-alt-label.js"),i=r(
455
455
  /*! ./resolve-color-by-property-def */
456
456
  "./color-chart/import-properties/helpers/resolve-color-by-property-def.js"),a=r(
457
457
  /*! ./set-color-by-measure-1 */
458
458
  "./color-chart/import-properties/helpers/set-color-by-measure-1.js"),s=r(
459
459
  /*! ./set-color-by-measure-2 */
460
- "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),u=r(
460
+ "./color-chart/import-properties/helpers/set-color-by-measure-2.js"),l=r(
461
461
  /*! ./should-set-color-by-measure-1 */
462
- "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),l=r(
462
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-1.js"),u=r(
463
463
  /*! ./should-set-color-by-measure-2 */
464
- "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),f=n.default.getValue(e,"color.byMeasureDef");if(f&&Object(i.default)(e,f.label),Object(u.default)(f))Object(a.default)(e,t);else if(Object(l.default)(f,c)&&Object(s.default)(e,t))return;var d=n.default.getValue(e,"color.byMeasureDef.label");Object(o.default)({properties:e,isDimension:!1,dimensions:r,excludedDimensions:p,measures:c,label:d})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
464
+ "./color-chart/import-properties/helpers/should-set-color-by-measure-2.js");function c(e,t){var r=n.default.getValue(e,"".concat(t,"qDimensions"),[]),c=n.default.getValue(e,"".concat(t,"qMeasures"),[]),p=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),d=n.default.getValue(e,"color.byMeasureDef");if(d&&Object(o.default)(e,d.label),Object(l.default)(d))Object(a.default)(e,t);else if(Object(u.default)(d,c)&&Object(s.default)(e,t))return;var f=n.default.getValue(e,"color.byMeasureDef.label");Object(i.default)({properties:e,isDimension:!1,dimensions:r,excludedDimensions:p,measures:c,label:f})}},"./color-chart/import-properties/helpers/update-color-by-other.js":
465
465
  /*!************************************************************************!*\
466
466
  !*** ./color-chart/import-properties/helpers/update-color-by-other.js ***!
467
467
  \************************************************************************/
468
468
  /*! exports provided: default */
469
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
469
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
470
470
  /*! ../../../utils */
471
- "./utils/index.js"),i=r(
471
+ "./utils/index.js"),o=r(
472
472
  /*! ./clear-color-by-item */
473
- "./color-chart/import-properties/helpers/clear-color-by-item.js");function o(e,t){var r=n.default.getValue(e,"color.mode"),o=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"".concat(t,"qMeasures"),[]),s=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&a.length<2&&n.default.setValue(e,"color.mode","primary"),Object(i.default)(o,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
473
+ "./color-chart/import-properties/helpers/clear-color-by-item.js");function i(e,t){var r=n.default.getValue(e,"color.mode"),i=n.default.getValue(e,"".concat(t,"qDimensions"),[]),a=n.default.getValue(e,"".concat(t,"qMeasures"),[]),s=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&a.length<2&&n.default.setValue(e,"color.mode","primary"),Object(o.default)(i,s)}},"./color-chart/import-properties/helpers/update-color-by.js":
474
474
  /*!******************************************************************!*\
475
475
  !*** ./color-chart/import-properties/helpers/update-color-by.js ***!
476
476
  \******************************************************************/
477
477
  /*! exports provided: default */
478
478
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return c}));var n=r(
479
479
  /*! ../../../utils */
480
- "./utils/index.js"),i=r(
480
+ "./utils/index.js"),o=r(
481
481
  /*! ./clear-color-by-item */
482
- "./color-chart/import-properties/helpers/clear-color-by-item.js"),o=r(
482
+ "./color-chart/import-properties/helpers/clear-color-by-item.js"),i=r(
483
483
  /*! ./should-update-color-by-dimension */
484
484
  "./color-chart/import-properties/helpers/should-update-color-by-dimension.js"),a=r(
485
485
  /*! ./should-update-color-by-measure */
486
486
  "./color-chart/import-properties/helpers/should-update-color-by-measure.js"),s=r(
487
487
  /*! ./update-color-by-dimension */
488
- "./color-chart/import-properties/helpers/update-color-by-dimension.js"),u=r(
488
+ "./color-chart/import-properties/helpers/update-color-by-dimension.js"),l=r(
489
489
  /*! ./update-color-by-measure */
490
- "./color-chart/import-properties/helpers/update-color-by-measure.js"),l=r(
490
+ "./color-chart/import-properties/helpers/update-color-by-measure.js"),u=r(
491
491
  /*! ./update-color-by-other */
492
- "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var r=n.default.getValue(e,"color.mode"),c=n.default.getValue(e,"color.auto"),p=n.default.getValue(e,"".concat(t,"qDimensions"),[]),f=n.default.getValue(e,"".concat(t,"qMeasures"),[]),d=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(i.default)(p,d):Object(o.default)({auto:c,colorMode:r,dimensions:p})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:r,dimensions:p,measures:f,properties:e})?Object(u.default)(e,t):Object(l.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
492
+ "./color-chart/import-properties/helpers/update-color-by-other.js");function c(e,t){var r=n.default.getValue(e,"color.mode"),c=n.default.getValue(e,"color.auto"),p=n.default.getValue(e,"".concat(t,"qDimensions"),[]),d=n.default.getValue(e,"".concat(t,"qMeasures"),[]),f=n.default.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);c?Object(o.default)(p,f):Object(i.default)({auto:c,colorMode:r,dimensions:p})?Object(s.default)(e,t):Object(a.default)({auto:c,colorMode:r,dimensions:p,measures:d,properties:e})?Object(l.default)(e,t):Object(u.default)(e,t)}},"./color-chart/import-properties/helpers/update-layout-exclude.js":
493
493
  /*!************************************************************************!*\
494
494
  !*** ./color-chart/import-properties/helpers/update-layout-exclude.js ***!
495
495
  \************************************************************************/
496
496
  /*! exports provided: default */
497
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
497
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
498
498
  /*! ../../../utils */
499
- "./utils/index.js");function i(e,t,r){var i=e.qLayoutExclude;i&&(i.changed||(i.changed={}),i.changed[t]={from:n.default.getValue(e,t),to:r})}},"./color-chart/import-properties/index.js":
499
+ "./utils/index.js");function o(e,t,r){var o=e.qLayoutExclude;o&&(o.changed||(o.changed={}),o.changed[t]={from:n.default.getValue(e,t),to:r})}},"./color-chart/import-properties/index.js":
500
500
  /*!************************************************!*\
501
501
  !*** ./color-chart/import-properties/index.js ***!
502
502
  \************************************************/
503
503
  /*! exports provided: default */
504
504
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
505
505
  /*! ../../utils */
506
- "./utils/index.js"),i=r(
506
+ "./utils/index.js"),o=r(
507
507
  /*! ./helpers */
508
- "./color-chart/import-properties/helpers/index.js"),o=r(
508
+ "./color-chart/import-properties/helpers/index.js"),i=r(
509
509
  /*! ../../hypercube */
510
- "./hypercube/index.js");function a(e){var t=e.exportFormat,r=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,u=e.hypercubePath,l=o.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:a,defaultPropertyValues:s,hypercubePath:u}),c=l.qProperty,p=n.default.getValue(c,"visualization"),f=n.default.getValue(c,"qHyperCubeDef.qDimensions",[]),d=n.default.getValue(c,"color.mode",""),m=n.default.getValue(c,"color.auto",""),h=i.default.getCanColorBy(c,p),v=i.default.shouldUpdateColorBy({canColorBy:h,autoColor:m,colorMode:d,dimensions:f});return h[d]?i.default.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:c})&&i.default.addColorByExpression(c):i.default.switchToAutoColor(c),v&&i.default.updateColorBy(c,"qHyperCubeDef."),i.default.shouldSwitchToColorPersistent(c)&&i.default.changeProperty(c,"color.persistent",!0),i.default.deleteTotalMode(f),l}},"./color-chart/index.js":
510
+ "./hypercube/index.js");function a(e){var t=e.exportFormat,r=e.initialProperties,a=e.dataDefinition,s=e.defaultPropertyValues,l=e.hypercubePath,u=i.default.importProperties({exportFormat:t,initialProperties:r,dataDefinition:a,defaultPropertyValues:s,hypercubePath:l}),c=u.qProperty,p=n.default.getValue(c,"visualization"),d=n.default.getValue(c,"qHyperCubeDef.qDimensions",[]),f=n.default.getValue(c,"color.mode",""),m=n.default.getValue(c,"color.auto",""),h=o.default.getCanColorBy(c,p),g=o.default.shouldUpdateColorBy({canColorBy:h,autoColor:m,colorMode:f,dimensions:d});return h[f]?o.default.shouldAddColorByExpression({shouldUpdateColorBy:g,properties:c})&&o.default.addColorByExpression(c):o.default.switchToAutoColor(c),g&&o.default.updateColorBy(c,"qHyperCubeDef."),o.default.shouldSwitchToColorPersistent(c)&&o.default.changeProperty(c,"color.persistent",!0),o.default.deleteTotalMode(d),u}},"./color-chart/index.js":
511
511
  /*!******************************!*\
512
512
  !*** ./color-chart/index.js ***!
513
513
  \******************************/
514
514
  /*! exports provided: default */
515
515
  function(e,t,r){r.r(t);var n=r(
516
516
  /*! ./export-properties */
517
- "./color-chart/export-properties/index.js"),i=r(
517
+ "./color-chart/export-properties/index.js"),o=r(
518
518
  /*! ./import-properties */
519
- "./color-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./conditional-coloring.js":
519
+ "./color-chart/import-properties/index.js");t.default={exportProperties:n.default,importProperties:o.default}},"./conditional-coloring.js":
520
520
  /*!*********************************!*\
521
521
  !*** ./conditional-coloring.js ***!
522
522
  \*********************************/
523
523
  /*! exports provided: default */
524
524
  function(e,t,r){r.r(t);var n=r(
525
525
  /*! ./quarantine/quarantine-array-prop */
526
- "./quarantine/quarantine-array-prop.js"),i=r(
526
+ "./quarantine/quarantine-array-prop.js"),o=r(
527
527
  /*! ./quarantine/unquarantine-array-prop */
528
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",u="qDef.conditionalColoring";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:a,arrayName:s,itemPath:u})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,itemPath:u,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
528
+ "./quarantine/unquarantine-array-prop.js"),i="qHyperCubeDef.qMeasures",a="conditionalColoring",s="measures",l="qDef.conditionalColoring";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:i,quarantineName:a,arrayName:s,itemPath:l})},unquarantine:function(e){Object(o.default)({properties:e,arrayPath:i,itemPath:l,arrayName:s,quarantineName:a})}}},"./conditional-show.js":
529
529
  /*!*****************************!*\
530
530
  !*** ./conditional-show.js ***!
531
531
  \*****************************/
532
532
  /*! exports provided: default */
533
533
  function(e,t,r){r.r(t);var n=r(
534
534
  /*! ./quarantine/quarantine-array-prop */
535
- "./quarantine/quarantine-array-prop.js"),i=r(
535
+ "./quarantine/quarantine-array-prop.js"),o=r(
536
536
  /*! ./quarantine/unquarantine-array-prop */
537
- "./quarantine/unquarantine-array-prop.js"),o="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",u="dimensions",l="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(n.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})},unquarantine:function(e){Object(i.default)({properties:e,arrayPath:o,quarantineName:c,arrayName:a,itemPath:l}),Object(i.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:u,itemPath:l})}}},"./export-format.js":
537
+ "./quarantine/unquarantine-array-prop.js"),i="qHyperCubeDef.qMeasures",a="measures",s="qHyperCubeDef.qDimensions",l="dimensions",u="qCalcCondition",c="conditionalShowHide";t.default={quarantine:function(e){Object(n.default)({properties:e,arrayPath:i,quarantineName:c,arrayName:a,itemPath:u}),Object(n.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})},unquarantine:function(e){Object(o.default)({properties:e,arrayPath:i,quarantineName:c,arrayName:a,itemPath:u}),Object(o.default)({properties:e,arrayPath:s,quarantineName:c,arrayName:l,itemPath:u})}}},"./export-format.js":
538
538
  /*!**************************!*\
539
539
  !*** ./export-format.js ***!
540
540
  \**************************/
@@ -546,14 +546,14 @@ function(e,t,r){function n(){for(var e=arguments.length>0&&void 0!==arguments[0]
546
546
  /*! exports provided: default */
547
547
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
548
548
  /*! ../../../utils */
549
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.dimensions).push.apply(t,i(o.qDimensions));var s,u=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(s=a.excludedDimensions).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/add-measures.js":
549
+ "./utils/index.js");function o(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,i=e.qHyperCubeDef,a=r.data[0];(t=a.dimensions).push.apply(t,o(i.qDimensions));var s,l=n.default.getValue(i,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=a.excludedDimensions).push.apply(s,o(l))}},"./hypercube/export-properties/helpers/add-measures.js":
550
550
  /*!*************************************************************!*\
551
551
  !*** ./hypercube/export-properties/helpers/add-measures.js ***!
552
552
  \*************************************************************/
553
553
  /*! exports provided: default */
554
554
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
555
555
  /*! ../../../utils */
556
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,o=e.qHyperCubeDef,a=r.data[0];(t=a.measures).push.apply(t,i(o.qMeasures));var s,u=n.default.getValue(o,"qLayoutExclude.qHyperCubeDef.qMeasures");u&&(s=a.excludedMeasures).push.apply(s,i(u))}},"./hypercube/export-properties/helpers/copy-properties.js":
556
+ "./utils/index.js");function o(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t,r=e.exportFormat,i=e.qHyperCubeDef,a=r.data[0];(t=a.measures).push.apply(t,o(i.qMeasures));var s,l=n.default.getValue(i,"qLayoutExclude.qHyperCubeDef.qMeasures");l&&(s=a.excludedMeasures).push.apply(s,o(l))}},"./hypercube/export-properties/helpers/copy-properties.js":
557
557
  /*!****************************************************************!*\
558
558
  !*** ./hypercube/export-properties/helpers/copy-properties.js ***!
559
559
  \****************************************************************/
@@ -565,74 +565,74 @@ function(e,t,r){function n(e){var t=e.exportFormat,r=e.properties;Object.keys(r)
565
565
  /*! exports provided: default */
566
566
  function(e,t,r){r.r(t);var n=r(
567
567
  /*! ./add-dimensions */
568
- "./hypercube/export-properties/helpers/add-dimensions.js"),i=r(
568
+ "./hypercube/export-properties/helpers/add-dimensions.js"),o=r(
569
569
  /*! ./add-measures */
570
- "./hypercube/export-properties/helpers/add-measures.js"),o=r(
570
+ "./hypercube/export-properties/helpers/add-measures.js"),i=r(
571
571
  /*! ./set-inter-column-sort-order */
572
572
  "./hypercube/export-properties/helpers/set-inter-column-sort-order.js"),a=r(
573
573
  /*! ./copy-properties */
574
574
  "./hypercube/export-properties/helpers/copy-properties.js"),s=r(
575
575
  /*! ./update-layout-exclude */
576
- "./hypercube/export-properties/helpers/update-layout-exclude.js"),u=r(
576
+ "./hypercube/export-properties/helpers/update-layout-exclude.js"),l=r(
577
577
  /*! ./store-measures-modifiers */
578
- "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:n.default,addMeasures:i.default,setInterColumnSortOrder:o.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:u.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
578
+ "./hypercube/export-properties/helpers/store-measures-modifiers.js");t.default={addDimensions:n.default,addMeasures:o.default,setInterColumnSortOrder:i.default,copyProperties:a.default,updateLayoutExclude:s.default,storeMeasuresModifiers:l.default}},"./hypercube/export-properties/helpers/restore-changed-properties.js":
579
579
  /*!***************************************************************************!*\
580
580
  !*** ./hypercube/export-properties/helpers/restore-changed-properties.js ***!
581
581
  \***************************************************************************/
582
582
  /*! exports provided: default */
583
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
583
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
584
584
  /*! ../../../utils */
585
- "./utils/index.js");function i(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===n.default.getValue(e,t)&&n.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
585
+ "./utils/index.js");function o(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===n.default.getValue(e,t)&&n.default.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}},"./hypercube/export-properties/helpers/set-inter-column-sort-order.js":
586
586
  /*!****************************************************************************!*\
587
587
  !*** ./hypercube/export-properties/helpers/set-inter-column-sort-order.js ***!
588
588
  \****************************************************************************/
589
589
  /*! exports provided: default */
590
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
590
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
591
591
  /*! ../../../utils */
592
- "./utils/index.js"),i=r(
592
+ "./utils/index.js"),o=r(
593
593
  /*! ../../../utils/array-util */
594
- "./utils/array-util.js");function o(e){var t=e.exportFormat,r=e.qHyperCubeDef,o=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),o.interColumnSortOrder=r.qInterColumnSortOrder.concat();var a=n.default.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&i.default.isOrderedSubset(a,o.interColumnSortOrder)&&(o.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
594
+ "./utils/array-util.js");function i(e){var t=e.exportFormat,r=e.qHyperCubeDef,i=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),i.interColumnSortOrder=r.qInterColumnSortOrder.concat();var a=n.default.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");a&&o.default.isOrderedSubset(a,i.interColumnSortOrder)&&(i.interColumnSortOrder=a.concat())}},"./hypercube/export-properties/helpers/store-measures-modifiers.js":
595
595
  /*!*************************************************************************!*\
596
596
  !*** ./hypercube/export-properties/helpers/store-measures-modifiers.js ***!
597
597
  \*************************************************************************/
598
598
  /*! exports provided: default */
599
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
599
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
600
600
  /*! qlik-modifiers */
601
- "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),i=r.n(n);function o(e){e.forEach((function(e){i.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
601
+ "../node_modules/qlik-modifiers/dist/qlik-modifiers.js"),o=r.n(n);function i(e){e.forEach((function(e){o.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}},"./hypercube/export-properties/helpers/update-layout-exclude.js":
602
602
  /*!**********************************************************************!*\
603
603
  !*** ./hypercube/export-properties/helpers/update-layout-exclude.js ***!
604
604
  \**********************************************************************/
605
605
  /*! exports provided: default */
606
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
606
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
607
607
  /*! ../../../utils */
608
- "./utils/index.js"),i=r(
608
+ "./utils/index.js"),o=r(
609
609
  /*! ./restore-changed-properties */
610
- "./hypercube/export-properties/helpers/restore-changed-properties.js");function o(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(Object(i.default)(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!n.default.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude}},"./hypercube/export-properties/index.js":
610
+ "./hypercube/export-properties/helpers/restore-changed-properties.js");function i(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(Object(o.default)(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!n.default.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude}},"./hypercube/export-properties/index.js":
611
611
  /*!**********************************************!*\
612
612
  !*** ./hypercube/export-properties/index.js ***!
613
613
  \**********************************************/
614
614
  /*! exports provided: default */
615
615
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
616
616
  /*! ../../export-format */
617
- "./export-format.js"),i=r(
617
+ "./export-format.js"),o=r(
618
618
  /*! ../../utils */
619
- "./utils/index.js"),o=r(
619
+ "./utils/index.js"),i=r(
620
620
  /*! ./helpers */
621
- "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,r=e.hypercubePath,a=e.viewDataMode,s=Object(n.default)(),u=t.qProperty,l=i.default.getValue(u,r||""),c=l.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),o.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),o.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),o.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,o.default.copyProperties({exportFormat:s,properties:u}),r&&(s.properties.qHyperCubeDef=c,delete l.qHyperCubeDef),o.default.updateLayoutExclude({exportFormat:s,properties:u}),a||o.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
621
+ "./hypercube/export-properties/helpers/index.js");function a(e){var t=e.propertyTree,r=e.hypercubePath,a=e.viewDataMode,s=Object(n.default)(),l=t.qProperty,u=o.default.getValue(l,r||""),c=u.qHyperCubeDef;return c.qInterColumnSortOrder||(c.qInterColumnSortOrder=[]),i.default.addDimensions({exportFormat:s,qHyperCubeDef:c}),i.default.addMeasures({exportFormat:s,qHyperCubeDef:c}),i.default.setInterColumnSortOrder({exportFormat:s,qHyperCubeDef:c}),delete c.qLayoutExclude,i.default.copyProperties({exportFormat:s,properties:l}),r&&(s.properties.qHyperCubeDef=c,delete u.qHyperCubeDef),i.default.updateLayoutExclude({exportFormat:s,properties:l}),a||i.default.storeMeasuresModifiers(s.properties.qHyperCubeDef.qMeasures),s}},"./hypercube/import-properties/helpers/add-dimensions.js":
622
622
  /*!***************************************************************!*\
623
623
  !*** ./hypercube/import-properties/helpers/add-dimensions.js ***!
624
624
  \***************************************************************/
625
625
  /*! exports provided: default */
626
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
626
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
627
627
  /*! ./create-dimension */
628
- "./hypercube/import-properties/helpers/create-dimension.js");function i(e){var t,r=e.exportFormat,i=e.maxDimensions,o=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,u=r.data[0];for(t=0;t<u.dimensions.length;++t){var l=Object(n.default)(u.dimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(l):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<u.excludedDimensions.length;++t){var c=Object(n.default)(u.excludedDimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
628
+ "./hypercube/import-properties/helpers/create-dimension.js");function o(e){var t,r=e.exportFormat,o=e.maxDimensions,i=e.minDimensions,a=e.newHyperCubeDef,s=e.defaultDimension,l=r.data[0];for(t=0;t<l.dimensions.length;++t){var u=Object(n.default)(l.dimensions[t],s);a.qDimensions.length<o?a.qDimensions.push(u):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}for(t=0;t<l.excludedDimensions.length;++t){var c=Object(n.default)(l.excludedDimensions[t],s);a.qDimensions.length<i?a.qDimensions.push(c):a.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}}},"./hypercube/import-properties/helpers/add-measures.js":
629
629
  /*!*************************************************************!*\
630
630
  !*** ./hypercube/import-properties/helpers/add-measures.js ***!
631
631
  \*************************************************************/
632
632
  /*! exports provided: default */
633
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
633
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
634
634
  /*! ./create-measure */
635
- "./hypercube/import-properties/helpers/create-measure.js");function i(e){var t,r=e.exportFormat,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,u=r.data[0];for(t=0;t<u.measures.length;++t){var l=Object(n.default)(u.measures[t],s);a.qMeasures.length<i?a.qMeasures.push(l):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<u.excludedMeasures.length;++t){var c=Object(n.default)(u.excludedMeasures[t],s);a.qMeasures.length<o?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
635
+ "./hypercube/import-properties/helpers/create-measure.js");function o(e){var t,r=e.exportFormat,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=e.defaultMeasure,l=r.data[0];for(t=0;t<l.measures.length;++t){var u=Object(n.default)(l.measures[t],s);a.qMeasures.length<o?a.qMeasures.push(u):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}for(t=0;t<l.excludedMeasures.length;++t){var c=Object(n.default)(l.excludedMeasures[t],s);a.qMeasures.length<i?a.qMeasures.push(c):a.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}}},"./hypercube/import-properties/helpers/copy-property-if-exist.js":
636
636
  /*!***********************************************************************!*\
637
637
  !*** ./hypercube/import-properties/helpers/copy-property-if-exist.js ***!
638
638
  \***********************************************************************/
@@ -649,36 +649,36 @@ function(e,t,r){function n(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n}r.r(t),
649
649
  /*! exports provided: default */
650
650
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
651
651
  /*! extend */
652
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
652
+ "../node_modules/extend/index.js"),o=r.n(n),i=r(
653
653
  /*! ../../../utils */
654
654
  "./utils/index.js"),a=r(
655
655
  /*! ./get-others-label */
656
- "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var r=i()(!0,{},t,e);return o.default.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.default.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.default.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.default.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel=Object(a.default)()),r}},"./hypercube/import-properties/helpers/create-measure.js":
656
+ "./hypercube/import-properties/helpers/get-others-label.js");function s(e,t){var r=o()(!0,{},t,e);return i.default.getValue(r,"qOtherTotalSpec.qOtherCounted")||i.default.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.default.getValue(r,"qOtherTotalSpec.qOtherLimit")||i.default.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel=Object(a.default)()),r}},"./hypercube/import-properties/helpers/create-measure.js":
657
657
  /*!***************************************************************!*\
658
658
  !*** ./hypercube/import-properties/helpers/create-measure.js ***!
659
659
  \***************************************************************/
660
660
  /*! exports provided: default */
661
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
661
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
662
662
  /*! extend */
663
- "../node_modules/extend/index.js"),i=r.n(n);function o(e,t){return i()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
663
+ "../node_modules/extend/index.js"),o=r.n(n);function i(e,t){return o()(!0,{},t,e)}},"./hypercube/import-properties/helpers/create-new-properties.js":
664
664
  /*!**********************************************************************!*\
665
665
  !*** ./hypercube/import-properties/helpers/create-new-properties.js ***!
666
666
  \**********************************************************************/
667
667
  /*! exports provided: default */
668
668
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return s}));var n=r(
669
669
  /*! extend */
670
- "../node_modules/extend/index.js"),i=r.n(n),o=r(
670
+ "../node_modules/extend/index.js"),o=r.n(n),i=r(
671
671
  /*! ../../../utils */
672
672
  "./utils/index.js"),a=r(
673
673
  /*! ./is-master-item-property */
674
- "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=i()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.default.setValue(s,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=i()(!0,{},r,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
674
+ "./hypercube/import-properties/helpers/is-master-item-property.js");function s(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,s={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(s.qLayoutExclude.quarantine=o()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?i.default.setValue(s,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||Object(a.default)(e)?s[e]=t.properties[e]:s.qLayoutExclude.disabled[e]=t.properties[e]})),null===(s=o()(!0,{},r,s)).components&&(s.components=[]),s}},"./hypercube/import-properties/helpers/get-default-dimension.js":
675
675
  /*!**********************************************************************!*\
676
676
  !*** ./hypercube/import-properties/helpers/get-default-dimension.js ***!
677
677
  \**********************************************************************/
678
678
  /*! exports provided: default */
679
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
679
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
680
680
  /*! ./get-others-label */
681
- "./hypercube/import-properties/helpers/get-others-label.js");function i(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(n.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
681
+ "./hypercube/import-properties/helpers/get-others-label.js");function o(){return{qDef:{autoSort:!0,cId:"",othersLabel:Object(n.default)()},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}}},"./hypercube/import-properties/helpers/get-default-measure.js":
682
682
  /*!********************************************************************!*\
683
683
  !*** ./hypercube/import-properties/helpers/get-default-measure.js ***!
684
684
  \********************************************************************/
@@ -688,9 +688,9 @@ function(e,t,r){function n(){return{qDef:{autoSort:!0,cId:"",numFormatFromTempla
688
688
  !*** ./hypercube/import-properties/helpers/get-max-min-dimension-measure.js ***!
689
689
  \******************************************************************************/
690
690
  /*! exports provided: default */
691
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
691
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
692
692
  /*! ./resolve-value */
693
- "./hypercube/import-properties/helpers/resolve-value.js"),i=Math.pow(2,53)-1;function o(e){var t=e.exportFormat,r=e.dataDefinition,o=void 0===r?{}:r,a=t.data[0],s=o.dimensions||{max:0},u=o.measures||{max:0},l=Object(n.default)(u.max,a.dimensions.length,i),c=Object(n.default)(u.min,a.dimensions.length,0);return{maxDimensions:Object(n.default)(s.max,l,i),minDimensions:Object(n.default)(s.min,c,0),maxMeasures:l,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
693
+ "./hypercube/import-properties/helpers/resolve-value.js"),o=Math.pow(2,53)-1;function i(e){var t=e.exportFormat,r=e.dataDefinition,i=void 0===r?{}:r,a=t.data[0],s=i.dimensions||{max:0},l=i.measures||{max:0},u=Object(n.default)(l.max,a.dimensions.length,o),c=Object(n.default)(l.min,a.dimensions.length,0);return{maxDimensions:Object(n.default)(s.max,u,o),minDimensions:Object(n.default)(s.min,c,0),maxMeasures:u,minMeasures:c}}},"./hypercube/import-properties/helpers/get-others-label.js":
694
694
  /*!*****************************************************************!*\
695
695
  !*** ./hypercube/import-properties/helpers/get-others-label.js ***!
696
696
  \*****************************************************************/
@@ -700,47 +700,47 @@ function(e,t,r){function n(){return"Others"}r.r(t),r.d(t,"default",(function(){r
700
700
  !*** ./hypercube/import-properties/helpers/import-common-properties.js ***!
701
701
  \*************************************************************************/
702
702
  /*! exports provided: default */
703
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
703
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
704
704
  /*! ../../../utils */
705
- "./utils/index.js");function i(e,t,r){var i="masterobject"===n.default.getValue(t,"properties.qInfo.qType")?"masterobject":n.default.getValue(r,"qInfo.qType");n.default.setValue(e,"qInfo.qType",i),e.visualization=r.visualization}},"./hypercube/import-properties/helpers/index.js":
705
+ "./utils/index.js");function o(e,t,r){var o="masterobject"===n.default.getValue(t,"properties.qInfo.qType")?"masterobject":n.default.getValue(r,"qInfo.qType");n.default.setValue(e,"qInfo.qType",o),e.visualization=r.visualization}},"./hypercube/import-properties/helpers/index.js":
706
706
  /*!******************************************************!*\
707
707
  !*** ./hypercube/import-properties/helpers/index.js ***!
708
708
  \******************************************************/
709
709
  /*! exports provided: default */
710
710
  function(e,t,r){r.r(t);var n=r(
711
711
  /*! ./import-common-properties */
712
- "./hypercube/import-properties/helpers/import-common-properties.js"),i=r(
712
+ "./hypercube/import-properties/helpers/import-common-properties.js"),o=r(
713
713
  /*! ./copy-property-if-exist */
714
- "./hypercube/import-properties/helpers/copy-property-if-exist.js"),o=r(
714
+ "./hypercube/import-properties/helpers/copy-property-if-exist.js"),i=r(
715
715
  /*! ./copy-property-or-set-default */
716
716
  "./hypercube/import-properties/helpers/copy-property-or-set-default.js"),a=r(
717
717
  /*! ./get-default-dimension */
718
718
  "./hypercube/import-properties/helpers/get-default-dimension.js"),s=r(
719
719
  /*! ./get-default-measure */
720
- "./hypercube/import-properties/helpers/get-default-measure.js"),u=r(
720
+ "./hypercube/import-properties/helpers/get-default-measure.js"),l=r(
721
721
  /*! ./add-dimensions */
722
- "./hypercube/import-properties/helpers/add-dimensions.js"),l=r(
722
+ "./hypercube/import-properties/helpers/add-dimensions.js"),u=r(
723
723
  /*! ./add-measures */
724
724
  "./hypercube/import-properties/helpers/add-measures.js"),c=r(
725
725
  /*! ./get-max-min-dimension-measure */
726
726
  "./hypercube/import-properties/helpers/get-max-min-dimension-measure.js"),p=r(
727
727
  /*! ./set-inter-column-sort-order */
728
- "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),f=r(
728
+ "./hypercube/import-properties/helpers/set-inter-column-sort-order.js"),d=r(
729
729
  /*! ./create-new-properties */
730
- "./hypercube/import-properties/helpers/create-new-properties.js"),d=r(
730
+ "./hypercube/import-properties/helpers/create-new-properties.js"),f=r(
731
731
  /*! ./should-init-layout-exclude */
732
732
  "./hypercube/import-properties/helpers/should-init-layout-exclude.js"),m=r(
733
733
  /*! ./init-layout-exclude */
734
734
  "./hypercube/import-properties/helpers/init-layout-exclude.js"),h=r(
735
735
  /*! ./update-dimensions-on-added */
736
- "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),v=r(
736
+ "./hypercube/import-properties/helpers/update-dimensions-on-added.js"),g=r(
737
737
  /*! ./update-measures-on-added */
738
- "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:n.default,copyPropertyIfExist:i.default,copyPropertyOrSetDefault:o.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:u.default,addMeasures:l.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:p.default,createNewProperties:f.default,shouldInitLayoutExclude:d.default,initLayoutExclude:m.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:v.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
738
+ "./hypercube/import-properties/helpers/update-measures-on-added.js");t.default={importCommonProperties:n.default,copyPropertyIfExist:o.default,copyPropertyOrSetDefault:i.default,getDefaultDimension:a.default,getDefaultMeasure:s.default,addDimensions:l.default,addMeasures:u.default,getMaxMinDimensionMeasure:c.default,setInterColumnSortOrder:p.default,createNewProperties:d.default,shouldInitLayoutExclude:f.default,initLayoutExclude:m.default,updateDimensionsOnAdded:h.default,updateMeasuresOnAdded:g.default}},"./hypercube/import-properties/helpers/init-layout-exclude.js":
739
739
  /*!********************************************************************!*\
740
740
  !*** ./hypercube/import-properties/helpers/init-layout-exclude.js ***!
741
741
  \********************************************************************/
742
742
  /*! exports provided: default */
743
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
743
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=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>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/is-master-item-property.js":
744
744
  /*!************************************************************************!*\
745
745
  !*** ./hypercube/import-properties/helpers/is-master-item-property.js ***!
746
746
  \************************************************************************/
@@ -755,69 +755,69 @@ function(e,t,r){function n(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+
755
755
  !*** ./hypercube/import-properties/helpers/set-inter-column-sort-order.js ***!
756
756
  \****************************************************************************/
757
757
  /*! exports provided: default */
758
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
758
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
759
759
  /*! ../../../utils/array-util */
760
- "./utils/array-util.js");function i(e){var t=e.exportFormat,r=e.newHyperCubeDef,i=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=i.interColumnSortOrder.concat();var a=r.qInterColumnSortOrder.length;if(a!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=i.interColumnSortOrder.concat());a!==o;)a<o?(n.default.indexAdded(r.qInterColumnSortOrder,a),++a):(--a,n.default.indexRemoved(r.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
760
+ "./utils/array-util.js");function o(e){var t=e.exportFormat,r=e.newHyperCubeDef,o=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=o.interColumnSortOrder.concat();var a=r.qInterColumnSortOrder.length;if(a!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=o.interColumnSortOrder.concat());a!==i;)a<i?(n.default.indexAdded(r.qInterColumnSortOrder,a),++a):(--a,n.default.indexRemoved(r.qInterColumnSortOrder,a))}},"./hypercube/import-properties/helpers/should-init-layout-exclude.js":
761
761
  /*!***************************************************************************!*\
762
762
  !*** ./hypercube/import-properties/helpers/should-init-layout-exclude.js ***!
763
763
  \***************************************************************************/
764
764
  /*! exports provided: default */
765
- function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
765
+ function(e,t,r){function n(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!r&&a.dimensions.length>0}r.r(t),r.d(t,"default",(function(){return n}))},"./hypercube/import-properties/helpers/update-dimensions-on-added.js":
766
766
  /*!***************************************************************************!*\
767
767
  !*** ./hypercube/import-properties/helpers/update-dimensions-on-added.js ***!
768
768
  \***************************************************************************/
769
769
  /*! exports provided: default */
770
770
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
771
771
  /*! ../../../utils */
772
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
772
+ "./utils/index.js");function o(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=n.default.getValue(t,i||"").qHyperCubeDef,s=o(a.qDimensions);a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,t)}))}}},"./hypercube/import-properties/helpers/update-measures-on-added.js":
773
773
  /*!*************************************************************************!*\
774
774
  !*** ./hypercube/import-properties/helpers/update-measures-on-added.js ***!
775
775
  \*************************************************************************/
776
776
  /*! exports provided: default */
777
777
  function(e,t,r){r.r(t),r.d(t,"default",(function(){return a}));var n=r(
778
778
  /*! ../../../utils */
779
- "./utils/index.js");function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=n.default.getValue(t,o||"").qHyperCubeDef,s=i(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
779
+ "./utils/index.js");function o(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){var t=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=n.default.getValue(t,i||"").qHyperCubeDef,s=o(a.qMeasures);a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,t)}))}}},"./hypercube/import-properties/index.js":
780
780
  /*!**********************************************!*\
781
781
  !*** ./hypercube/import-properties/index.js ***!
782
782
  \**********************************************/
783
783
  /*! exports provided: default */
784
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
784
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
785
785
  /*! ../../utils */
786
- "./utils/index.js"),i=r(
786
+ "./utils/index.js"),o=r(
787
787
  /*! ./helpers */
788
- "./hypercube/import-properties/helpers/index.js");function o(e){var t=e.exportFormat,r=e.initialProperties,o=void 0===r?{}:r,a=e.dataDefinition,s=void 0===a?{}:a,u=e.defaultPropertyValues,l=void 0===u?{}:u,c=e.hypercubePath,p={qChildren:[]},f=i.default.createNewProperties({exportFormat:t,initialProperties:o,hypercubePath:c}),d=n.default.getValue(o,c||"").qHyperCubeDef,m=n.default.getValue(f,c||"").qHyperCubeDef,h=i.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),v=h.maxDimensions,g=h.minDimensions,y=h.maxMeasures,b=h.minMeasures,x=l.defaultDimension,q=void 0===x?i.default.getDefaultDimension():x,D=l.defaultMeasure,C=void 0===D?i.default.getDefaultMeasure():D;return m.qDimensions.length=0,m.qMeasures.length=0,i.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b})&&i.default.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:g,maxMeasures:y,minMeasures:b,newHyperCubeDef:m}),i.default.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:g,newHyperCubeDef:m,defaultDimension:q}),i.default.addMeasures({exportFormat:t,maxMeasures:y,minMeasures:b,newHyperCubeDef:m,defaultMeasure:C}),i.default.updateDimensionsOnAdded({newProperties:f,dataDefinition:s,hypercubePath:c}),i.default.updateMeasuresOnAdded({newProperties:f,dataDefinition:s,hypercubePath:c}),i.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:m}),i.default.copyPropertyIfExist("qMaxStackedCells",d,m),i.default.copyPropertyIfExist("qNoOfLeftDims",d,m),i.default.copyPropertyOrSetDefault("qInitialDataFetch",d,m,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),i.default.copyPropertyOrSetDefault("qMode",d,m,"S"),i.default.copyPropertyOrSetDefault("qReductionMode",d,m,"N"),i.default.copyPropertyOrSetDefault("qSortbyYValue",d,m),i.default.copyPropertyOrSetDefault("qIndentMode",d,m),i.default.copyPropertyOrSetDefault("qShowTotalsAbove",d,m),i.default.importCommonProperties(f,t,o),p.qProperty=f,p}},"./hypercube/index.js":
788
+ "./hypercube/import-properties/helpers/index.js");function i(e){var t=e.exportFormat,r=e.initialProperties,i=void 0===r?{}:r,a=e.dataDefinition,s=void 0===a?{}:a,l=e.defaultPropertyValues,u=void 0===l?{}:l,c=e.hypercubePath,p={qChildren:[]},d=o.default.createNewProperties({exportFormat:t,initialProperties:i,hypercubePath:c}),f=n.default.getValue(i,c||"").qHyperCubeDef,m=n.default.getValue(d,c||"").qHyperCubeDef,h=o.default.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:s}),g=h.maxDimensions,y=h.minDimensions,v=h.maxMeasures,b=h.minMeasures,x=u.defaultDimension,q=void 0===x?o.default.getDefaultDimension():x,D=u.defaultMeasure,C=void 0===D?o.default.getDefaultMeasure():D;return m.qDimensions.length=0,m.qMeasures.length=0,o.default.shouldInitLayoutExclude({exportFormat:t,maxDimensions:g,minDimensions:y,maxMeasures:v,minMeasures:b})&&o.default.initLayoutExclude({exportFormat:t,maxDimensions:g,minDimensions:y,maxMeasures:v,minMeasures:b,newHyperCubeDef:m}),o.default.addDimensions({exportFormat:t,maxDimensions:g,minDimensions:y,newHyperCubeDef:m,defaultDimension:q}),o.default.addMeasures({exportFormat:t,maxMeasures:v,minMeasures:b,newHyperCubeDef:m,defaultMeasure:C}),o.default.updateDimensionsOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),o.default.updateMeasuresOnAdded({newProperties:d,dataDefinition:s,hypercubePath:c}),o.default.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:m}),o.default.copyPropertyIfExist("qMaxStackedCells",f,m),o.default.copyPropertyIfExist("qNoOfLeftDims",f,m),o.default.copyPropertyOrSetDefault("qInitialDataFetch",f,m,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),o.default.copyPropertyOrSetDefault("qMode",f,m,"S"),o.default.copyPropertyOrSetDefault("qReductionMode",f,m,"N"),o.default.copyPropertyOrSetDefault("qSortbyYValue",f,m),o.default.copyPropertyOrSetDefault("qIndentMode",f,m),o.default.copyPropertyOrSetDefault("qShowTotalsAbove",f,m),o.default.importCommonProperties(d,t,i),p.qProperty=d,p}},"./hypercube/index.js":
789
789
  /*!****************************!*\
790
790
  !*** ./hypercube/index.js ***!
791
791
  \****************************/
792
792
  /*! exports provided: default */
793
793
  function(e,t,r){r.r(t);var n=r(
794
794
  /*! ./export-properties */
795
- "./hypercube/export-properties/index.js"),i=r(
795
+ "./hypercube/export-properties/index.js"),o=r(
796
796
  /*! ./import-properties */
797
- "./hypercube/import-properties/index.js");t.default={exportProperties:n.default,importProperties:i.default}},"./index.js":
797
+ "./hypercube/import-properties/index.js");t.default={exportProperties:n.default,importProperties:o.default}},"./index.js":
798
798
  /*!******************!*\
799
799
  !*** ./index.js ***!
800
800
  \******************/
801
801
  /*! exports provided: default */
802
802
  function(e,t,r){r.r(t);var n=r(
803
803
  /*! ./hypercube */
804
- "./hypercube/index.js"),i=r(
804
+ "./hypercube/index.js"),o=r(
805
805
  /*! ./color-chart */
806
- "./color-chart/index.js"),o=r(
806
+ "./color-chart/index.js"),i=r(
807
807
  /*! ./axis-chart */
808
808
  "./axis-chart/index.js"),a=r(
809
809
  /*! ./quarantine/quarantine-property */
810
810
  "./quarantine/quarantine-property.js"),s=r(
811
811
  /*! ./quarantine/unquarantine-property */
812
- "./quarantine/unquarantine-property.js"),u=r(
812
+ "./quarantine/unquarantine-property.js"),l=r(
813
813
  /*! ./quarantine/quarantine-array-prop */
814
- "./quarantine/quarantine-array-prop.js"),l=r(
814
+ "./quarantine/quarantine-array-prop.js"),u=r(
815
815
  /*! ./quarantine/unquarantine-array-prop */
816
816
  "./quarantine/unquarantine-array-prop.js"),c=r(
817
817
  /*! ./conditional-coloring */
818
818
  "./conditional-coloring.js"),p=r(
819
819
  /*! ./conditional-show */
820
- "./conditional-show.js");t.default={hypercube:n.default,colorChart:i.default,axisChart:o.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:u.default,unquarantineArrayProp:l.default,conditionalColoring:c.default,conditionalShow:p.default}},"./quarantine/get-quarantine-path.js":
820
+ "./conditional-show.js");t.default={hypercube:n.default,colorChart:o.default,axisChart:i.default,quarantineProperty:a.default,unquarantineProperty:s.default,quarantineArrayProp:l.default,unquarantineArrayProp:u.default,conditionalColoring:c.default,conditionalShow:p.default}},"./quarantine/get-quarantine-path.js":
821
821
  /*!*******************************************!*\
822
822
  !*** ./quarantine/get-quarantine-path.js ***!
823
823
  \*******************************************/
@@ -827,75 +827,75 @@ function(e,t,r){function n(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".
827
827
  !*** ./quarantine/quarantine-array-item.js ***!
828
828
  \*********************************************/
829
829
  /*! exports provided: default */
830
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
830
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
831
831
  /*! ../utils */
832
- "./utils/index.js"),i=r(
832
+ "./utils/index.js"),o=r(
833
833
  /*! ./get-quarantine-path */
834
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=n.default.getValue(a,s);if(void 0!==u){var l=n.default.getValue(a,"qDef.cId");l||(l=n.default.generateId(),n.default.setValue(a,"qDef.cId",l));var c=Object(i.default)(r,o,l);n.default.setValue(t,c,u),n.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
834
+ "./quarantine/get-quarantine-path.js");function i(e){var t=e.properties,r=e.quarantineName,i=e.arrayName,a=e.item,s=e.itemPath,l=n.default.getValue(a,s);if(void 0!==l){var u=n.default.getValue(a,"qDef.cId");u||(u=n.default.generateId(),n.default.setValue(a,"qDef.cId",u));var c=Object(o.default)(r,i,u);n.default.setValue(t,c,l),n.default.setValue(a,s,void 0)}}},"./quarantine/quarantine-array-prop.js":
835
835
  /*!*********************************************!*\
836
836
  !*** ./quarantine/quarantine-array-prop.js ***!
837
837
  \*********************************************/
838
838
  /*! exports provided: default */
839
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
839
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
840
840
  /*! ../utils */
841
- "./utils/index.js"),i=r(
841
+ "./utils/index.js"),o=r(
842
842
  /*! ./quarantine-array-item */
843
- "./quarantine/quarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
843
+ "./quarantine/quarantine-array-item.js");function i(e){var t=e.properties,r=e.arrayPath,i=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(o.default)({properties:t,quarantineName:i,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/quarantine-property.js":
844
844
  /*!*******************************************!*\
845
845
  !*** ./quarantine/quarantine-property.js ***!
846
846
  \*******************************************/
847
847
  /*! exports provided: default */
848
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
848
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
849
849
  /*! ../utils */
850
- "./utils/index.js");function i(e,t,r){var i,o,a=n.default.getValue(e,t);if(!n.default.isAtomicValue(a))try{if((o=(o=(i=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(i)}catch(e){return}n.default.getValue(e,"qLayoutExclude.quarantine")||n.default.setValue(e,"qLayoutExclude.quarantine",{});var s=n.default.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}},"./quarantine/unquarantine-array-item.js":
850
+ "./utils/index.js");function o(e,t,r){var o,i,a=n.default.getValue(e,t);if(!n.default.isAtomicValue(a))try{if((i=(i=(o=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(o)}catch(e){return}n.default.getValue(e,"qLayoutExclude.quarantine")||n.default.setValue(e,"qLayoutExclude.quarantine",{});var s=n.default.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}},"./quarantine/unquarantine-array-item.js":
851
851
  /*!***********************************************!*\
852
852
  !*** ./quarantine/unquarantine-array-item.js ***!
853
853
  \***********************************************/
854
854
  /*! exports provided: default */
855
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
855
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
856
856
  /*! ../utils */
857
- "./utils/index.js"),i=r(
857
+ "./utils/index.js"),o=r(
858
858
  /*! ./get-quarantine-path */
859
- "./quarantine/get-quarantine-path.js");function o(e){var t=e.properties,r=e.quarantineName,o=e.arrayName,a=e.item,s=e.itemPath,u=n.default.getValue(a,"qDef.cId");if(u){var l=Object(i.default)(r,o,u),c=n.default.getValue(t,l);void 0!==c&&(n.default.setValue(a,s,c),n.default.setValue(t,l,void 0))}}},"./quarantine/unquarantine-array-prop.js":
859
+ "./quarantine/get-quarantine-path.js");function i(e){var t=e.properties,r=e.quarantineName,i=e.arrayName,a=e.item,s=e.itemPath,l=n.default.getValue(a,"qDef.cId");if(l){var u=Object(o.default)(r,i,l),c=n.default.getValue(t,u);void 0!==c&&(n.default.setValue(a,s,c),n.default.setValue(t,u,void 0))}}},"./quarantine/unquarantine-array-prop.js":
860
860
  /*!***********************************************!*\
861
861
  !*** ./quarantine/unquarantine-array-prop.js ***!
862
862
  \***********************************************/
863
863
  /*! exports provided: default */
864
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
864
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
865
865
  /*! ../utils */
866
- "./utils/index.js"),i=r(
866
+ "./utils/index.js"),o=r(
867
867
  /*! ./unquarantine-array-item */
868
- "./quarantine/unquarantine-array-item.js");function o(e){var t=e.properties,r=e.arrayPath,o=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(i.default)({properties:t,quarantineName:o,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
868
+ "./quarantine/unquarantine-array-item.js");function i(e){var t=e.properties,r=e.arrayPath,i=e.quarantineName,a=e.arrayName,s=e.itemPath;n.default.getValue(t,r,[]).forEach((function(e){return Object(o.default)({properties:t,quarantineName:i,arrayName:a,item:e,itemPath:s})}))}},"./quarantine/unquarantine-property.js":
869
869
  /*!*********************************************!*\
870
870
  !*** ./quarantine/unquarantine-property.js ***!
871
871
  \*********************************************/
872
872
  /*! exports provided: default */
873
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
873
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
874
874
  /*! ../utils */
875
- "./utils/index.js");function i(e,t){var r=n.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){n.default.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
875
+ "./utils/index.js");function o(e,t){var r=n.default.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){n.default.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}},"./utils/array-util.js":
876
876
  /*!*****************************!*\
877
877
  !*** ./utils/array-util.js ***!
878
878
  \*****************************/
879
879
  /*! exports provided: default */
880
880
  function(e,t,r){r.r(t);var n=r(
881
881
  /*! ./find-item-by-property-value */
882
- "./utils/find-item-by-property-value.js"),i=r(
882
+ "./utils/find-item-by-property-value.js"),o=r(
883
883
  /*! ./find-index-by-property-value */
884
- "./utils/find-index-by-property-value.js");t.default={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:n.default,findIndexByPropertyValue:i.default}},"./utils/attribute-expression-util/create.js":
884
+ "./utils/find-index-by-property-value.js");t.default={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var o=e.indexOf(t[n]);if(r>o)return!1;r=o}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:n.default,findIndexByPropertyValue:o.default}},"./utils/attribute-expression-util/create.js":
885
885
  /*!***************************************************!*\
886
886
  !*** ./utils/attribute-expression-util/create.js ***!
887
887
  \***************************************************/
888
888
  /*! exports provided: default */
889
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function i(e,t){if(!e||!n[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r}},"./utils/attribute-expression-util/index.js":
889
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function o(e,t){if(!e||!n[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r}},"./utils/attribute-expression-util/index.js":
890
890
  /*!**************************************************!*\
891
891
  !*** ./utils/attribute-expression-util/index.js ***!
892
892
  \**************************************************/
893
893
  /*! exports provided: default */
894
894
  function(e,t,r){r.r(t);var n=r(
895
895
  /*! ./create */
896
- "./utils/attribute-expression-util/create.js"),i=r(
896
+ "./utils/attribute-expression-util/create.js"),o=r(
897
897
  /*! ./move-by-id-from-group */
898
- "./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:n.default,moveByIdFromGroup:i.default,IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}}},"./utils/attribute-expression-util/is-size-changed.js":
898
+ "./utils/attribute-expression-util/move-by-id-from-group.js");t.default={create:n.default,moveByIdFromGroup:o.default,IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}}},"./utils/attribute-expression-util/is-size-changed.js":
899
899
  /*!************************************************************!*\
900
900
  !*** ./utils/attribute-expression-util/is-size-changed.js ***!
901
901
  \************************************************************/
@@ -905,18 +905,18 @@ function(e,t,r){function n(e,t){return e.length!==t}r.r(t),r.d(t,"default",(func
905
905
  !*** ./utils/attribute-expression-util/move-by-id-from-group.js ***!
906
906
  \******************************************************************/
907
907
  /*! exports provided: default */
908
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
908
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
909
909
  /*! ./move-by-id */
910
- "./utils/attribute-expression-util/move-by-id.js"),i=r(
910
+ "./utils/attribute-expression-util/move-by-id.js"),o=r(
911
911
  /*! ./is-size-changed */
912
- "./utils/attribute-expression-util/is-size-changed.js");function o(e,t,r,o,a){r=r||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var u=e[s][r],l=t.length;if(Object(n.default)(u,t,o,a),Object(i.default)(t,l))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
912
+ "./utils/attribute-expression-util/is-size-changed.js");function i(e,t,r,i,a){r=r||"qAttributeExpressions",a=a||"id";for(var s=0;s<e.length;s++){var l=e[s][r],u=t.length;if(Object(n.default)(l,t,i,a),Object(o.default)(t,u))return t}return t}},"./utils/attribute-expression-util/move-by-id.js":
913
913
  /*!*******************************************************!*\
914
914
  !*** ./utils/attribute-expression-util/move-by-id.js ***!
915
915
  \*******************************************************/
916
916
  /*! exports provided: default */
917
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
917
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
918
918
  /*! ../find-index-by-property-value */
919
- "./utils/find-index-by-property-value.js");function i(e,t,r,i){t=t||[];var o=Object(n.default)(e,i,r),a=Object(n.default)(t,i,r);if(-1!==o&&-1===a){var s=e.splice(o,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
919
+ "./utils/find-index-by-property-value.js");function o(e,t,r,o){t=t||[];var i=Object(n.default)(e,o,r),a=Object(n.default)(t,o,r);if(-1!==i&&-1===a){var s=e.splice(i,1);t.push(s[0])}return t}},"./utils/find-index-by-property-value.js":
920
920
  /*!***********************************************!*\
921
921
  !*** ./utils/find-index-by-property-value.js ***!
922
922
  \***********************************************/
@@ -931,16 +931,16 @@ function(e,t,r){function n(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===
931
931
  !*** ./utils/generate-id.js ***!
932
932
  \******************************/
933
933
  /*! exports provided: default */
934
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
934
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
935
935
  /*! ./get-base62 */
936
- "./utils/get-base62.js");function i(){return Object(n.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
936
+ "./utils/get-base62.js");function o(){return Object(n.default)(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},"./utils/get-base62.js":
937
937
  /*!*****************************!*\
938
938
  !*** ./utils/get-base62.js ***!
939
939
  \*****************************/
940
940
  /*! exports provided: default */
941
- function(e,t,r){r.r(t),r.d(t,"default",(function(){return i}));var n=r(
941
+ function(e,t,r){r.r(t),r.d(t,"default",(function(){return o}));var n=r(
942
942
  /*! ./get-char */
943
- "./utils/get-char.js");function i(e){var t=Object(n.default)(e%62),r=Math.floor(e/62);return r>0?i(r)+t:t}},"./utils/get-char.js":
943
+ "./utils/get-char.js");function o(e){var t=Object(n.default)(e%62),r=Math.floor(e/62);return r>0?o(r)+t:t}},"./utils/get-char.js":
944
944
  /*!***************************!*\
945
945
  !*** ./utils/get-char.js ***!
946
946
  \***************************/
@@ -952,16 +952,16 @@ function(e,t,r){function n(e){var t,r=e;return r>9?(t=65+r-10)>90&&(t+=6):r="".c
952
952
  /*! exports provided: default */
953
953
  function(e,t,r){r.r(t);var n=r(
954
954
  /*! . */
955
- "./utils/index.js"),i=r(
955
+ "./utils/index.js"),o=r(
956
956
  /*! ./wrap-file-name */
957
- "./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return n.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return n.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:i.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
957
+ "./utils/wrap-file-name.js");t.default={getNumDimensions:function(e){return n.default.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return n.default.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:o.default,getItemLabel:function(e){return e.label||e.name}}},"./utils/index.js":
958
958
  /*!************************!*\
959
959
  !*** ./utils/index.js ***!
960
960
  \************************/
961
961
  /*! exports provided: default */
962
962
  function(e,t,r){r.r(t);var n=r(
963
963
  /*! ./generate-id */
964
- "./utils/generate-id.js");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:n.default}},"./utils/number-format-util.js":
964
+ "./utils/generate-id.js");function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.default={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(""!==a){if(void 0===o[a]||null===o[a])return r;o=o[a]}}return o},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:n.default}},"./utils/number-format-util.js":
965
965
  /*!*************************************!*\
966
966
  !*** ./utils/number-format-util.js ***!
967
967
  \*************************************/
@@ -971,4 +971,4 @@ function(e,t,r){r.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
971
971
  !*** ./utils/wrap-file-name.js ***!
972
972
  \*********************************/
973
973
  /*! exports provided: default */
974
- function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}})),Np=function(e,t,r){if(t){var n,i=t.split("."),o=e,a=i[i.length-1];for(n=0;n<i.length-1;++n)null==o[i[n]]&&(o[i[n]]=Number.isNaN(+i[n+1])?{}:[]),o=o[i[n]];void 0!==r?o[a]=r:delete o[a]}},Rp=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(null==o[i[n]])return r;o=o[i[n]]}return o},Fp=function(e){return Rp(e,"qHyperCubeDef.qMeasures.length",0)};var _p={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return Fp(e)>=1}},showLegend:function(e){var t=Rp(e,"color.auto"),r=Rp(e,"color.expressionIsColor"),n=Rp(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:function(e){return!Rp(e,"color.auto")&&"byDimension"===Rp(e,"color.mode")},useDimValColShow:function(e){return void 0===Rp(e,"color.useDimColVal")&&Np(e,"color.useDimColVal",!1),!Rp(e,"color.auto")&&"byDimension"===Rp(e,"color.mode")&&"libraryItem"===Rp(e,"color.byDimDef.type")}},Vp=function(e){var t=_p.colorModeOptions,r=_p.persistentColorsShow,n=_p.useDimValColShow,i=_p.showLegend;this.color={colorMode:{options:function(r){var n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),n.push({value:"primary",translation:"properties.colorMode.primary"}),n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:function(e){return n(e)?r(e)&&!Rp(e,"color.useDimColVal"):r(e)}},useDimColVal:{show:n}},this.legend={show:i,showTitle:{show:function(e){var t=Rp(e,"color.auto");return Rp(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===Rp(e,"color.mode")&&!0===Rp(e,"color.expressionIsColor")}(e))}},dock:{show:function(e){return Rp(e,"legend.show")&&i(e)}}}};function Hp(e){return new Vp(e)}var zp=Hp("hard");var Up=function(e){return{uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:function(e){return"none"!==e.style.strokeWidth}},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:function(e,t,r){return r.layout.donut.showAsDonut}}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:function(e){return!e.dataPoint.auto}},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:function(e){return!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:zp.color.colorMode.options},persistentColors:{show:zp.color.persistentColors.show}}},legend:{show:zp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:zp.legend.showTitle.show},dock:{show:zp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},Bp={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.properties;return n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}}},Wp={uses:"sorting"},Yp={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Kp(e){return{type:"items",component:"accordion",items:{data:Bp,sorting:Wp,addons:Yp,settings:Up(e)}}}var $p=Hp("explore"),Jp=Kp(),Zp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Jp.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Jp.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue:function(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:function(e){return e.dataPoint.auto?"":e.dataPoint.labelMode}}}}}},color:{uses:"color",items:{mode:{options:$p.color.colorMode.options},dimension:{items:{persistentColors:{show:function(e){return!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&$p.color.useDimColVal.show(e))}}}}}}}};function Gp(e,t){var r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Xp(e){return e.data.num.label}function Qp(e){return e.data.radius.label}function ef(e,t,r,n){return function(e,t){return e.dataPoint.auto?1===e.qHyperCube.qSize.qcy?Xp:Gp:"share"===e.dataPoint.labelMode?Gp:"value"===e.dataPoint.labelMode&&t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Qp:Xp}(r,n)(e,t)}function tf(e){var t,r,n,i;return e.data.label?(r=e.data.label,n=20,(i=r).length>n&&(i="".concat(i.substr(0,n-3),"...")),t=i):t="",t}var rf=function(){function e(t){var r=t.element,n=t.properties,i=t.effectHelper,o=t.Flag;H(this,e),this.element=r,this.Flag=o,i.initFade(this.element);var a=r.find(".effectLayer");a.length>0&&a.remove(),r.append('<div class="effectLayer"></div>'),this.effectLayer=r.find(".effectLayer"),this._effectProperties=n,this.selectedIndex=n.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,i.fadeIn(this.element)}return U(e,[{key:"updateOrigSettings",value:function(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}},{key:"updateFlags",value:function(e,t){var r=this,n=this.chart.getAffectedShapes("highlight"),i=this.effectLayer[0].getBoundingClientRect(),o=n.map((function(n){var o=n.desc.slice,a=o.start,s=o.end,u=o.outerRadius,l=o.offset,c=r.chart.component(n.key).rect.scaleRatio,p=n.element.getBoundingClientRect(),f=(a+s)/2,d=p.left-i.left+c.x*(l.x+u*Math.sin(f)),m=p.top-i.top+c.y*(l.y-u*Math.cos(f)),h=Math.cos(f)>0?"top":"bottom",v=Math.sin(f)>0?"right":"left";return{title:tf(n),label:ef(n,r.chart.formatter,e,t),orientation:"".concat(h).concat(v),position:{x:d,y:m}}}));this.Flag.show(this.effectLayer,o)}},{key:"init",value:function(e,t,r,n){var i=this;return t.getProperties().then((function(e){if(!e.originalModelSettings){var o=me(!0,{},e);e.originalModelSettings=i.updateOrigSettings(o)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}},{key:"remove",value:function(e,t,r){return e.options=me(e.options,{effect:null}),r?t.getProperties().then((function(e){return me(e,{effectPath:null,effectProperties:null,dataPoint:me(!0,{},e.originalModelSettings.dataPoint),legend:me(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle})})):Promise.resolve()}}]),e}(),nf=function(e){Y(r,rf);var t=X(r);function r(){return H(this,r),t.apply(this,arguments)}return U(r,[{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===i.max?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,i=[],o=[1/0,-1],a=[-1/0,-1];t.forEach((function(e,t){var i=e.num.value;r&&i<o[0]&&(o=[i,t]),n&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((function(e){return{key:"qHyperCube/qDimensionInfo/0",value:e}})))}}]),r}();var of=function(e){Y(r,rf);var t=X(r);function r(e){var n;return H(this,r),(n=t.call(this,e)).hasPropertiesPanel=!0,n.propsTemplate=e.highlightValuePropsTemplate,n.effectHelper=e.effectHelper,n}return U(r,[{key:"onClick",value:function(e){if(this.chart){var t=this.chart.shapesAt(function(e,t){var r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1===t.length){var r=t[0],n=this.chart.component("slices").data.items.map((function(e){return e.value})).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}}}},{key:"update",value:function(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}},{key:"updateHighlight",value:function(e){var t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}},{key:"updateDataPoints",value:function(e,t){var r=this;this.dataPoints=this.chart.findShapes("path").filter((function(e){return"slices"===e.key})).map((function(n,i){var o=ef(n,r.chart.formatter,e,t),a=tf(n);return{text:"".concat(a," (").concat(o,")"),value:i}}))}},{key:"init",value:function(e,t,n,i){return e.options=me(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===i.selectedIndex?Promise.resolve():Q(K(r.prototype),"init",this).call(this,e,t,n,i)}}]),r}(),af={isCompatible:function(e){var t=e.effectPath;return"/effects/maxmin"===t||"/effects/highlight-value"===t},create:function(e){return"/effects/maxmin"===e.effectPath?new nf(e):"/effects/highlight-value"===e.effectPath?new of(e):null}};function sf(e){var t={},r=e.components,n=e.tooltip,i=r?r.filter((function(e){return"slices"===e.key}))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((function(e){t["chart_style_".concat(e)]=i.style[e]})),n){var o,a;t.chart_tooltip_custom=!n.auto;var s=null===(o=n.chart)||void 0===o||null===(a=o.object)||void 0===a?void 0:a.refId;!n.auto&&s&&(t.chart_tooltip_custom_mini_chart=s)}return t}function uf(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}}function lf(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function cf(e){var t=e.translator;return{dimensions:{min:1,max:1,description:function(){return t.get("Visualizations.Descriptions.Slice")},add:function(e,t){lf(e),uf(t),Tc.addCallbackCustomTooltip(t)},move:function(e,t){lf(e),uf(t),Tc.moveCallbackCustomTooltip(t,e)},remove:function(e,t){Tc.removeCallbackCustomTooltip(t,e)},replace:function(e,t,r,n){lf(e),uf(n),Tc.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:function(e,r){return t.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius")},add:function(e,t){uf(t)},remove:function(e,t){!function(e){if(e.qHyperCubeDef){var t=e.qHyperCubeDef.qMeasures;"byExpression"===e.color.mode&&0===t.length&&(e.color.mode="primary")}}(t)}}}}var pf=function(e){return e.qMax<=0},ff=function(e){return!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(pf))};function df(e){return{definition:Kp(e.flags),softDefinition:Zp,support:{snapshot:ff,export:ff,exportData:!0,sharing:ff,viewData:!0,effects:!0},effects:af,extendMetrics:sf,importProperties:function(t,r,n,i){var o={layout:{templateId:r.templateId}};n.mapProperties(o);var a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Pp.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:cf(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:function(e,t,r){return Pp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}}function mf(e){return{properties:R({},{version:"1.11.13",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:_c.STROKE.COLOR},cornerRadius:_c.CORNER_RADIUS,innerRadius:_c.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}}),data:{targets:[cf(e)]},importProperties:function(t){var r=t.exportFormat,n=t.initialProperties,i=t.hypercubePath,o=Pp.colorChart.importProperties({exportFormat:r,initialProperties:n,dataDefinition:cf(e),hypercubePath:i});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode;return Pp.colorChart.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n})}}}export default function(i){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(P).forEach((function(t){e.add(P[t])}))}}(i.translator);var o=function(){var i=t();return i.use(r),i.use(n(e)),i.use(No()),i.component("pie-dividers",_o),i.component("negative-indicators",Bo),i}();return{qae:mf(i),ext:df(i),component:function(){var e=$l({picasso:o}),t=Zl({instance:e});jp({instance:e,services:t,picasso:o,flags:i.flags}),function(e){var t=e.instance,r=S(),n=h(),i=j();q((function(){t&&t.generateSettings&&(t.chart.update({settings:t.generateSettings()}),n.effect&&n.effect.update(r,t.chart))}),[i.width,i.height])}({instance:e}),kp({instance:e,services:t})}}}
974
+ function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}}));const Nc={setValue(e,t,r){if(!t)return;const n=t.split(".");let o=e;const i=n[n.length-1];let a;for(a=0;a<n.length-1;++a)null==o[n[a]]&&(o[n[a]]=Number.isNaN(+n[a+1])?{}:[]),o=o[n[a]];void 0!==r?o[i]=r:delete o[i]},getValue(e,t,r){const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(null==i[n[o]])return r;i=i[n[o]]}return i}},Pc={getDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qDimensionInfo:[]},getDimensionLayout(e,t,r){return this.getDimensionLayouts(t,r).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qMeasureInfo:[]},getMeasureLayout(e,t,r){return this.getMeasureLayouts(t,r).filter((t=>e===t.cId))[0]}};const Rc={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>Pc.getNumMeasures(e)>=1},showLegend:e=>{const t=Nc.getValue(e,"color.auto"),r=Nc.getValue(e,"color.expressionIsColor"),n=Nc.getValue(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:e=>!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===Nc.getValue(e,"color.useDimColVal")&&Nc.setValue(e,"color.useDimColVal",!1),!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode")&&"libraryItem"===Nc.getValue(e,"color.byDimDef.type"))},Fc=function(e){const{colorModeOptions:t,persistentColorsShow:r,useDimValColShow:n,showLegend:o}=Rc;this.color={colorMode:{options(r){const n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),t.primary(r)&&n.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(r)&&n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(r)&&n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(r)&&n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:e=>n(e)?r(e)&&!Nc.getValue(e,"color.useDimColVal"):r(e)},useDimColVal:{show:n}},this.legend={show:o,showTitle:{show(e){const t=Nc.getValue(e,"color.auto");return Nc.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===Nc.getValue(e,"color.mode")&&!0===Nc.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>Nc.getValue(e,"legend.show")&&o(e)}}};function Vc(e){return new Fc(e)}const _c=Vc("hard");const Hc=e=>({uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,r)=>r.layout.donut.showAsDonut}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:_c.color.colorMode.options},persistentColors:{show:_c.color.persistentColors.show}}},legend:{show:_c.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:_c.legend.showTitle.show},dock:{show:_c.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}),zc={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:r}={})=>r&&(r.dataPoint.auto||"share"!==r.dataPoint.labelMode)}}}}}}},Uc={uses:"sorting"},Bc={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Wc(e){return{type:"items",component:"accordion",items:{data:zc,sorting:Uc,addons:Bc,settings:Hc(e)}}}const $c=Vc("explore"),Yc=Wc();var Kc={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Yc.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Yc.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:$c.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&$c.color.useDimColVal.show(e))}}}}}}};function Jc(e,t){const r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Zc(e){return e.data.num.label}function Gc(e){return e.data.radius.label}function Xc(e,t,r,n){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Zc:Jc;if("share"===e.dataPoint.labelMode)return Jc;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Gc:Zc;return Zc}(r,n)(e,t)}function Qc(e){let t;return t=e.data.label?function(e,t){let r=e;return r.length>t&&(r=r.substr(0,t-3)+"..."),r}(e.data.label,20):"",t}class ep{constructor({element:e,properties:t,effectHelper:r,Flag:n}){this.element=e,this.Flag=n,r.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,r.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const r=this.chart.getAffectedShapes("highlight"),n=this.effectLayer[0].getBoundingClientRect(),o=r.map((r=>{const{start:o,end:i,outerRadius:a,offset:s}=r.desc.slice,{scaleRatio:l}=this.chart.component(r.key).rect,u=r.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-n.left+l.x*(s.x+a*Math.sin(c)),d=u.top-n.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Qc(r),label:Xc(r,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,r,n){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,r){return e.options=K(e.options,{effect:null}),r?t.getProperties().then((e=>K(e,{effectPath:null,effectProperties:null,dataPoint:K(!0,{},e.originalModelSettings.dataPoint),legend:K(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class tp extends ep{init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.max===n.max?Promise.resolve():super.init(e,t,r,n)}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;r&&o<i[0]&&(i=[o,t]),n&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class rp extends ep{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const r=t[0],n=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((r,n)=>{const o=Xc(r,this.chart.formatter,e,t);return{text:`${Qc(r)} (${o})`,value:n}}))}init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.selectedIndex===n.selectedIndex?Promise.resolve():super.init(e,t,r,n)}}var np={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new tp(e):"/effects/highlight-value"===e.effectPath?new rp(e):null};function op(e){const t={},{components:r,tooltip:n}=e,o=r?r.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),n){var i,a;t.chart_tooltip_custom=!n.auto;const e=null===(i=n.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function ip(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function ap(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function sp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){ap(e),ip(t),Nu.addCallbackCustomTooltip(t)},move(e,t){ap(e),ip(t),Nu.moveCallbackCustomTooltip(t,e)},remove(e,t){Nu.removeCallbackCustomTooltip(t,e)},replace(e,t,r,n){ap(e),ip(n),Nu.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:(t,r)=>e.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){ip(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:r}=e.color;"byExpression"===r&&0===t.length&&(e.color.mode="primary")}(t)}}}}const lp=e=>e.qMax<=0,up=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(lp));function cp(e){return{definition:Wc(e.flags),softDefinition:Kc,support:{snapshot:up,export:up,exportData:!0,sharing:up,viewData:!0,effects:!0},effects:np,extendMetrics:op,importProperties:(t,r,n,o)=>{const i={layout:{templateId:r.templateId}};n.mapProperties(i);const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,r)=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}function pp(e){return{properties:{version:"1.11.17",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Bu.STROKE.COLOR},cornerRadius:Bu.CORNER_RADIUS,innerRadius:Bu.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[sp(e)]},importProperties:({exportFormat:t,initialProperties:r,hypercubePath:n})=>{const o=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),hypercubePath:n});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:r})=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}const dp=o=>{!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((t=>{e.add(N[t])}))}}(o.translator);const i=function(){const o=t();return o.use(r),o.use(n(e)),o.use(ui()),o.component("pie-dividers",fi),o.component("negative-indicators",gi),o}();return{qae:pp(o),ext:cp(o),component(){const e=xu({picasso:i}),t=Du({instance:e});Oc({instance:e,services:t,picasso:i,flags:o.flags}),function({instance:e}){const t=M(),r=h(),n=j();q((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),r.effect&&r.effect.update(t,e.chart))}),[n.width,n.height])}({instance:e}),jc({instance:e,services:t})}}};export{dp as default};