@nebula.js/sn-pie-chart 1.18.6 → 1.19.2
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,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pie-chart v1.
|
|
2
|
+
* @nebula.js/sn-pie-chart v1.19.2
|
|
3
3
|
* Copyright (c) 2022 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 n from"picasso-plugin-q";import r 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,useTranslator as x,useAction as q,useEffect as D,useModel as C,useApp as w,useStaleLayout as S,usePlugins as M,useConstraints as E,useTheme as A,useAppLayout as I,useEmbed as T,usePromise as k,useRect as O,onTakeSnapshot as L,useImperativeHandle as N}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":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const F=(e,t,n,r,o)=>e?e.getStyle(t,n,r):o;var j=Object.freeze({__proto__:null,getThemeStyle:F});function H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _=Object.prototype.hasOwnProperty,z=Object.prototype.toString,V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===z.call(e)},W=function(e){if(!e||"[object Object]"!==z.call(e))return!1;var t,n=_.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||_.call(e,t)},$=function(e,t){V&&"__proto__"===t.name?V(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,n,r,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(n in t)r=Y(s,n),s!==(o=Y(t,n))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=r&&B(r)?r:[]):a=r&&W(r)?r:{},$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:n,newValue:o}));return s};const J="center",G="bottom";var Z={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:G,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:G,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:G,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:G,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:n}])=>{Q[e]={width:t,height:n}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let n;for(n=0;n<X.length;++n)if(e>=X[n][1].width&&t>=X[n][1].height)return X[n][0];return"SPARK"}};function 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 ne=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function re(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const oe=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>oe.test(e),isRtlChar:e=>ie.test(e)||ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],se.isLtrChar(r))return"ltr";if(se.isRtlChar(r))return"rtl"}return"ltr"}},le={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?le.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=se.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=se.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:se.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,le.getColorSymbol(e,t)]:[le.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=se.detectTextDirection(e.value);let l;return l=o?r?[e.value,le.getColorSymbol(t,n)]:[le.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ue(e,t,n,r){const o=parseInt(F(e,t,n,r),10);if(!isNaN(o))return o}const ce=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function pe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){return{position:e.position,justify:e.justify,fill:e.onBackground?F(t,n,"label.value","color"):ce(t),overflow:e.overflow,padding:e.padding}}(n,t,e.themeId))),fontSize:ue(t,e.themeId,"label.value","fontSize"),fontFamily:F(t,e.themeId,"label.value","fontFamily"),label:e.label}}function de(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function me(){}var he=1/.7,ge="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",be=/^#([0-9a-f]{3,8})$/,xe=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),De=new RegExp("^rgba\\("+[ge,ge,ge,ye]+"\\)$"),Ce=new RegExp("^rgba\\("+[ve,ve,ve,ye]+"\\)$"),we=new RegExp("^hsl\\("+[ye,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[ye,ve,ve,ye]+"\\)$"),Me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Ie(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=be.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Te(t):3===n?new Le(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?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=xe.exec(e))?new Le(t[1],t[2],t[3],1):(t=qe.exec(e))?new Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=Ce.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?Fe(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Fe(t[1],t[2]/100,t[3]/100,t[4]):Me.hasOwnProperty(e)?Te(Me[e]):"transparent"===e?new Le(NaN,NaN,NaN,0):null}function Te(e){return new Le(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,n,r){return r<=0&&(e=t=n=NaN),new Le(e,t,n,r)}function Oe(e){return e instanceof me||(e=Ie(e)),e?new Le((e=e.rgb()).r,e.g,e.b,e.opacity):new Le}function Le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ne(){return"#"+Re(this.r)+Re(this.g)+Re(this.b)}function Pe(){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 Re(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Fe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function je(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof me||(e=Ie(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/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,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _e(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}de(me,Ie,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return je(this).formatHsl()},formatRgb:Ae,toString:Ae}),de(Le,(function(e,t,n,r){return 1===arguments.length?Oe(e):new Le(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Le(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:Ne,formatHex:Ne,formatRgb:Pe,toString:Pe})),de(He,(function(e,t,n,r){return 1===arguments.length?je(e):new He(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Le(_e(e>=240?e-240:e+120,o,r),_e(e,o,r),_e(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ze=Math.PI/180,Ve=180/Math.PI,Ue=4/29,Be=6/29,We=3*Be*Be;function $e(e){if(e instanceof Ye)return new Ye(e.l,e.a,e.b,e.opacity);if(e instanceof et)return tt(e);e instanceof Le||(e=Oe(e));var t,n,r=Ze(e.r),o=Ze(e.g),i=Ze(e.b),a=Ke((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ke((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ke((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Ye(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ye(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ke(e){return e>.008856451679035631?Math.pow(e,1/3):e/We+Ue}function Je(e){return e>Be?e*e*e:We*(e-Ue)}function Ge(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ze(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Xe(e){if(e instanceof et)return new et(e.h,e.c,e.l,e.opacity);if(e instanceof Ye||(e=$e(e)),0===e.a&&0===e.b)return new et(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ve;return new et(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Qe(e,t,n,r){return 1===arguments.length?Xe(e):new et(e,t,n,null==r?1:r)}function et(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tt(e){if(isNaN(e.h))return new Ye(e.l,0,0,e.opacity);var t=e.h*ze;return new Ye(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}de(Ye,(function(e,t,n,r){return 1===arguments.length?$e(e):new Ye(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return new Ye(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ye(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Le(Ge(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(n=.82521*Je(n))),Ge(-.9787684*t+1.9161415*e+.033454*n),Ge(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),de(et,Qe,fe(me,{brighter:function(e){return new et(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new et(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return tt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return nt(e(t),n)}}(e))}(nt);function rt(){}function ot(e,t){var n=new rt;if(e instanceof rt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function it(){}rt.prototype=ot.prototype={constructor:rt,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 at=ot.prototype;function st(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ut(){}it.prototype={constructor:it,has:at.has,add:function(e){return this["$"+(e+="")]=e,this},remove:at.remove,clear:at.clear,values:at.keys,size:at.size,empty:at.empty,each:at.each};var ct=1/.7,pt="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mt=/^#([0-9a-f]{3})$/,ht=/^#([0-9a-f]{6})$/,gt=new RegExp("^rgb\\("+[pt,pt,pt]+"\\)$"),yt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),vt=new RegExp("^rgba\\("+[pt,pt,pt,dt]+"\\)$"),bt=new RegExp("^rgba\\("+[ft,ft,ft,dt]+"\\)$"),xt=new RegExp("^hsl\\("+[dt,ft,ft]+"\\)$"),qt=new RegExp("^hsla\\("+[dt,ft,ft,dt]+"\\)$"),Dt={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 Ct(e){var t;return e=(e+"").trim().toLowerCase(),(t=mt.exec(e))?new Et((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=ht.exec(e))?wt(parseInt(t[1],16)):(t=gt.exec(e))?new Et(t[1],t[2],t[3],1):(t=yt.exec(e))?new Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vt.exec(e))?St(t[1],t[2],t[3],t[4]):(t=bt.exec(e))?St(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=xt.exec(e))?It(t[1],t[2]/100,t[3]/100,1):(t=qt.exec(e))?It(t[1],t[2]/100,t[3]/100,t[4]):Dt.hasOwnProperty(e)?wt(Dt[e]):"transparent"===e?new Et(NaN,NaN,NaN,0):null}function wt(e){return new Et(e>>16&255,e>>8&255,255&e,1)}function St(e,t,n,r){return r<=0&&(e=t=n=NaN),new Et(e,t,n,r)}function Mt(e){return e instanceof ut||(e=Ct(e)),e?new Et((e=e.rgb()).r,e.g,e.b,e.opacity):new Et}function Et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function At(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function It(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,n,r)}function Tt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof ut||(e=Ct(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/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,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ot(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}st(ut,Ct,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),st(Et,(function(e,t,n,r){return 1===arguments.length?Mt(e):new Et(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,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 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+")")}})),st(kt,(function(e,t,n,r){return 1===arguments.length?Tt(e):new kt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,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,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Et(Ot(e>=240?e-240:e+120,o,r),Ot(e,o,r),Ot(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Lt=Math.PI/180,Nt=180/Math.PI,Pt=4/29,Rt=6/29,Ft=3*Rt*Rt;function jt(e){if(e instanceof Ht)return new Ht(e.l,e.a,e.b,e.opacity);if(e instanceof Wt){if(isNaN(e.h))return new Ht(e.l,0,0,e.opacity);var t=e.h*Lt;return new Ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Et||(e=Mt(e));var n,r,o=Ut(e.r),i=Ut(e.g),a=Ut(e.b),s=_t((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=_t((.4360747*o+.3850649*i+.1430804*a)/.96422),r=_t((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Ht(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Ht(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function _t(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ft+Pt}function zt(e){return e>Rt?e*e*e:Ft*(e-Pt)}function Vt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ut(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bt(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(e instanceof Ht||(e=jt(e)),0===e.a&&0===e.b)return new Wt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Nt;return new Wt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Wt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}st(Ht,(function(e,t,n,r){return 1===arguments.length?jt(e):new Ht(e,t,n,null==r?1:r)}),lt(ut,{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,n=isNaN(this.b)?e:e-this.b/200;return new Et(Vt(3.1338561*(t=.96422*zt(t))-1.6168667*(e=1*zt(e))-.4906146*(n=.82521*zt(n))),Vt(-.9787684*t+1.9161415*e+.033454*n),Vt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),st(Wt,(function(e,t,n,r){return 1===arguments.length?Bt(e):new Wt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Wt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Wt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return jt(this).rgb()}}));var $t=-.29227,Yt=-.90649,Kt=1.97294,Jt=Kt*Yt,Gt=1.78277*Kt,Zt=-.6557636667999999;function Xt(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);e instanceof Et||(e=Mt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Zt*r+Jt*t-Gt*n)/(Zt+Jt-Gt),i=r-o,a=(Kt*(n-o)-$t*i)/Yt,s=Math.sqrt(a*a+i*i)/(Kt*o*(1-o)),l=s?Math.atan2(a,i)*Nt-120:NaN;return new Qt(l<0?l+360:l,s,o,e.opacity)}function Qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function en(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}st(Qt,(function(e,t,n,r){return 1===arguments.length?Xt(e):new Qt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Lt,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Et(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*($t*r+Yt*o)),255*(t+n*(Kt*r)),this.opacity)}}));var tn,nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){return new on(e)}function on(e){if(!(t=nn.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 an(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}rn.prototype=on.prototype,on.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 sn={"%":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 an(100*e,t)},r:an,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(tn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+en(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 ln(e){return e}var un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):ln,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):ln,s=e.percent||"%";function l(e){var t=(e=rn(e)).fill,n=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"):sn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=sn[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,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])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?un[8+tn/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=r(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=r(w+e,w.length?p-q.length:1/0),w=""),n){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 n=l(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=en(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=un[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){cn(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var pn=new Date,dn=new Date;function fn(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return fn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return pn.setTime(+t),dn.setTime(+r),e(pn),e(dn),Math.floor(n(pn,dn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var mn=fn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));mn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?fn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):mn:null};fn((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()})),fn((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()})),fn((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 hn=fn((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 gn(e){return fn((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 yn=gn(0),vn=gn(1);gn(2),gn(3);var bn=gn(4);gn(5),gn(6),fn((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 xn=fn((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()}));xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},fn((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()})),fn((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 qn=fn((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 Dn(e){return fn((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 Cn=Dn(0),wn=Dn(1);Dn(2),Dn(3);var Sn=Dn(4);Dn(5),Dn(6),fn((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 Mn=fn((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 En(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 An(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 In(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Tn,kn,On,Ln={"-":"",_:" ",0:"0"},Nn=/^\s*\d+/,Pn=/^%/,Rn=/[\\^$*+?|[\]().{}]/g;function Fn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function jn(e){return e.replace(Rn,"\\$&")}function Hn(e){return new RegExp("^(?:"+e.map(jn).join("|")+")","i")}function _n(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function zn(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=Nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Kn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=Nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function er(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tr(e,t,n){var r=Nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=Nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rr(e,t,n){var r=Pn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function or(e,t,n){var r=Nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ir(e,t,n){var r=Nn.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ar(e,t){return Fn(e.getDate(),t,2)}function sr(e,t){return Fn(e.getHours(),t,2)}function lr(e,t){return Fn(e.getHours()%12||12,t,2)}function ur(e,t){return Fn(1+hn.count(xn(e),e),t,3)}function cr(e,t){return Fn(e.getMilliseconds(),t,3)}function pr(e,t){return cr(e,t)+"000"}function dr(e,t){return Fn(e.getMonth()+1,t,2)}function fr(e,t){return Fn(e.getMinutes(),t,2)}function mr(e,t){return Fn(e.getSeconds(),t,2)}function hr(e){var t=e.getDay();return 0===t?7:t}function gr(e,t){return Fn(yn.count(xn(e),e),t,2)}function yr(e,t){var n=e.getDay();return e=n>=4||0===n?bn(e):bn.ceil(e),Fn(bn.count(xn(e),e)+(4===xn(e).getDay()),t,2)}function vr(e){return e.getDay()}function br(e,t){return Fn(vn.count(xn(e),e),t,2)}function xr(e,t){return Fn(e.getFullYear()%100,t,2)}function qr(e,t){return Fn(e.getFullYear()%1e4,t,4)}function Dr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fn(t/60|0,"0",2)+Fn(t%60,"0",2)}function Cr(e,t){return Fn(e.getUTCDate(),t,2)}function wr(e,t){return Fn(e.getUTCHours(),t,2)}function Sr(e,t){return Fn(e.getUTCHours()%12||12,t,2)}function Mr(e,t){return Fn(1+qn.count(Mn(e),e),t,3)}function Er(e,t){return Fn(e.getUTCMilliseconds(),t,3)}function Ar(e,t){return Er(e,t)+"000"}function Ir(e,t){return Fn(e.getUTCMonth()+1,t,2)}function Tr(e,t){return Fn(e.getUTCMinutes(),t,2)}function kr(e,t){return Fn(e.getUTCSeconds(),t,2)}function Or(e){var t=e.getUTCDay();return 0===t?7:t}function Lr(e,t){return Fn(Cn.count(Mn(e),e),t,2)}function Nr(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Sn(e):Sn.ceil(e),Fn(Sn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function Pr(e){return e.getUTCDay()}function Rr(e,t){return Fn(wn.count(Mn(e),e),t,2)}function Fr(e,t){return Fn(e.getUTCFullYear()%100,t,2)}function jr(e,t){return Fn(e.getUTCFullYear()%1e4,t,4)}function Hr(){return"+0000"}function _r(){return"%"}function zr(e){return+e}function Vr(e){return Math.floor(+e/1e3)}!function(e){Tn=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Hn(o),c=_n(o),p=Hn(i),d=_n(i),f=Hn(a),m=_n(a),h=Hn(s),g=_n(s),y=Hn(l),v=_n(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:ar,e:ar,f:pr,H:sr,I:lr,j:ur,L:cr,m:dr,M:fr,p:function(e){return o[+(e.getHours()>=12)]},Q:zr,s:Vr,S:mr,u:hr,U:gr,V:yr,w:vr,W:br,x:null,X:null,y:xr,Y:qr,Z:Dr,"%":_r},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:Cr,e:Cr,f:Ar,H:wr,I:Sr,j:Mr,L:Er,m:Ir,M:Tr,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:zr,s:Vr,S:kr,u:Or,U:Lr,V:Nr,w:Pr,W:Rr,x:null,X:null,y:Fr,Y:jr,Z:Hr,"%":_r},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:Gn,e:Gn,f:nr,H:Xn,I:Xn,j:Zn,L:tr,m:Jn,M:Qn,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:or,s:ir,S:er,u:Vn,U:Un,V:Bn,w:zn,W:Wn,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Yn,Y:$n,Z:Kn,"%":rr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Ln[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=In(1900);if(w(i,e,n+="",0)!=n.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=(r=An(In(i.y))).getUTCDay(),r=o>4||0===o?wn.ceil(r):wn(r),r=qn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(In(i.y))).getDay(),r=o>4||0===o?vn.ceil(r):vn(r),r=hn.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.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?An(In(i.y)).getUTCDay():t(In(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,An(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Ln?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=D(n,b),b.X=D(r,b),b.c=D(t,b),x.x=D(n,x),x.X=D(r,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+="",En);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,An);return t.toString=function(){return e},t}}}(e),kn=Tn.utcFormat,On=Tn.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||kn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||On("%Y-%m-%dT%H:%M:%S.%LZ");const Ur=K.bind(null,!0),Br={},{isArray:Wr}=Array;function $r(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Yr(e){return void 0===e}function Kr(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jr(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Yr(e[r||t])?i:e[t],e=e[r||t]})),e}function Gr(e,t){let n=!0;if($r(e)&&$r(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Gr(e[r],t[r])||(n=!1)})),n);if(Wr(e)&&Wr(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Gr(e[n],t[n]))return!1;return!0}return e===t}Br.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ur({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Gr(i,a)||Kr(t,o)||(Yr(a)?r.push({op:"add",path:s,value:i}):$r(i)&&$r(a)?r=r.concat(Br.generate(a,i,s)):Wr(i)&&Wr(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Yr(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Gr(t,o))return r;if(!Yr(t[0])&&Yr(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Br.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Yr(t[o])&&!Kr(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Br.apply=function(e,t){t.forEach((t=>{let n=Jr(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Wr(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Wr(o)&&Wr(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($r(o)&&$r(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Kr(a,e)&&delete a[e]})),Ur(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Jr(e,t.from);Wr(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Wr(n)?n.splice(+r,1):delete n[r]);var a}))},Br.clone=function(e){return Ur({},e)},Br.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Br.updateObject=function(e,t){Object.keys(e).length?Br.apply(e,Br.generate(e,t)):Ur(e,t)};const Zr=[[2,4,6],[2,4],[3]],Xr=[,[,,[[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 Qr(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function eo(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Qr(e[r],t,n)}!function(){let e,t;for(eo(Zr,1,10),e=0;e<Xr.length;e++)if(Xr[e])for(t=0;t<Xr[e].length;t++)Array.isArray(Xr[e][t])&&eo(Xr[e][t])}();var to={exports:{}};function no(){}function ro(){}ro.resetWarningCache=no;to.exports=function(){function e(e,t,n,r,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 n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ro,resetWarningCache:no};return n.PropTypes=n,n}();var oo=to.exports;function io(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ao({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:io(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}const so={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"},lo={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"},uo="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",co={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"},po={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 fo(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Br.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function mo(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),fo(e,a,s)}))}function ho({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const 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){mo(r,e,t,"qDimensions",a)}}}function go(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function yo({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const 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(n)},changeTo(e,t){mo(o,e,t,"qMeasures",i,a)}}}function vo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const bo={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"}}},xo=({children:e,...t})=>o.createElement(i,R({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function qo(){function e({title:e,selected:t,onClick:n}){const r=se.detectTextDirection(e);return o.createElement(l,{role:"list",button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(ao,{d:t?uo:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,R({anchorEl:t,open:p,onClose:c},bo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,"aria-label":"use the tab keys to navigate between the options",component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),d))}e.propTypes={title:oo.string.isRequired,selected:oo.bool,onClick:oo.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:oo.any,changeTo:oo.func.isRequired,current:oo.string.isRequired,dir:oo.string.isRequired,dock:oo.string.isRequired,list:oo.array,onClose:oo.func.isRequired,show:oo.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n 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:n,translator:r,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,n)=>o.createElement(xo,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(p-n),title:t},o.createElement("span",{style:c},t),o.createElement(ao,R({},po,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||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=se.detectTextDirection(e.text),v=`Currently ${e.text} is selcted. Click to expand or press enter key to open the list`,b=o.createElement(xo,{"aria-label":v,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(ao,R({},lo,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(ao,R({},co,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(ao,R({},so,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},b),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&ne(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:oo.bool.isRequired,padding:oo.string,minWidth:oo.string,titleData:oo.shape({breadcrumbs:oo.arrayOf(oo.string).isRequired,drilldown:oo.bool.isRequired,index:oo.number.isRequired,locked:oo.bool.isRequired,text:oo.string.isRequired,popoverText:oo.string.isRequired,drillUp:oo.func}).isRequired,popover:oo.shape({dir:oo.string.isRequired,dock:oo.string.isRequired,changeTo:oo.func.isRequired,getAlternatives:oo.func.isRequired}),translator:oo.shape({get:oo.func.isRequired}).isRequired,selections:oo.shape({isActive:oo.func,addListener:oo.func,removeListener:oo.func}),style:oo.shape({fontSize:oo.string,color:oo.string,fontFamily:oo.string}).isRequired,isDimension:oo.bool.isRequired,hasAlternative:oo.bool.isRequired},n.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 n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?ho:yo,S=u?go:vo,M=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(A=this.settings.settings).isDimension&&ne(A,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var A;const I=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,p),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,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},I)}}}function Do(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Co(e){if(e.type)return e;if("#"===e.charAt(0))return Co(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function So(e){var t="hsl"===(e=Co(e)).type?Co(function(e){var t=(e=Co(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/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])),wo({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 Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eo(){return(Eo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ao(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Io(){return(Io=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function To(e){return(To="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"===To(Symbol.iterator)?function(e){return To(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":To(e)})(e)}function Oo(e){return e&&"object"===ko(e)&&!Array.isArray(e)}function Lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Io({},e):e;return Oo(e)&&Oo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Oo(t[o])&&o in e?r[o]=Lo(e[o],t[o],n):r[o]=t[o])})),r}var No=["xs","sm","md","lg","xl"];function Po(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Ao(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=No.indexOf(t)+1;return r===No.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[No[r]]-a/100).concat(o,")")}return Eo({keys:No,values:n,up:l,down:function(e){var t=No.indexOf(e)+1,r=n[No[t]];return t===No.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Ro(e,t,n){var r;return Eo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo({paddingLeft:t(2),paddingRight:t(2)},n,Mo({},e.up("sm"),Eo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Mo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Mo(r,e.up("sm"),{minHeight:64}),r)},n)}var Fo={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"},jo={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"},_o={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"},zo={black:"#000",white:"#fff"},Vo={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:zo.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)"}},Uo={text:{primary:zo.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:zo.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,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wo(e)}(e.main,1.5*r)))}function Wo(e){var t=e.primary,n=void 0===t?{light:Fo[300],main:Fo[500],dark:Fo[700]}:t,r=e.secondary,o=void 0===r?{light:jo.A200,main:jo.A400,dark:jo.A700}:r,i=e.error,a=void 0===i?{light:_o[300],main:_o[500],dark:_o[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 n=So(e),r=So(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Uo.text.primary)>=c?Uo.text.primary:Vo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Eo({},e)).main&&e[t]&&(e.main=e[t]),Bo(e,"light",n,d),Bo(e,"dark",r,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Uo,light:Vo};return Lo(Eo({common:zo,type:l,primary:h(n),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 $o(e){return Math.round(1e5*e)/1e5}var Yo={textTransform:"uppercase"};function Ko(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,p=n.fontWeightMedium,d=void 0===p?500:p,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Ao(n,["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,n,r,i){return Eo({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat($o(r/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,Yo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Yo)};return Lo(Eo({htmlFontSize:g,pxToRem:q,round:$o,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Jo(){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 Go=["none",Jo(0,2,1,-1,0,1,1,0,0,1,3,0),Jo(0,3,1,-2,0,2,2,0,0,1,5,0),Jo(0,3,3,-2,0,3,4,0,0,1,8,0),Jo(0,2,4,-1,0,4,5,0,0,1,10,0),Jo(0,3,5,-1,0,5,8,0,0,1,14,0),Jo(0,3,5,-1,0,6,10,0,0,1,18,0),Jo(0,4,5,-2,0,7,10,1,0,2,16,1),Jo(0,5,5,-3,0,8,10,1,0,3,14,2),Jo(0,5,6,-3,0,9,12,1,0,3,16,2),Jo(0,6,6,-3,0,10,14,1,0,4,18,3),Jo(0,6,7,-4,0,11,15,1,0,4,20,3),Jo(0,7,8,-4,0,12,17,2,0,5,22,4),Jo(0,7,8,-4,0,13,19,2,0,5,24,4),Jo(0,7,9,-4,0,14,21,2,0,5,26,4),Jo(0,8,9,-5,0,15,22,2,0,6,28,5),Jo(0,8,10,-5,0,16,24,2,0,6,30,5),Jo(0,8,11,-5,0,17,26,2,0,6,32,5),Jo(0,9,11,-5,0,18,28,2,0,7,34,6),Jo(0,9,12,-6,0,19,29,2,0,7,36,6),Jo(0,10,13,-6,0,20,31,3,0,8,38,7),Jo(0,10,13,-6,0,21,33,3,0,8,40,7),Jo(0,10,14,-6,0,22,35,3,0,8,42,7),Jo(0,11,14,-7,0,23,36,3,0,9,44,8),Jo(0,11,15,-7,0,24,38,3,0,9,46,8)],Zo={borderRadius:4};function Xo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Qo={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)"},ei={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ti=function(e){return"".concat(Math.round(e),"ms")},ni={easing:Qo,duration:ei,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?ei.standard:n,o=t.easing,i=void 0===o?Qo.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 r?r:ti(r)," ").concat(i," ").concat("string"==typeof s?s:ti(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))}},ri={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,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=Wo(a),f=Po(n),m=Xo(l),h=Eo({breakpoints:f,direction:"ltr",mixins:Ro(f,m,o),overrides:{},palette:d,props:{},shadows:s||Go,typography:Ko(d,c),spacing:m},Lo({shape:Zo,transitions:ni,zIndex:ri},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 ii=d({productionPrefix:"q2975",disableGlobal:!0,seed:""});function ai(){function e({x:e,y:t,width:n,height:r,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(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,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:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:oi},e))}(e,ii),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&p.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(p.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function si(){return function(e){e.renderer("react",ai()),e.component("data-title",qo()),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:oo.string.isRequired,spanStyle:oo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function li(e){return Qe(e).l<70}function ui(e,t){const n=Qe(e).l/100,r=Qe(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ci(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var pi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(ui(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ci({r:s,a:e},n),i=ci({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:li(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function di(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function fi(e){const{size:t,angle:n}=e,r={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,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{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:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:di(s)}}var mi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/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=fi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function hi(e){return(hi="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 gi(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function yi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gi(i,r,o,a,s,"next",e)}function s(e){gi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){vi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||wi(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 Ci(e){return function(e){if(Array.isArray(e))return Si(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wi(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 wi(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mi=Object.prototype.hasOwnProperty,Ei=Object.prototype.toString,Ai=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,Ti=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ei.call(e)},ki=function(e){if(!e||"[object Object]"!==Ei.call(e))return!1;var t,n=Mi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mi.call(e,t)},Oi=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},Li=function(e,t){if("__proto__"===t){if(!Mi.call(e,t))return;if(Ii)return Ii(e,t).value}return e[t]},Ni=function e(){var t,n,r,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(n in t)r=Li(s,n),s!==(o=Li(t,n))&&(c&&o&&(ki(o)||(i=Ti(o)))?(i?(i=!1,a=r&&Ti(r)?r:[]):a=r&&ki(r)?r:{},Oi(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Oi(s,{name:n,newValue:o}));return s};function Pi(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Ri(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Fi(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function ji(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Hi(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function _i(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function zi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vi(){}var Ui=1/.7,Bi="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yi=/^#([0-9a-f]{3,8})$/,Ki=new RegExp("^rgb\\("+[Bi,Bi,Bi]+"\\)$"),Ji=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgba\\("+[Bi,Bi,Bi,Wi]+"\\)$"),Zi=new RegExp("^rgba\\("+[$i,$i,$i,Wi]+"\\)$"),Xi=new RegExp("^hsl\\("+[Wi,$i,$i]+"\\)$"),Qi=new RegExp("^hsla\\("+[Wi,$i,$i,Wi]+"\\)$"),ea={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 ta(){return this.rgb().formatHex()}function na(){return this.rgb().formatRgb()}function ra(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?oa(t):3===n?new la(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ia(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ia(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=Ki.exec(e))?new la(t[1],t[2],t[3],1):(t=Ji.exec(e))?new la(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Gi.exec(e))?ia(t[1],t[2],t[3],t[4]):(t=Zi.exec(e))?ia(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xi.exec(e))?da(t[1],t[2]/100,t[3]/100,1):(t=Qi.exec(e))?da(t[1],t[2]/100,t[3]/100,t[4]):ea.hasOwnProperty(e)?oa(ea[e]):"transparent"===e?new la(NaN,NaN,NaN,0):null}function oa(e){return new la(e>>16&255,e>>8&255,255&e,1)}function ia(e,t,n,r){return r<=0&&(e=t=n=NaN),new la(e,t,n,r)}function aa(e){return e instanceof Vi||(e=ra(e)),e?new la((e=e.rgb()).r,e.g,e.b,e.opacity):new la}function sa(e,t,n,r){return 1===arguments.length?aa(e):new la(e,t,n,null==r?1:r)}function la(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ua(){return"#"+pa(this.r)+pa(this.g)+pa(this.b)}function ca(){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 pa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function da(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ma(e,t,n,r)}function fa(e){if(e instanceof ma)return new ma(e.h,e.s,e.l,e.opacity);if(e instanceof Vi||(e=ra(e)),!e)return new ma;if(e instanceof ma)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ma(a,s,l,e.opacity)}function ma(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ha(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}_i(Vi,ra,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ta,formatHex:ta,formatHsl:function(){return fa(this).formatHsl()},formatRgb:na,toString:na}),_i(la,sa,zi(Vi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new la(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:ua,formatHex:ua,formatRgb:ca,toString:ca})),_i(ma,(function(e,t,n,r){return 1===arguments.length?fa(e):new ma(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new ma(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ma(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new la(ha(e>=240?e-240:e+120,o,r),ha(e,o,r),ha(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ga=Math.PI/180,ya=180/Math.PI,va=4/29,ba=6/29,xa=3*ba*ba;function qa(e){if(e instanceof Da)return new Da(e.l,e.a,e.b,e.opacity);if(e instanceof Aa)return Ia(e);e instanceof la||(e=aa(e));var t,n,r=Ma(e.r),o=Ma(e.g),i=Ma(e.b),a=Ca((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ca((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ca((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Da(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Da(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ca(e){return e>.008856451679035631?Math.pow(e,1/3):e/xa+va}function wa(e){return e>ba?e*e*e:xa*(e-va)}function Sa(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ma(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ea(e){if(e instanceof Aa)return new Aa(e.h,e.c,e.l,e.opacity);if(e instanceof Da||(e=qa(e)),0===e.a&&0===e.b)return new Aa(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ya;return new Aa(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Aa(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ia(e){if(isNaN(e.h))return new Da(e.l,0,0,e.opacity);var t=e.h*ga;return new Da(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ta(e){return function(){return e}}function ka(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ta(isNaN(e)?t:e)}_i(Da,(function(e,t,n,r){return 1===arguments.length?qa(e):new Da(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return new Da(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Da(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new la(Sa(3.1338561*(t=.96422*wa(t))-1.6168667*(e=1*wa(e))-.4906146*(n=.82521*wa(n))),Sa(-.9787684*t+1.9161415*e+.033454*n),Sa(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),_i(Aa,(function(e,t,n,r){return 1===arguments.length?Ea(e):new Aa(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return new Aa(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Aa(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ia(this).rgb()}}));var Oa=function e(t){var n=function(e){return 1==(e=+e)?ka:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ta(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=sa(e)).r,(t=sa(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ka(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),La=/^class(-pyramid)?/,Na=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.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(Ci(c))),i=Math.max.apply(Math,[i].concat(Ci(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,n=e.max,r=e.limits,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,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=Oa(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 Pa(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[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<=r||l>=o?Math.max(l,r):Pa(e,t,n,r+1,o)}var Ra=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=n.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=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ci(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Ci(c)),u.max=Math.max.apply(Math,Ci(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=d&&La.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ci(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Pa(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),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Fa(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function ja(e){var t,n=e.cm,r=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,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),xi(xi({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return xi(xi({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Ha(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function _a(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(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=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function za(e,t,n,r){var o,i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Fa:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Ra(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Ni(u,Na(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.getCDef,i=void 0===o?ji:o,a=r.getCByField,s=void 0===a?Hi:a,l=r.getPersistence,u=void 0===l?Fi:l,c=i(t,n),p=s(n,c),d=p?p.raw():{},f=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&p&&(m.label=p.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Ni(m,u(t,n,c,p,{byRow:Ri,byElemNo:Pi})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ra(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.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=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return ja({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Ha(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=_a(e.measureOverrides,e.explicit),Ha(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=_a(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function Va(e){var t=xi({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Ni(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Ni(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Ni(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var i=n.pic.field(e.field);return Na(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=xi({},e);Ni(a,Pi(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Ni(a,Pi(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Ni(a,Pi(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[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;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=xi(xi({},e),r.getDataColorSpecials())),n.settings=Ni(e,za(this,n,t,e))}return n.settings}};return o}var Ua=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Ba=function(e){throw e.isHandled=!0,e},Wa=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},$a=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Ya=function(e,t){var n=t.layout,r=t.model,o=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ba):Promise.reject()};function Ka(e){var t=e.hc,n=e.source,r=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:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Ja(e){return function(t){return"object"===hi(t.datum[e])?t.datum[e].value:void 0}}function Ga(e){return"object"===hi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Za(e){return-3===e.datum.value}var Xa=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},Qa=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function es(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Xa(i,r,o)},show:"function"==typeof i.show?function(){return Qa(i,l,a)}:Qa(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(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ts(e,t,n){var r=[],o=[],i=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=es(e,t);if(!r.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 Ni(!0,r,{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(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(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:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=es(e,t);return!!u.show&&Ni(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!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,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=n.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,n)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!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(r,"-cat")}))}},events:(e={},vi(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),vi(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),vi(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var ns=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function rs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=Va(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return Wa(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return $a(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return Ya(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=Ua,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=xi({},o),r={},!n.key)throw new Error("Missing key");t.set(xi(xi({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=xi(xi({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,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 n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Ci(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:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ci((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ci((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,p=Ka({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=xi(xi({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Ni({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Ni({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,o=Ja(r),i=Ja("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Za(e)||i(e)?u:l}:n[t]?function(e){return Za(e)?u:Ga(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Za(e)||i(e)?u:Ga(e)?l:c}:"color"===p?function(e){return Za(e)||i(e)?u:Ga(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Ja("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=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?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?ns(e.qNum):e.qText&&ra(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var p=vi({},u,n);return r.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx: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:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=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 ts({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var os=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function is(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(os),i=r.some(os),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function as(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=xi(xi(xi({},e),t),{},{colorProps:xi(xi({},e.colorProps),t.colorProps||{})});return n}var ss=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ls(e){var t,n=e.qHyperCube.qDimensionInfo.some(ss),r=e.qHyperCube.qMeasureInfo.some(ss),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var us=function(){};function cs(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function ps(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}function ds(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function fs(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function ms(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function hs(e){return(hs="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 gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ys(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vs(e,t,n){return t&&ys(e.prototype,t),n&&ys(e,n),e}function bs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xs(Object(n),!0).forEach((function(t){bs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ds(e,t){return(Ds=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cs(){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 ws(e,t,n){return(ws=Cs()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ds(o,n.prototype),o}).apply(null,arguments)}function Ss(e){return function(e){if(Array.isArray(e))return Es(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ms(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 Ms(e,t){if(e){if("string"==typeof e)return Es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Es(e,t):void 0}}function Es(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var As=Object.prototype.hasOwnProperty,Is=Object.prototype.toString,Ts=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,Os=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Is.call(e)},Ls=function(e){if(!e||"[object Object]"!==Is.call(e))return!1;var t,n=As.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&As.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||As.call(e,t)},Ns=function(e,t){Ts&&"__proto__"===t.name?Ts(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ps=function(e,t){if("__proto__"===t){if(!As.call(e,t))return;if(ks)return ks(e,t).value}return e[t]},Rs=function e(){var t,n,r,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(n in t)r=Ps(s,n),s!==(o=Ps(t,n))&&(c&&o&&(Ls(o)||(i=Os(o)))?(i?(i=!1,a=r&&Os(r)?r:[]):a=r&&Ls(r)?r:{},Ns(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Ns(s,{name:n,newValue:o}));return s};function Fs(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){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 js(e,t,n){var r=n.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:r,field:e.field.key()}),o}function Hs(e){var t=e.cache,n=e.f,r=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=r;if(o.field&&o.field!==n){var d=Fs(o.field,i,{cache:t});if(-1===d)return;p=Rs({qRow:a},d(s))}u[c]=js(o,p,{key:l})}function _s(e,t,n,r){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"===hs(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=hs(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Fs(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=Rs({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=js(d,C,{key:l});if(!d.filter||d.filter(C)){for(var S=0;S<f.length;S++){var M=p[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var A=0;A<E.length;A++)Hs({cache:n,f:u,mainCell:C,p:E[A],prop:f[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?A:f[S]});if(M.fields){var I=w[f[S]].map((function(e){return e.value})),T=w[f[S]].map((function(e){return e.label}));w[f[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[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,Ss(r.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function zs(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Vs(e,t){var n,r,o,i,a,s=new $s(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Us);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new $s(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ws)}function Us(e){return e.children}function Bs(e){e.data=e.data.data}function Ws(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function $s(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ys(e){if("function"!=typeof e)throw new Error;return e}$s.prototype=Vs.prototype={constructor:$s,count:function(){return this.eachAfter(zs)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Vs(this).eachBefore(Bs)}};var Ks={depth:-1},Js={};function Gs(e){return e.id}function Zs(e){return e.parentId}function Xs(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Xs(n,o[s]);Array.isArray(l)?a.push.apply(a,Ss(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Xs(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Qs(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,Ss(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,Ss(Qs(e[i].children,t-1,n)));return r}function el(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=Ss(Array(r)).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 Qs(e.children,i-1,n)}}return!1}function tl(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var nl=/^qDimensionInfo(?:\/(\d+))?/,rl=/^\/?qMeasureInfo\/(\d+)/,ol=/\/qAttrExprInfo\/(\d+)/,il=/\/qAttrDimInfo\/(\d+)/;function al(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 sl(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,p=n.qEffectiveInterColumnSortOrder,d=al(n);return nl.test(c)&&(o=!0,i=+nl.exec(c)[1],c=r.replace(nl,"")),rl.test(c)&&("K"===n.qMode?l=+rl.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+rl.exec(c)[1],u=0):u=+rl.exec(c)[1],c=c.replace(rl,"")),c&&(il.exec(c)?s=+il.exec(c)[1]:ol.exec(c)&&(a=+ol.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function ll(e,t){var n,r,o=el(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function ul(e,t,n){var r=n.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:r,field:e.field.key()}),o}function cl(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var n=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=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)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(p,r):p})}}var pl=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Xs(r,e);return i&&i[0]?(t.tree=Vs(i[0],n.children||function(e){return e[o]}),t.tree):null};function dl(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=qs({__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=Gs,t=Zs;function n(n){var r,o,i,a,s,l,u,c=n.length,p=new Array(c),d={};for(o=0;o<c;++o)r=n[o],s=p[o]=new $s(r),null!=(l=e(r,o,n))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?Js:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===Js)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=Ks,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ws),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=Ys(t),n):e},n.parentId=function(e){return arguments.length?(t=Ys(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var fl=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=ll(i,sl(p.field,{cube:r,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function ml(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?dl(t):pl(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=al(o),d=p[u-1];c=n.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(qs(qs({},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?sl(c,{cube:o,cache:n}):{fieldDepth:0};fl({propsArr:y,props:h,cube:o,cache:n,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,S=l[q[D].depth].main,M=x[D],E=M.data,A=ul(S,E,{key:i});cl({propsArr:C,props:w,item:M,itemData:E,ret:A,sourceKey:i,isTree:!0}),q[D].data=A}return a}function hl(e,t,n,r){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(!pl(s,n,e))continue;var u="object"===hs(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=sl(u,{cube:s,cache:n}),h=ll({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;fl({propsArr:f,props:p,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=hs(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!d.filter||d.filter(E)){var A=ul(d,E,{key:l});cl({propsArr:f,props:p,item:M,itemData:E,ret:A,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:A,target:D,tracker:q,trackType:x}),w.push(A)}}b?i.push.apply(i,Ss(r.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var gl,yl=(function(e){
|
|
7
|
+
import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q";import r 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 d from"react-dom";import{createGenerateClassName as p,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,useTranslator as x,useAction as q,useEffect as D,useModel as C,useApp as w,useStaleLayout as S,usePlugins as M,useConstraints as E,useTheme as A,useAppLayout as I,useEmbed as T,usePromise as k,useRect as O,onTakeSnapshot as L,useImperativeHandle as N}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":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function R(){return(R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const F=(e,t,n,r,o)=>e?e.getStyle(t,n,r):o;var j=Object.freeze({__proto__:null,getThemeStyle:F});function H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _=Object.prototype.hasOwnProperty,z=Object.prototype.toString,V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===z.call(e)},W=function(e){if(!e||"[object Object]"!==z.call(e))return!1;var t,n=_.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||_.call(e,t)},$=function(e,t){V&&"__proto__"===t.name?V(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,n,r,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(n in t)r=Y(s,n),s!==(o=Y(t,n))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=r&&B(r)?r:[]):a=r&&W(r)?r:{},$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:n,newValue:o}));return s};const J="center",G="bottom";var Z={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:G,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:G,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:G,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:G,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:n}])=>{Q[e]={width:t,height:n}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let n;for(n=0;n<X.length;++n)if(e>=X[n][1].width&&t>=X[n][1].height)return X[n][0];return"SPARK"}};function 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 ne=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function re(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const oe=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>oe.test(e),isRtlChar:e=>ie.test(e)||ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],se.isLtrChar(r))return"ltr";if(se.isRtlChar(r))return"rtl"}return"ltr"}},le={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?le.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=se.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=se.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:se.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,le.getColorSymbol(e,t)]:[le.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=se.detectTextDirection(e.value);let l;return l=o?r?[e.value,le.getColorSymbol(t,n)]:[le.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ue(e,t,n,r){const o=parseInt(F(e,t,n,r),10);if(!isNaN(o))return o}const ce=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function de(e,t){return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){return{position:e.position,justify:e.justify,fill:e.onBackground?F(t,n,"label.value","color"):ce(t),overflow:e.overflow,padding:e.padding}}(n,t,e.themeId))),fontSize:ue(t,e.themeId,"label.value","fontSize"),fontFamily:F(t,e.themeId,"label.value","fontFamily"),label:e.label}}function pe(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function me(){}var he=1/.7,ge="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",be=/^#([0-9a-f]{3,8})$/,xe=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),De=new RegExp("^rgba\\("+[ge,ge,ge,ye]+"\\)$"),Ce=new RegExp("^rgba\\("+[ve,ve,ve,ye]+"\\)$"),we=new RegExp("^hsl\\("+[ye,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[ye,ve,ve,ye]+"\\)$"),Me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Ie(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=be.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Te(t):3===n?new Le(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?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=xe.exec(e))?new Le(t[1],t[2],t[3],1):(t=qe.exec(e))?new Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=Ce.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?Fe(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Fe(t[1],t[2]/100,t[3]/100,t[4]):Me.hasOwnProperty(e)?Te(Me[e]):"transparent"===e?new Le(NaN,NaN,NaN,0):null}function Te(e){return new Le(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,n,r){return r<=0&&(e=t=n=NaN),new Le(e,t,n,r)}function Oe(e){return e instanceof me||(e=Ie(e)),e?new Le((e=e.rgb()).r,e.g,e.b,e.opacity):new Le}function Le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ne(){return"#"+Re(this.r)+Re(this.g)+Re(this.b)}function Pe(){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 Re(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Fe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function je(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof me||(e=Ie(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/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,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _e(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}pe(me,Ie,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return je(this).formatHsl()},formatRgb:Ae,toString:Ae}),pe(Le,(function(e,t,n,r){return 1===arguments.length?Oe(e):new Le(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Le(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:Ne,formatHex:Ne,formatRgb:Pe,toString:Pe})),pe(He,(function(e,t,n,r){return 1===arguments.length?je(e):new He(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Le(_e(e>=240?e-240:e+120,o,r),_e(e,o,r),_e(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ze=Math.PI/180,Ve=180/Math.PI,Ue=4/29,Be=6/29,We=3*Be*Be;function $e(e){if(e instanceof Ye)return new Ye(e.l,e.a,e.b,e.opacity);if(e instanceof et)return tt(e);e instanceof Le||(e=Oe(e));var t,n,r=Ze(e.r),o=Ze(e.g),i=Ze(e.b),a=Ke((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ke((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ke((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Ye(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ye(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ke(e){return e>.008856451679035631?Math.pow(e,1/3):e/We+Ue}function Je(e){return e>Be?e*e*e:We*(e-Ue)}function Ge(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ze(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Xe(e){if(e instanceof et)return new et(e.h,e.c,e.l,e.opacity);if(e instanceof Ye||(e=$e(e)),0===e.a&&0===e.b)return new et(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ve;return new et(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Qe(e,t,n,r){return 1===arguments.length?Xe(e):new et(e,t,n,null==r?1:r)}function et(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tt(e){if(isNaN(e.h))return new Ye(e.l,0,0,e.opacity);var t=e.h*ze;return new Ye(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}pe(Ye,(function(e,t,n,r){return 1===arguments.length?$e(e):new Ye(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return new Ye(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ye(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Le(Ge(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(n=.82521*Je(n))),Ge(-.9787684*t+1.9161415*e+.033454*n),Ge(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),pe(et,Qe,fe(me,{brighter:function(e){return new et(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new et(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return tt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return nt(e(t),n)}}(e))}(nt);function rt(){}function ot(e,t){var n=new rt;if(e instanceof rt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function it(){}rt.prototype=ot.prototype={constructor:rt,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 at=ot.prototype;function st(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ut(){}it.prototype={constructor:it,has:at.has,add:function(e){return this["$"+(e+="")]=e,this},remove:at.remove,clear:at.clear,values:at.keys,size:at.size,empty:at.empty,each:at.each};var ct=1/.7,dt="\\s*([+-]?\\d+)\\s*",pt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mt=/^#([0-9a-f]{3})$/,ht=/^#([0-9a-f]{6})$/,gt=new RegExp("^rgb\\("+[dt,dt,dt]+"\\)$"),yt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),vt=new RegExp("^rgba\\("+[dt,dt,dt,pt]+"\\)$"),bt=new RegExp("^rgba\\("+[ft,ft,ft,pt]+"\\)$"),xt=new RegExp("^hsl\\("+[pt,ft,ft]+"\\)$"),qt=new RegExp("^hsla\\("+[pt,ft,ft,pt]+"\\)$"),Dt={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 Ct(e){var t;return e=(e+"").trim().toLowerCase(),(t=mt.exec(e))?new Et((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=ht.exec(e))?wt(parseInt(t[1],16)):(t=gt.exec(e))?new Et(t[1],t[2],t[3],1):(t=yt.exec(e))?new Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vt.exec(e))?St(t[1],t[2],t[3],t[4]):(t=bt.exec(e))?St(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=xt.exec(e))?It(t[1],t[2]/100,t[3]/100,1):(t=qt.exec(e))?It(t[1],t[2]/100,t[3]/100,t[4]):Dt.hasOwnProperty(e)?wt(Dt[e]):"transparent"===e?new Et(NaN,NaN,NaN,0):null}function wt(e){return new Et(e>>16&255,e>>8&255,255&e,1)}function St(e,t,n,r){return r<=0&&(e=t=n=NaN),new Et(e,t,n,r)}function Mt(e){return e instanceof ut||(e=Ct(e)),e?new Et((e=e.rgb()).r,e.g,e.b,e.opacity):new Et}function Et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function At(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function It(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,n,r)}function Tt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof ut||(e=Ct(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/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,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ot(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}st(ut,Ct,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),st(Et,(function(e,t,n,r){return 1===arguments.length?Mt(e):new Et(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,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 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+")")}})),st(kt,(function(e,t,n,r){return 1===arguments.length?Tt(e):new kt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,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,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Et(Ot(e>=240?e-240:e+120,o,r),Ot(e,o,r),Ot(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Lt=Math.PI/180,Nt=180/Math.PI,Pt=4/29,Rt=6/29,Ft=3*Rt*Rt;function jt(e){if(e instanceof Ht)return new Ht(e.l,e.a,e.b,e.opacity);if(e instanceof Wt){if(isNaN(e.h))return new Ht(e.l,0,0,e.opacity);var t=e.h*Lt;return new Ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Et||(e=Mt(e));var n,r,o=Ut(e.r),i=Ut(e.g),a=Ut(e.b),s=_t((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=_t((.4360747*o+.3850649*i+.1430804*a)/.96422),r=_t((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Ht(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Ht(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function _t(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ft+Pt}function zt(e){return e>Rt?e*e*e:Ft*(e-Pt)}function Vt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ut(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bt(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(e instanceof Ht||(e=jt(e)),0===e.a&&0===e.b)return new Wt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Nt;return new Wt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Wt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}st(Ht,(function(e,t,n,r){return 1===arguments.length?jt(e):new Ht(e,t,n,null==r?1:r)}),lt(ut,{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,n=isNaN(this.b)?e:e-this.b/200;return new Et(Vt(3.1338561*(t=.96422*zt(t))-1.6168667*(e=1*zt(e))-.4906146*(n=.82521*zt(n))),Vt(-.9787684*t+1.9161415*e+.033454*n),Vt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),st(Wt,(function(e,t,n,r){return 1===arguments.length?Bt(e):new Wt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Wt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Wt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return jt(this).rgb()}}));var $t=-.29227,Yt=-.90649,Kt=1.97294,Jt=Kt*Yt,Gt=1.78277*Kt,Zt=-.6557636667999999;function Xt(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);e instanceof Et||(e=Mt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Zt*r+Jt*t-Gt*n)/(Zt+Jt-Gt),i=r-o,a=(Kt*(n-o)-$t*i)/Yt,s=Math.sqrt(a*a+i*i)/(Kt*o*(1-o)),l=s?Math.atan2(a,i)*Nt-120:NaN;return new Qt(l<0?l+360:l,s,o,e.opacity)}function Qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function en(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}st(Qt,(function(e,t,n,r){return 1===arguments.length?Xt(e):new Qt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Lt,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Et(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*($t*r+Yt*o)),255*(t+n*(Kt*r)),this.opacity)}}));var tn,nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){return new on(e)}function on(e){if(!(t=nn.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 an(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}rn.prototype=on.prototype,on.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 sn={"%":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 an(100*e,t)},r:an,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(tn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+en(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 ln(e){return e}var un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):ln,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):ln,s=e.percent||"%";function l(e){var t=(e=rn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,p=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(p=!0,h="g"):sn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=sn[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,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])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?un[8+tn/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}}p&&!c&&(e=r(e,1/0));var C=x.length+e.length+q.length,w=C<d?new Array(d-C+1).join(t):"";switch(p&&c&&(e=r(w+e,w.length?d-q.length:1/0),w=""),n){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 n=l(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=en(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=un[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){cn(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var dn=new Date,pn=new Date;function fn(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return fn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return dn.setTime(+t),pn.setTime(+r),e(dn),e(pn),Math.floor(n(dn,pn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var mn=fn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));mn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?fn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):mn:null};fn((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()})),fn((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()})),fn((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 hn=fn((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 gn(e){return fn((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 yn=gn(0),vn=gn(1);gn(2),gn(3);var bn=gn(4);gn(5),gn(6),fn((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 xn=fn((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()}));xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},fn((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()})),fn((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 qn=fn((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 Dn(e){return fn((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 Cn=Dn(0),wn=Dn(1);Dn(2),Dn(3);var Sn=Dn(4);Dn(5),Dn(6),fn((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 Mn=fn((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 En(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 An(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 In(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Tn,kn,On,Ln={"-":"",_:" ",0:"0"},Nn=/^\s*\d+/,Pn=/^%/,Rn=/[\\^$*+?|[\]().{}]/g;function Fn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function jn(e){return e.replace(Rn,"\\$&")}function Hn(e){return new RegExp("^(?:"+e.map(jn).join("|")+")","i")}function _n(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function zn(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=Nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Kn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=Nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function er(e,t,n){var r=Nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tr(e,t,n){var r=Nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=Nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rr(e,t,n){var r=Pn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function or(e,t,n){var r=Nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ir(e,t,n){var r=Nn.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ar(e,t){return Fn(e.getDate(),t,2)}function sr(e,t){return Fn(e.getHours(),t,2)}function lr(e,t){return Fn(e.getHours()%12||12,t,2)}function ur(e,t){return Fn(1+hn.count(xn(e),e),t,3)}function cr(e,t){return Fn(e.getMilliseconds(),t,3)}function dr(e,t){return cr(e,t)+"000"}function pr(e,t){return Fn(e.getMonth()+1,t,2)}function fr(e,t){return Fn(e.getMinutes(),t,2)}function mr(e,t){return Fn(e.getSeconds(),t,2)}function hr(e){var t=e.getDay();return 0===t?7:t}function gr(e,t){return Fn(yn.count(xn(e),e),t,2)}function yr(e,t){var n=e.getDay();return e=n>=4||0===n?bn(e):bn.ceil(e),Fn(bn.count(xn(e),e)+(4===xn(e).getDay()),t,2)}function vr(e){return e.getDay()}function br(e,t){return Fn(vn.count(xn(e),e),t,2)}function xr(e,t){return Fn(e.getFullYear()%100,t,2)}function qr(e,t){return Fn(e.getFullYear()%1e4,t,4)}function Dr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fn(t/60|0,"0",2)+Fn(t%60,"0",2)}function Cr(e,t){return Fn(e.getUTCDate(),t,2)}function wr(e,t){return Fn(e.getUTCHours(),t,2)}function Sr(e,t){return Fn(e.getUTCHours()%12||12,t,2)}function Mr(e,t){return Fn(1+qn.count(Mn(e),e),t,3)}function Er(e,t){return Fn(e.getUTCMilliseconds(),t,3)}function Ar(e,t){return Er(e,t)+"000"}function Ir(e,t){return Fn(e.getUTCMonth()+1,t,2)}function Tr(e,t){return Fn(e.getUTCMinutes(),t,2)}function kr(e,t){return Fn(e.getUTCSeconds(),t,2)}function Or(e){var t=e.getUTCDay();return 0===t?7:t}function Lr(e,t){return Fn(Cn.count(Mn(e),e),t,2)}function Nr(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Sn(e):Sn.ceil(e),Fn(Sn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function Pr(e){return e.getUTCDay()}function Rr(e,t){return Fn(wn.count(Mn(e),e),t,2)}function Fr(e,t){return Fn(e.getUTCFullYear()%100,t,2)}function jr(e,t){return Fn(e.getUTCFullYear()%1e4,t,4)}function Hr(){return"+0000"}function _r(){return"%"}function zr(e){return+e}function Vr(e){return Math.floor(+e/1e3)}!function(e){Tn=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Hn(o),c=_n(o),d=Hn(i),p=_n(i),f=Hn(a),m=_n(a),h=Hn(s),g=_n(s),y=Hn(l),v=_n(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:ar,e:ar,f:dr,H:sr,I:lr,j:ur,L:cr,m:pr,M:fr,p:function(e){return o[+(e.getHours()>=12)]},Q:zr,s:Vr,S:mr,u:hr,U:gr,V:yr,w:vr,W:br,x:null,X:null,y:xr,Y:qr,Z:Dr,"%":_r},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:Cr,e:Cr,f:Ar,H:wr,I:Sr,j:Mr,L:Er,m:Ir,M:Tr,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:zr,s:Vr,S:kr,u:Or,U:Lr,V:Nr,w:Pr,W:Rr,x:null,X:null,y:Fr,Y:jr,Z:Hr,"%":_r},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:Gn,e:Gn,f:nr,H:Xn,I:Xn,j:Zn,L:tr,m:Jn,M:Qn,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:or,s:ir,S:er,u:Vn,U:Un,V:Bn,w:zn,W:Wn,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Yn,Y:$n,Z:Kn,"%":rr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Ln[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=In(1900);if(w(i,e,n+="",0)!=n.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=(r=An(In(i.y))).getUTCDay(),r=o>4||0===o?wn.ceil(r):wn(r),r=qn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(In(i.y))).getDay(),r=o>4||0===o?vn.ceil(r):vn(r),r=hn.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.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?An(In(i.y)).getUTCDay():t(In(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,An(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Ln?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=D(n,b),b.X=D(r,b),b.c=D(t,b),x.x=D(n,x),x.X=D(r,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+="",En);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,An);return t.toString=function(){return e},t}}}(e),kn=Tn.utcFormat,On=Tn.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||kn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||On("%Y-%m-%dT%H:%M:%S.%LZ");const Ur=K.bind(null,!0),Br={},{isArray:Wr}=Array;function $r(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Yr(e){return void 0===e}function Kr(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jr(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Yr(e[r||t])?i:e[t],e=e[r||t]})),e}function Gr(e,t){let n=!0;if($r(e)&&$r(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Gr(e[r],t[r])||(n=!1)})),n);if(Wr(e)&&Wr(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Gr(e[n],t[n]))return!1;return!0}return e===t}Br.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ur({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Gr(i,a)||Kr(t,o)||(Yr(a)?r.push({op:"add",path:s,value:i}):$r(i)&&$r(a)?r=r.concat(Br.generate(a,i,s)):Wr(i)&&Wr(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Yr(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Gr(t,o))return r;if(!Yr(t[0])&&Yr(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Br.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Yr(t[o])&&!Kr(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Br.apply=function(e,t){t.forEach((t=>{let n=Jr(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Wr(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Wr(o)&&Wr(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($r(o)&&$r(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Kr(a,e)&&delete a[e]})),Ur(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Jr(e,t.from);Wr(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Wr(n)?n.splice(+r,1):delete n[r]);var a}))},Br.clone=function(e){return Ur({},e)},Br.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Br.updateObject=function(e,t){Object.keys(e).length?Br.apply(e,Br.generate(e,t)):Ur(e,t)};const Zr=[[2,4,6],[2,4],[3]],Xr=[,[,,[[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 Qr(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function eo(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Qr(e[r],t,n)}!function(){let e,t;for(eo(Zr,1,10),e=0;e<Xr.length;e++)if(Xr[e])for(t=0;t<Xr[e].length;t++)Array.isArray(Xr[e][t])&&eo(Xr[e][t])}();var to={exports:{}};function no(){}function ro(){}ro.resetWarningCache=no;to.exports=function(){function e(e,t,n,r,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 n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ro,resetWarningCache:no};return n.PropTypes=n,n}();var oo=to.exports;function io(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ao({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:io(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}const so={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"},lo={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"},uo="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",co={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"},po={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 fo(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Br.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function mo(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),fo(e,a,s)}))}function ho({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const 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){mo(r,e,t,"qDimensions",a)}}}function go(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function yo({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const 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(n)},changeTo(e,t){mo(o,e,t,"qMeasures",i,a)}}}function vo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const bo={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"}}},xo=({children:e,...t})=>o.createElement(i,R({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function qo(){function e({title:e,selected:t,onClick:n}){const r=se.detectTextDirection(e);return o.createElement(l,{role:"list",button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(ao,{d:t?uo:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:d}){const p=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,R({anchorEl:t,open:d,onClose:c},bo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,"aria-label":"use the tab keys to navigate between the options",component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),p))}e.propTypes={title:oo.string.isRequired,selected:oo.bool,onClick:oo.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:oo.any,changeTo:oo.func.isRequired,current:oo.string.isRequired,dir:oo.string.isRequired,dock:oo.string.isRequired,list:oo.array,onClose:oo.func.isRequired,show:oo.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n 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:n,translator:r,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},d=e.breadcrumbs.length,p=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>o.createElement(xo,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},o.createElement("span",{style:c},t),o.createElement(ao,R({},po,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||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=se.detectTextDirection(e.text),v=`Currently ${e.text} is selcted. Click to expand or press enter key to open the list`,b=o.createElement(xo,{"aria-label":v,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(ao,R({},lo,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(ao,R({},co,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(ao,R({},so,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},b),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&ne(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:oo.bool.isRequired,padding:oo.string,minWidth:oo.string,titleData:oo.shape({breadcrumbs:oo.arrayOf(oo.string).isRequired,drilldown:oo.bool.isRequired,index:oo.number.isRequired,locked:oo.bool.isRequired,text:oo.string.isRequired,popoverText:oo.string.isRequired,drillUp:oo.func}).isRequired,popover:oo.shape({dir:oo.string.isRequired,dock:oo.string.isRequired,changeTo:oo.func.isRequired,getAlternatives:oo.func.isRequired}),translator:oo.shape({get:oo.func.isRequired}).isRequired,selections:oo.shape({isActive:oo.func,addListener:oo.func,removeListener:oo.func}),style:oo.shape({fontSize:oo.string,color:oo.string,fontFamily:oo.string}).isRequired,isDimension:oo.bool.isRequired,hasAlternative:oo.bool.isRequired},n.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:d,onChangeToAlternative:p,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 n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?ho:yo,S=u?go:vo,M=d&&d.colorSupport&&d.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:d,onChange:p,skipAttributeExpressions:g,translator:y}),E=(A=this.settings.settings).isDimension&&ne(A,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var A;const I=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,d),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,titleData:a,model:d,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},I)}}}function Do(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Co(e){if(e.type)return e;if("#"===e.charAt(0))return Co(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function So(e){var t="hsl"===(e=Co(e)).type?Co(function(e){var t=(e=Co(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/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])),wo({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 Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eo(){return(Eo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ao(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Io(){return(Io=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function To(e){return(To="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"===To(Symbol.iterator)?function(e){return To(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":To(e)})(e)}function Oo(e){return e&&"object"===ko(e)&&!Array.isArray(e)}function Lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Io({},e):e;return Oo(e)&&Oo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Oo(t[o])&&o in e?r[o]=Lo(e[o],t[o],n):r[o]=t[o])})),r}var No=["xs","sm","md","lg","xl"];function Po(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Ao(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=No.indexOf(t)+1;return r===No.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[No[r]]-a/100).concat(o,")")}return Eo({keys:No,values:n,up:l,down:function(e){var t=No.indexOf(e)+1,r=n[No[t]];return t===No.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Ro(e,t,n){var r;return Eo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo({paddingLeft:t(2),paddingRight:t(2)},n,Mo({},e.up("sm"),Eo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Mo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Mo(r,e.up("sm"),{minHeight:64}),r)},n)}var Fo={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"},jo={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"},_o={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"},zo={black:"#000",white:"#fff"},Vo={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:zo.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)"}},Uo={text:{primary:zo.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:zo.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,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wo(e)}(e.main,1.5*r)))}function Wo(e){var t=e.primary,n=void 0===t?{light:Fo[300],main:Fo[500],dark:Fo[700]}:t,r=e.secondary,o=void 0===r?{light:jo.A200,main:jo.A400,dark:jo.A700}:r,i=e.error,a=void 0===i?{light:_o[300],main:_o[500],dark:_o[700]}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,d=e.tonalOffset,p=void 0===d?.2:d,f=Ao(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=So(e),r=So(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Uo.text.primary)>=c?Uo.text.primary:Vo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Eo({},e)).main&&e[t]&&(e.main=e[t]),Bo(e,"light",n,p),Bo(e,"dark",r,p),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Uo,light:Vo};return Lo(Eo({common:zo,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ho,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:p},g[l]),f,{clone:!1})}function $o(e){return Math.round(1e5*e)/1e5}var Yo={textTransform:"uppercase"};function Ko(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,p=void 0===d?500:d,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Ao(n,["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,n,r,i){return Eo({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat($o(r/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(p,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(p,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(p,14,1.75,.4,Yo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Yo)};return Lo(Eo({htmlFontSize:g,pxToRem:q,round:$o,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:p,fontWeightBold:m},C),b,{clone:!1})}function Jo(){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 Go=["none",Jo(0,2,1,-1,0,1,1,0,0,1,3,0),Jo(0,3,1,-2,0,2,2,0,0,1,5,0),Jo(0,3,3,-2,0,3,4,0,0,1,8,0),Jo(0,2,4,-1,0,4,5,0,0,1,10,0),Jo(0,3,5,-1,0,5,8,0,0,1,14,0),Jo(0,3,5,-1,0,6,10,0,0,1,18,0),Jo(0,4,5,-2,0,7,10,1,0,2,16,1),Jo(0,5,5,-3,0,8,10,1,0,3,14,2),Jo(0,5,6,-3,0,9,12,1,0,3,16,2),Jo(0,6,6,-3,0,10,14,1,0,4,18,3),Jo(0,6,7,-4,0,11,15,1,0,4,20,3),Jo(0,7,8,-4,0,12,17,2,0,5,22,4),Jo(0,7,8,-4,0,13,19,2,0,5,24,4),Jo(0,7,9,-4,0,14,21,2,0,5,26,4),Jo(0,8,9,-5,0,15,22,2,0,6,28,5),Jo(0,8,10,-5,0,16,24,2,0,6,30,5),Jo(0,8,11,-5,0,17,26,2,0,6,32,5),Jo(0,9,11,-5,0,18,28,2,0,7,34,6),Jo(0,9,12,-6,0,19,29,2,0,7,36,6),Jo(0,10,13,-6,0,20,31,3,0,8,38,7),Jo(0,10,13,-6,0,21,33,3,0,8,40,7),Jo(0,10,14,-6,0,22,35,3,0,8,42,7),Jo(0,11,14,-7,0,23,36,3,0,9,44,8),Jo(0,11,15,-7,0,24,38,3,0,9,46,8)],Zo={borderRadius:4};function Xo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Qo={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)"},ei={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ti=function(e){return"".concat(Math.round(e),"ms")},ni={easing:Qo,duration:ei,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?ei.standard:n,o=t.easing,i=void 0===o?Qo.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 r?r:ti(r)," ").concat(i," ").concat("string"==typeof s?s:ti(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))}},ri={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,d=Ao(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),p=Wo(a),f=Po(n),m=Xo(l),h=Eo({breakpoints:f,direction:"ltr",mixins:Ro(f,m,o),overrides:{},palette:p,props:{},shadows:s||Go,typography:Ko(p,c),spacing:m},Lo({shape:Zo,transitions:ni,zIndex:ri},d));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const ii=p({productionPrefix:"qd923",disableGlobal:!0,seed:""});function ai(){function e({x:e,y:t,width:n,height:r,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(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,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:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",d.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:oi},e))}(e,ii),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&d.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(d.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function si(){return function(e){e.renderer("react",ai()),e.component("data-title",qo()),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:oo.string.isRequired,spanStyle:oo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function li(e){return Qe(e).l<70}function ui(e,t){const n=Qe(e).l/100,r=Qe(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ci(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var di={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(ui(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ci({r:s,a:e},n),i=ci({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:li(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function pi(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function fi(e){const{size:t,angle:n}=e,r={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,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{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:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:pi(s)}}var mi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/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=fi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function hi(e){return(hi="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 gi(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function yi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gi(i,r,o,a,s,"next",e)}function s(e){gi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){vi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||wi(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 Ci(e){return function(e){if(Array.isArray(e))return Si(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wi(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 wi(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mi=Object.prototype.hasOwnProperty,Ei=Object.prototype.toString,Ai=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,Ti=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ei.call(e)},ki=function(e){if(!e||"[object Object]"!==Ei.call(e))return!1;var t,n=Mi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mi.call(e,t)},Oi=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},Li=function(e,t){if("__proto__"===t){if(!Mi.call(e,t))return;if(Ii)return Ii(e,t).value}return e[t]},Ni=function e(){var t,n,r,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(n in t)r=Li(s,n),s!==(o=Li(t,n))&&(c&&o&&(ki(o)||(i=Ti(o)))?(i?(i=!1,a=r&&Ti(r)?r:[]):a=r&&ki(r)?r:{},Oi(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Oi(s,{name:n,newValue:o}));return s};function Pi(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Ri(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Fi(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function ji(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Hi(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function _i(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function zi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vi(){}var Ui=1/.7,Bi="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yi=/^#([0-9a-f]{3,8})$/,Ki=new RegExp("^rgb\\("+[Bi,Bi,Bi]+"\\)$"),Ji=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgba\\("+[Bi,Bi,Bi,Wi]+"\\)$"),Zi=new RegExp("^rgba\\("+[$i,$i,$i,Wi]+"\\)$"),Xi=new RegExp("^hsl\\("+[Wi,$i,$i]+"\\)$"),Qi=new RegExp("^hsla\\("+[Wi,$i,$i,Wi]+"\\)$"),ea={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 ta(){return this.rgb().formatHex()}function na(){return this.rgb().formatRgb()}function ra(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?oa(t):3===n?new la(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ia(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ia(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=Ki.exec(e))?new la(t[1],t[2],t[3],1):(t=Ji.exec(e))?new la(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Gi.exec(e))?ia(t[1],t[2],t[3],t[4]):(t=Zi.exec(e))?ia(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xi.exec(e))?pa(t[1],t[2]/100,t[3]/100,1):(t=Qi.exec(e))?pa(t[1],t[2]/100,t[3]/100,t[4]):ea.hasOwnProperty(e)?oa(ea[e]):"transparent"===e?new la(NaN,NaN,NaN,0):null}function oa(e){return new la(e>>16&255,e>>8&255,255&e,1)}function ia(e,t,n,r){return r<=0&&(e=t=n=NaN),new la(e,t,n,r)}function aa(e){return e instanceof Vi||(e=ra(e)),e?new la((e=e.rgb()).r,e.g,e.b,e.opacity):new la}function sa(e,t,n,r){return 1===arguments.length?aa(e):new la(e,t,n,null==r?1:r)}function la(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ua(){return"#"+da(this.r)+da(this.g)+da(this.b)}function ca(){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 da(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function pa(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ma(e,t,n,r)}function fa(e){if(e instanceof ma)return new ma(e.h,e.s,e.l,e.opacity);if(e instanceof Vi||(e=ra(e)),!e)return new ma;if(e instanceof ma)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ma(a,s,l,e.opacity)}function ma(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ha(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}_i(Vi,ra,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ta,formatHex:ta,formatHsl:function(){return fa(this).formatHsl()},formatRgb:na,toString:na}),_i(la,sa,zi(Vi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new la(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:ua,formatHex:ua,formatRgb:ca,toString:ca})),_i(ma,(function(e,t,n,r){return 1===arguments.length?fa(e):new ma(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new ma(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ma(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new la(ha(e>=240?e-240:e+120,o,r),ha(e,o,r),ha(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ga=Math.PI/180,ya=180/Math.PI,va=4/29,ba=6/29,xa=3*ba*ba;function qa(e){if(e instanceof Da)return new Da(e.l,e.a,e.b,e.opacity);if(e instanceof Aa)return Ia(e);e instanceof la||(e=aa(e));var t,n,r=Ma(e.r),o=Ma(e.g),i=Ma(e.b),a=Ca((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ca((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ca((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Da(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Da(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ca(e){return e>.008856451679035631?Math.pow(e,1/3):e/xa+va}function wa(e){return e>ba?e*e*e:xa*(e-va)}function Sa(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ma(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ea(e){if(e instanceof Aa)return new Aa(e.h,e.c,e.l,e.opacity);if(e instanceof Da||(e=qa(e)),0===e.a&&0===e.b)return new Aa(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ya;return new Aa(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Aa(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ia(e){if(isNaN(e.h))return new Da(e.l,0,0,e.opacity);var t=e.h*ga;return new Da(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ta(e){return function(){return e}}function ka(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ta(isNaN(e)?t:e)}_i(Da,(function(e,t,n,r){return 1===arguments.length?qa(e):new Da(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return new Da(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Da(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new la(Sa(3.1338561*(t=.96422*wa(t))-1.6168667*(e=1*wa(e))-.4906146*(n=.82521*wa(n))),Sa(-.9787684*t+1.9161415*e+.033454*n),Sa(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),_i(Aa,(function(e,t,n,r){return 1===arguments.length?Ea(e):new Aa(e,t,n,null==r?1:r)}),zi(Vi,{brighter:function(e){return new Aa(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Aa(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ia(this).rgb()}}));var Oa=function e(t){var n=function(e){return 1==(e=+e)?ka:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ta(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=sa(e)).r,(t=sa(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ka(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),La=/^class(-pyramid)?/,Na=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Ci(c))),i=Math.max.apply(Math,[i].concat(Ci(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,n=e.max,r=e.limits,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:d,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var p=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[d[0]];for(var f=0;f<c.length;f+=1)if(p[f]){var m=d[f],h=d[f+1],g=Oa(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&p[f+1]&&(u.range.push(d[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(d[f]),u.range.push(d[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(d[d.length-1]),u.domain.push(i)}else u.domain=c,u.range=d;return u};function Pa(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[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<=r||l>=o?Math.max(l,r):Pa(e,t,n,r+1,o)}var Ra=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(o=n.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=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ci(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!d)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Ci(c)),u.max=Math.max.apply(Math,Ci(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var p=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=p&&La.test(p.type)?"categorical":"continuous","categorical"===u.type&&(i=p.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ci(p.colors.map((function(e){return e?e.length:0})))):p.colors.length)}if("categorical"===u.type){for(var f=d?Pa(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),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Fa(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function ja(e){var t,n=e.cm,r=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,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),xi(xi({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return xi(xi({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Ha(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function _a(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(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=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function za(e,t,n,r){var o,i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Fa:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Ra(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var d=c.raw().coloring;d&&d.gradient&&Ni(u,Na(e,d.gradient,u,c))}else u.auxiliary=s;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.getCDef,i=void 0===o?ji:o,a=r.getCByField,s=void 0===a?Hi:a,l=r.getPersistence,u=void 0===l?Fi:l,c=i(t,n),d=s(n,c),p=d?d.raw():{},f=n&&n.pic?n.pic.raw():{};if(p.qError||p.qSize&&0===p.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:p.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===p.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&d&&(m.label=d.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Ni(m,u(t,n,c,d,{byRow:Ri,byElemNo:Pi})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ra(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=i?i.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var p=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){p.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:p.length?p[0]:void 0,explicit:p.length?{domain:p,range:f}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return ja({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Ha(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=_a(e.measureOverrides,e.explicit),Ha(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=_a(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function Va(e){var t=xi({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Ni(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Ni(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Ni(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var i=n.pic.field(e.field);return Na(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=xi({},e);Ni(a,Pi(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Ni(a,Pi(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Ni(a,Pi(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[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;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=xi(xi({},e),r.getDataColorSpecials())),n.settings=Ni(e,za(this,n,t,e))}return n.settings}};return o}var Ua=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Ba=function(e){throw e.isHandled=!0,e},Wa=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},$a=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Ya=function(e,t){var n=t.layout,r=t.model,o=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ba):Promise.reject()};function Ka(e){var t=e.hc,n=e.source,r=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:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Ja(e){return function(t){return"object"===hi(t.datum[e])?t.datum[e].value:void 0}}function Ga(e){return"object"===hi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Za(e){return-3===e.datum.value}var Xa=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},Qa=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function es(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Xa(i,r,o)},show:"function"==typeof i.show?function(){return Qa(i,l,a)}:Qa(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(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ts(e,t,n){var r=[],o=[],i=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=es(e,t);if(!r.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,d=t.theme,p=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 Ni(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in p?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:d?d.getStyle(i,"legend.label","color"):void 0,fontSize:d?d.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:d?d.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=es(e,t);return!!u.show&&Ni(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!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,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=n.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,n)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!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(r,"-cat")}))}},events:(e={},vi(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),vi(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),vi(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var ns=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function rs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=Va(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return Wa(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return $a(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return Ya(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=Ua,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=xi({},o),r={},!n.key)throw new Error("Missing key");t.set(xi(xi({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=xi(xi({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,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 n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Ci(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:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ci((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ci((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=Ka({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var p=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=p++,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:d,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=xi(xi({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Ni({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Ni({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,o=Ja(r),i=Ja("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return Za(e)||i(e)?u:l}:n[t]?function(e){return Za(e)?u:Ga(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Za(e)||i(e)?u:Ga(e)?l:c}:"color"===d?function(e){return Za(e)||i(e)?u:Ga(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Ja("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=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?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?ns(e.qNum):e.qText&&ra(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var d=vi({},u,n);return r.qDimensionInfo.length>1&&(d["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(u,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx: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:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,d=void 0===c?{}:c,p=e.style,f=void 0===p?{}:p,m=arguments.length>1?arguments[1]:void 0;return ts({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:d,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var os=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function is(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(os),i=r.some(os),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function as(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=xi(xi(xi({},e),t),{},{colorProps:xi(xi({},e.colorProps),t.colorProps||{})});return n}var ss=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ls(e){var t,n=e.qHyperCube.qDimensionInfo.some(ss),r=e.qHyperCube.qMeasureInfo.some(ss),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var us=function(){};function cs(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function ds(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}function ps(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function fs(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function ms(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function hs(e){return(hs="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 gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ys(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vs(e,t,n){return t&&ys(e.prototype,t),n&&ys(e,n),e}function bs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xs(Object(n),!0).forEach((function(t){bs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ds(e,t){return(Ds=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cs(){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 ws(e,t,n){return(ws=Cs()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ds(o,n.prototype),o}).apply(null,arguments)}function Ss(e){return function(e){if(Array.isArray(e))return Es(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ms(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 Ms(e,t){if(e){if("string"==typeof e)return Es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Es(e,t):void 0}}function Es(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var As=Object.prototype.hasOwnProperty,Is=Object.prototype.toString,Ts=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,Os=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Is.call(e)},Ls=function(e){if(!e||"[object Object]"!==Is.call(e))return!1;var t,n=As.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&As.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||As.call(e,t)},Ns=function(e,t){Ts&&"__proto__"===t.name?Ts(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ps=function(e,t){if("__proto__"===t){if(!As.call(e,t))return;if(ks)return ks(e,t).value}return e[t]},Rs=function e(){var t,n,r,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(n in t)r=Ps(s,n),s!==(o=Ps(t,n))&&(c&&o&&(Ls(o)||(i=Os(o)))?(i?(i=!1,a=r&&Os(r)?r:[]):a=r&&Ls(r)?r:{},Ns(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Ns(s,{name:n,newValue:o}));return s};function Fs(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){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 js(e,t,n){var r=n.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:r,field:e.field.key()}),o}function Hs(e){var t=e.cache,n=e.f,r=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,d=r;if(o.field&&o.field!==n){var p=Fs(o.field,i,{cache:t});if(-1===p)return;d=Rs({qRow:a},p(s))}u[c]=js(o,d,{key:l})}function _s(e,t,n,r){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"===hs(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),d=c.props,p=c.main,f=Object.keys(d),m=!!o[a].trackBy,h=hs(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Fs(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=Rs({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=js(p,C,{key:l});if(!p.filter||p.filter(C)){for(var S=0;S<f.length;S++){var M=d[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var A=0;A<E.length;A++)Hs({cache:n,f:u,mainCell:C,p:E[A],prop:f[S],props:d,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?A:f[S]});if(M.fields){var I=w[f[S]].map((function(e){return e.value})),T=w[f[S]].map((function(e){return e.label}));w[f[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[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,Ss(r.collect(y,{main:p,propsArr:f,props:d}))):i.push.apply(i,v)}return i}function zs(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Vs(e,t){var n,r,o,i,a,s=new $s(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Us);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new $s(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ws)}function Us(e){return e.children}function Bs(e){e.data=e.data.data}function Ws(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function $s(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ys(e){if("function"!=typeof e)throw new Error;return e}$s.prototype=Vs.prototype={constructor:$s,count:function(){return this.eachAfter(zs)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Vs(this).eachBefore(Bs)}};var Ks={depth:-1},Js={};function Gs(e){return e.id}function Zs(e){return e.parentId}function Xs(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Xs(n,o[s]);Array.isArray(l)?a.push.apply(a,Ss(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Xs(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Qs(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,Ss(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,Ss(Qs(e[i].children,t-1,n)));return r}function el(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=Ss(Array(r)).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 Qs(e.children,i-1,n)}}return!1}function tl(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var nl=/^qDimensionInfo(?:\/(\d+))?/,rl=/^\/?qMeasureInfo\/(\d+)/,ol=/\/qAttrExprInfo\/(\d+)/,il=/\/qAttrDimInfo\/(\d+)/;function al(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 sl(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,d=n.qEffectiveInterColumnSortOrder,p=al(n);return nl.test(c)&&(o=!0,i=+nl.exec(c)[1],c=r.replace(nl,"")),rl.test(c)&&("K"===n.qMode?l=+rl.exec(c)[1]:d&&-1!==d.indexOf(-1)?(l=+rl.exec(c)[1],u=0):u=+rl.exec(c)[1],c=c.replace(rl,"")),c&&(il.exec(c)?s=+il.exec(c)[1]:ol.exec(c)&&(a=+ol.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?p[i]:d?d.indexOf(i):i:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function ll(e,t){var n,r,o=el(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function ul(e,t,n){var r=n.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:r,field:e.field.key()}),o}function cl(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,d=void 0;l.fields&&(c=[],d=[]);for(var p=function(e){var n=u[e],p=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(p=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),p&&(m=g.map(p),p=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=o,y=o)),l.fields){var v=p?p(m):m;c.push(v),d.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=p?p(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)p(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(d,r):d})}}var dl=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Xs(r,e);return i&&i[0]?(t.tree=Vs(i[0],n.children||function(e){return e[o]}),t.tree):null};function pl(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,d=0;d<o.length;d++){var p=l[o[d]],f="".concat(u,"__").concat(p.qText);a[f]||(a[f]=qs({__id:f,__parent:u,qValues:[]},p),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=Gs,t=Zs;function n(n){var r,o,i,a,s,l,u,c=n.length,d=new Array(c),p={};for(o=0;o<c;++o)r=n[o],s=d[o]=new $s(r),null!=(l=e(r,o,n))&&(l+="")&&(p[u="$"+(s.id=l)]=u in p?Js:s);for(o=0;o<c;++o)if(s=d[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=p["$"+l]))throw new Error("missing: "+l);if(a===Js)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=Ks,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ws),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=Ys(t),n):e},n.parentId=function(e){return arguments.length?(t=Ys(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var fl=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var d=u[c];if(d.field!==a){var p=ll(i,sl(d.field,{cube:r,cache:o}));d.accessor=p.nodeFn,d.valueAccessor=p.valueFn,d.attrAccessor=p.attrFn}}};function ml(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?pl(t):dl(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var d=al(o),p=d[u-1];c=n.fields[p]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(qs(qs({},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?sl(c,{cube:o,cache:n}):{fieldDepth:0};fl({propsArr:y,props:h,cube:o,cache:n,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,S=l[q[D].depth].main,M=x[D],E=M.data,A=ul(S,E,{key:i});cl({propsArr:C,props:w,item:M,itemData:E,ret:A,sourceKey:i,isTree:!0}),q[D].data=A}return a}function hl(e,t,n,r){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(!dl(s,n,e))continue;var u="object"===hs(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),d=c.props,p=c.main,f=Object.keys(d),m=sl(u,{cube:s,cache:n}),h=ll({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;fl({propsArr:f,props:d,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=hs(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!p.filter||p.filter(E)){var A=ul(p,E,{key:l});cl({propsArr:f,props:d,item:M,itemData:E,ret:A,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:A,target:D,tracker:q,trackType:x}),w.push(A)}}b?i.push.apply(i,Ss(r.collect(D,{main:p,propsArr:f,props:d}))):i.push.apply(i,w)}return i}var gl,yl=(function(e){
|
|
8
8
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,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(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(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"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(gl={exports:{}}),gl.exports);function vl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var bl={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"},xl=/%$/,ql=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Dl=/^\(oct\)/i,Cl=/^\(dec\)/i,wl=/^\(hex\)/i,Sl=/^\(bin\)/i,Ml=/^\(rom\)/i,El=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Al=/#|0/g;function Il(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Tl(e,t,n){var r=vl(e);return n?r:new RegExp(r||"",t)}function kl(e,t,n){var r,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=n)&&(f=vl(f)),d&&(d=vl(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===n&&(o=(r=i.split(n)).pop(),i=r.join("")+n+o,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(i=i.replace(Tl(l,"g"),t)),u=n,n=".",u&&(i=i.replace(Tl(u,"g"),n)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Al)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=xl.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Tl(t,null,!0),"|").concat(Tl(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Ol=function(){function e(t,n,r,o,i){gs(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return bl;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return vs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],El.test(e[0])&&(r.positive.isFunctional=!0),e[1]?El.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?El.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||kl(r.positive,t,n),r.negative&&!r.negative.isFunctional&&kl(r.negative,t,n),r.zero&&!r.zero.isFunctional&&kl(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,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,n){var r;return ql.test(t)?e=Il(e,Number(/\d{2}/.exec(t)[0]),t,n):Dl.test(t)?e=Il(e,8,t,n):Cl.test(t)?e=Il(e,10,t,n):wl.test(t)?e=Il(e,16,t,n):Sl.test(t)?e=Il(e,2,t,n):Ml.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",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(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,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,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=yl(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%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(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=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(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=yl(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 Ll(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?5e3:o,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=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 Nl(e,t,n,r,o){var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ws(Ol,t)}(o,e,t,n,r),a=Ll(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var Pl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Rl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Fl=["January","February","March","April","May","June","July","August","September","October","November","December"],jl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Hl(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function _l(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var zl=function(){function e(t,n,r){gs(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Pl,qDayNames:Rl,qLongMonthNames:Fl,qMonthNames:jl}),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(),n||(n=(bs(o={},"T",i.qTimeFmt||"hh:mm:ss"),bs(o,"D",i.qDateFmt||"YYYY-MM-DD"),bs(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return vs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(r=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:i,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*_l(t),r=60*_l(n),o=60*_l(r),i=1e3*_l(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date: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:Hl("".concat(t.year).slice(-2),2),YYY:Hl("".concat(t.year).slice(-3),3),def:function(e){return Hl("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Hl("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Hl("".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 Hl("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Hl("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Hl("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Hl("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var o=0;o<r;o++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var p=new RegExp(u.join("|"),"g");return t.replace(p,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in l[n])if(o===e||o.toLowerCase()===e){void 0===(r=l[n][o])&&(r=l[n][o.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Vl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ws(zl,t)}function Ul(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Vl(n,e,t),o=Ll(r.format.bind(r),{toKey:function(e){return"object"===hs(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?Ul(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),r.format(t,e)},a.locale=function(n){return r=Vl(n,e,t),o=Ll(r.format.bind(r),{toKey:function(e){return"object"===hs(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Wl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Bl(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=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?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##A"),i="U"),Nl(n,r,o,i,t)}function $l(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=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=Wl(n,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return r},key:function(){return o},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:p,reduce:d,reduceLabel:m,formatter:function(){return f},tags:function(){return n.qTags}};return h}function Yl(e,t,n,r,o){return(t[e]||[]).map((function(t,i){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:$l(Rs({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=Yl("qAttrDimInfo",t,n,a,Rs({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Yl("qAttrExprInfo",t,n,a,Rs({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=Yl("qMeasureInfo",t,n,a,Rs({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function Kl(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.key,i=r.data,a=r.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=Kl.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 tl(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=hl,p.hierarchy=ml,p.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(p.extractor=_s,p.pages=u.qDataPages,p.hierarchy=ml):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,Ss(Yl("qDimensionInfo",u,o,"",Rs({},p,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,Ss(Yl("qMeasureInfo",u,o,"",Rs({},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),n=$l(qs({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(n)})),(n=l.allFields).push.apply(n,Ss(l.virtualFields)),d}var Jl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Gl=/\/qDimensionInfo(?:\/(\d+))?/,Zl=/\/qMeasureInfo\/(\d+)/,Xl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Ql=/\/qAttrExprInfo\/(\d+)/,eu=/\/?qHyperCube/,tu=/\/?qTreeData/,nu=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},ru=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function ou(e,t){var n=e,r=-1,o=-1,i="",a=function(e){return e};eu.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=nu):tu.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=ru);var s=!0;if(Gl.test(e)&&(r=+Gl.exec(e)[1]),Zl.test(e)&&(o=+Zl.exec(e)[1]),Xl.test(e)){o=-1,r=0;var l=+Xl.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(Ql.test(e)){var u=o;if(t){o=0;var c=Xs(i,t);o+=(c.qMeasureInfo||[]).length,r>-1?(o=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),r=-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+=+Ql.exec(n)[1]}else r>-1?(r=-1,o=+Ql.exec(n)[1]):o+=+Ql.exec(n)[1]+1}return Jl.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Ms(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],o=t[1];n=n.replace(r,o)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}function iu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=n.byCells,i=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=ou(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(o)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var p=r.qHyperCube,d=p.qNoOfLeftDims,f=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===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=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function au(e){Kl.util=e.data("matrix").util,e.data("q",Kl),e.formatter("q-number",Nl),e.formatter("q-time",Bl)}function su(e){var t=cs(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function lu(){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"===hi(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 uu(e){var t=e.brush,n=e.colorField,r=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):i&&t.addKeyAlias(r,"qHyperCube/".concat(n))}au.qBrushHelper=iu,au.selections=iu;function cu(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),o=n(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,o,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==n.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,n=void 0===t?{}:t,r=e.values,o=void 0===r?[]:r;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=su({layout:n,path:e}),r=o.filter((function(t){return t.key===e})),i=t?[r.pop()]:r;a.push.apply(a,Ci(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),o=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||o.includes(n.id)&&o.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var pu=[],du=0,fu=function(e){var t=pu.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()})))},mu=function(){document.addEventListener("keyup",fu)},hu=function(){document.removeEventListener("keyup",fu)},gu=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},yu=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function vu(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var o=r[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function bu(e){var t=e.chart,n=e.document,r=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=r.event===o,p=n.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 xu(e){var t=e.selectionInfo,n=e.chart,r=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 bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function qu(e){var t=e.selectionInfo,n=e.chart,r=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 bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function Du(e){var t=e.selectionInfo,n=e.chart,r=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=bu({selectionInfo:t,chart:n,document:r,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=n.scale(f).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Cu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function wu(e){var t=e.chart,n=e.selectionInfo,r=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(n&&i.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Su(e){var t=e.selectionInfo,n=e.chart,r=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;bu({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==p&&p})&&o.clear()}var Mu=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=qi(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Eu(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Au(e){var t,n=e.chart,r=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?Eu:p,f=o.clear,m=!1!==f&&function(e){var t=e.clear,n=void 0===t?Mu:t,r=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:o,chart:i,document:document,cleared:e};return n(xi({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xu(xi(xi({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qu(xi(xi({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Du(xi(xi({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cu(xi(xi({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return wu(xi(xi({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Su(xi(xi({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,o=e.clear,i=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),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===r&&delete a.deactivated,!1===o&&delete a.cleared,!1===r&&!1===o&&delete a.canceled,a}({chart:n,clear:m,reset:d,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:i,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(xi(xi({},void 0===t?{}:t),{},{event:r,components:i.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:o,chart:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(xi(xi({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:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Iu=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Tu(e){var t=e.chart,n=e.actions,r=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,S=i.selectionsFn,M=void 0===S?o.selections:S,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var A=!0===D?Iu:D;E.configure({ranges:A})}var I={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,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(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++du,c=null,p=[],d={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var f=cu({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=f.rangeInterceptor,h=f.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(l)}));var g={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};gu(n,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;r.start(),"function"==typeof i.select.getBrushOptions&&(d=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(r,d,c).forEach((function(e){vu(e,i.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,d,c).forEach((function(e){return n.select(e)}))})),0===pu.length&&mu(),pu.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=pu.indexOf(pu.filter((function(e){return e.key===u}))[0]);-1!==e&&pu.splice(e,1),pu.length||hu(),yu(n,g)}}}({brush:E,majorScale:u,actions:n,selections:r,picassoQ:o,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(r,e)}))}))}({brush:E,interceptors:w});var k=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=Di(e,2),i=o[0],a=o[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];t.removeListener(r,o)}))}}({brush:r,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=Au({chart:t,selectionInfo:i,selectionActions:n,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:n,selections:r,selectionInfo:I.selectionInfo,selectionActions:{clear:p,reset:d},selectionEvents:m,brushEvents:g});if(s){var O=!0===s?Ci(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;T.allowSimultaneous(O)}return{unbindEvents:k,state:I,picassoSelections:T,brush:E}}function ku(e){var t=e.chart,n=e.selections,r=e.actions,o=void 0!==r&&r,i=e.config,a=void 0===i?{}:i,s=Tu({chart:t,actions:o,selections:n,picassoQ:au,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?uu:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:lu(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,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!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return su({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,o=qi(e,["colorField","useLegendCube"]),i=xi({useLegendCube:r,colorField:t,brush:p,legendAlias:h},o);y(xi(xi({},i),{},{defaultFunc:function(){return uu(i)}}))},destroy:function(){l(),c.release()},custom:xi({},f)}}var Ou={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Lu="chart-modules-tooltip",Nu="#".concat(Lu);function Pu(){if(!document.querySelector(Nu)){var e=document.createElement("div");e.id=Lu,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 Ru(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Pu()},beforeUpdate:function(){Pu()},destroyed:function(){var e;null!=(e=document.querySelector(Nu))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Nu)},direction:e.rtl?"rtl":"ltr",duration:e.duration},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 Fu="position",ju={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Hu=function(e){return e.data.value},_u=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function zu(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.collectConfig,i=e.collectibles,a=e.meta,s=o.from,l={chart:t,expando:n,nodes:r,collectConfig:o,collectibles:i,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=Di(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){return e.nodes}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0],i=n.filter,a="function"==typeof i?i:function(){return!0},s=n.by,l=void 0===s?Hu:s;return r.reduce((function(e,n){var r=n.major,i=void 0===r?_u:r,a=ju[n.type]||n.type;return e.push.apply(e,Ci(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&i({data:e.data})===l({data:o.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0].localBounds,i=n.distance,a=n.filter,s="function"==typeof a?a:function(){return!0},l=r.map((function(e){return e.key})),u=Di(l,1)[0],c=t.component(u).rect,p=c.scaleRatio,d=c.computedInner,f=o.width*p.x,m=o.height*p.y,h=o.x*p.x+f/2+d.x,g=o.y*p.y+m/2+d.y,y=i||Math.max(f,m);return t.shapesAt({cx:h,cy:g,r:y},{components:l.map((function(e){return{key:e}}))}).filter(s)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:o})}(l);default:return[]}}var Vu=Number.MAX_VALUE;function Uu(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:Vu,xMax:-Vu,yMin:Vu,yMax:-Vu}),n=t.xMin,r=t.xMax,o=t.yMin;return{x:n,y:o,width:r-n,height:t.yMax-o}}function Bu(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.nodes;if(!i.length)return[];var a=Di(i,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},u=l.collect,c=l.placement;if(!u||!u.from||!c)return[];var p={triggerer:a,position:o.get(Fu)},d=(zu({chart:t,expando:r,nodes:i,collectConfig:u,collectibles:s,meta:p})||[]).map((function(e){return e.children.length?e.children[0]:e}));return d.length?function(e){var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=Di(i,1)[0],u=Array.isArray(o)?o:[o],c={bounds:l.bounds,key:l.key},p=Uu({nodes:a}),d=0;d<u.length;d++){var f=u[d];if("function"==typeof f){var m=f({chart:t,expando:r,hovered:i,collected:a,meta:s,collectedBounds:p,combineBounds:Uu});if(m)return m}if("trigger"===f)return c;if("collectible"===f){var h=n.main.placements.collectible;return{bounds:"function"==typeof h?h({collected:a}):p,key:a[0].key}}}return c}({chart:t,config:n,expando:r,placementConfig:o,hovered:i,collected:a,meta:s}),u=l.bounds,c=l.key,p=Di(a,1)[0].desc;return[{bounds:u,nodes:a,data:a.map((function(e){return e.data})),key:c,meta:s,desc:p}]}({chart:t,config:n,expando:r,placementConfig:c,hovered:i,collected:d,meta:p}):[]}var Wu=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),$u=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Yu=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ku=function(e){return Wu.test(e)},Ju=function(e){return $u.test(e)||Yu.test(e)};function Gu(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Ku(r))return"ltr";if(Ju(r))return"rtl"}return"ltr"}function Zu(e){var t=e.visibility;return{type:"divider",content:[{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}],visibility:xi(xi({},{count:!1}),t)}}function Xu(e){var t=e.config,n=e.h,r=e.context,o=e.nodes,i=e.property,a=e.filter,s=e.visibility,l=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:xi(xi({},{count:!0}),s)},c=t.getColorSettings();if("color"===c.type||!c.fieldType)return u;var p=Di(o,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,o=e.node,i=o.data[r];if(i){if(-3===o.data.value)return o.data.label;var a=n.resources.dataset(i.source.key).field(i.source.field).formatter(),s=i.value,l=i.label,u=t.getColorSettings();if(a&&"measure"===u.fieldType)return Number.isNaN(+s)?"-":a(i.value);var c=l||s;return void 0===c||Number.isNaN(c)||"NaN"===c?"-":c}}({config:t,context:r,property:i,node:p}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,o=e.config.getColorSettings();if(o.label)return o.label;var i=r.data[n];if(i&&"color"!==o.type){var a=t.resources.dataset,s=i.source,l=s.key,u=s.field;return a(l).field(u).title()}}({config:t,context:r,property:i,node:p});var d=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:p}),margin:"0 8px"}});return u.content.push({content:l?[":",u.label]:[u.label,":"],style:{"text-align":l?"right":"left",direction:Gu(u.label)}},{content:l?[u.value,d]:[d,u.value],style:{"text-align":l?"left":"right","vertical-align":"middle",direction:Gu(u.value)}}),u}function Qu(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,o=(r=void 0===r?{}:r).bold,i=void 0!==o&&o,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":i?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:Gu(n)},colspan:2}],visibility:xi(xi({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:o})},measure:function(e){var r=e.label,o=e.value,i=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,o,i=e.h,a=e.label,s=e.value,l=e.color,u=e.style,c=e.survive,p=e.visibility,d=e.config.rtl,f=i("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:d?[":",a]:[a,":"],style:{"text-align":d?"right":"left","font-weight":null!=u&&null!==(t=u.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=u&&null!==(n=u.label)&&void 0!==n&&n.italic?"italic":"normal",direction:Gu(a)}},{content:l?d?[s,f]:[f,s]:s,style:{"text-align":d?"left":"right","vertical-align":"middle","font-weight":null!=u&&null!==(r=u.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=u&&null!==(o=u.value)&&void 0!==o&&o.italic?"italic":"normal",direction:Gu(s)}}],survive:xi(xi({},{color:!1,duplicate:!1}),c),visibility:xi(xi({},{count:!0}),p)}}({config:t,h:n,label:r,value:o,color:i,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return Zu({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:xi(xi({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:xi(xi({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var o=e.nodes,i=e.property,a=e.filter,s=void 0===a||a,l=e.visibility;return Xu({config:t,h:n,context:r,nodes:o,property:i,filter:s,visibility:l})}}}function ec(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.h,a=e.data,s=e.style,l=Di(a,1)[0],u=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]=[]),e[r].push(n),e}),{});return Object.keys(n).map((function(e){return n[e]}))}({config:r,nodes:l.node.nodes}),c=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.h,i=e.context,a=e.groups,s=i.node.meta,l=i.resources,u=l.dataset,c=l.formatter,p=Qu({config:n,h:o,context:i}),d=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:u}),f=a.map((function(e){var t=p.section({content:Ci((n.main.section({expando:r,h:o,nodes:e,dataset:u,formatter:c,meta:s,create:p,util:d})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),o=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?o:o.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var o="".concat(t.label,"-").concat(t.value);return e.memory[o]||(e.memory[o]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:o,nodes:i.node.nodes,dataset:u,formatter:c,meta:s,create:p,util:d,sections:f}),f.filter(Boolean)}({chart:t,config:r,expando:o,h:i,context:l,groups:u}),p=function(e){var t=e.translator,n=e.config,r=e.context,o=e.templates,i=n.main.layout,a=i.rows,s=i.grouping,l=i.single,u=function(e){var t=e.limit,n=e.grouping,r=e.single,o={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var i=e.visibility,a=e.index;if(r&&0!==a)return n?(o.index.started!==a&&o.index.group!==a&&(o.overflow++,o.index.group=a),!1):(o.overflow++,!1);if(o.count>=t){if(!n)return o.overflow++,!1;if(o.index.started!==a)return o.index.group!==a&&(o.overflow++,o.index.group=a),!1}return i.count&&o.count++,n&&(o.index.started=a),!0},overflow:function(){return o.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:o}):l}),c=o.reduce((function(e,t,n){var r=t.type,i=t.content;"section"===r&&(void 0===i?[]:i).forEach((function(t){u.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===o.length-1;return"divider"!==r||a||u.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),p=u.overflow();return p&&c.push(function(e){var t=e.translator,n=e.config,r=e.count,o=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),i=Gu(o);return[{content:o,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:i},colspan:2}]}({translator:t,config:n,count:p})),c}({translator:n,config:r,h:i,context:l,templates:c});return p.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:xi(xi({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:i,style:s,rows:p}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:i})}function tc(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.internal;if(!r.main.key)return!1;var a=ds(),s=Ru({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,u=l.afterShow,c=l.afterHide,p=function(){var e=a.get("collected");return{expando:o,nodes:e.nodes,meta:e.meta}};return Ni(!0,s,{settings:{filter:function(e){return Bu({chart:t,config:r,expando:o,internal:i,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var i=e.h,a=e.data,s=e.style;return ec({chart:t,translator:n,config:r,expando:o,h:i,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return u(p())},afterHide:function(){return c(p())}},style:{arrow:{color:r.style.background},content:r.style}})}function nc(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Ru({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Ni(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:xi(xi({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function rc(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}function oc(e){var t=e.chart,n=e.event,r=e.component,o={absolute:{x:0,y:0},relative:{x:0,y:0}},i=t.element.getBoundingClientRect(),a=i.left,s=i.top;o.absolute.x=(n.center?n.center.x:n.clientX)-a,o.absolute.y=(n.center?n.center.y:n.clientY)-s;var l=t.component(r);if(l){var u=l.rect.computedInner;o.relative.x=o.absolute.x-u.x,o.relative.y=o.absolute.y-u.y}return o}function ic(e){var t=e.chart,n=e.hits,r=e.position,o=[];if(n.position.length&&o.push.apply(o,Ci(t.shapesAt(r.absolute,{components:n.position.map((function(e){return{key:e}}))}))),!o.length&&n.distances.length){var i=[];n.distances.forEach((function(e){i.push.apply(i,Ci(t.shapesAt({cx:r.absolute.x,cy:r.absolute.y,r:e},{components:n.distanceKeys[e].map((function(e){return{key:e}}))})))})),i.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var o=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=o(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:o(t[0])}).node}({nodes:i,origin:r.relative}))}return o}function ac(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=n.delay.tap,s=rc({config:n}),l=n.main.triggers.reduce((function(e,t){return e.push.apply(e,Ci(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==l.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:vi({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var l=t.component(n.main.key);if(l&&l.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),c=s({components:u});if(c.any){var p=Di(c.components,1)[0],d=oc({chart:t,event:e,component:p});o.set(Fu,d);var f=ic({chart:t,hits:c,position:d});if(f.length){var m=f[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return i.collectNodes({nodes:f})},meta:{triggerer:m,position:d}}).then((function(){l.emit("show",e,{nodes:f,delay:a})}))}else l.emit("hide")}else l.emit("hide")}}}))}}function sc(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=rc({config:n}),s=function(e){var t=e.config,n=e.expando,r=e.internal,o=e.facade,i=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,u=e.nodes,c=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){return{key:e.key,bounds:e.bounds,value:e.data.value}})))}({nodes:u});if(!s.ongoing[c]){s.ongoing[c]=!0,s.latest=c;var p=u[0].key;i({expando:n,event:t,collectNodes:function(){return o.collectNodes({nodes:u})},meta:{triggerer:p,position:r.get(Fu)}}).then((function(){c===s.latest&&l.emit("show",t,{nodes:u,delay:a})})).finally((function(){delete s.ongoing[c],c===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:o,facade:i}),l=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){l.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),i=t.component(n.main.key);if(i&&i.show){var l=a({components:r});if(l.any){var u=Di(l.components,1)[0],c=oc({chart:t,event:e,component:u});o.set(Fu,c);var p=ic({chart:t,hits:l,position:c});if(!p.length)return void i.emit("hide");s({event:e,tooltip:i,nodes:p})}else i.emit("hide")}var d=n.legend;if(d.keys.tooltip&&d.keys.component){var f=t.component(d.keys.tooltip);f&&f.show&&(r.some((function(e){return e.key===d.keys.component}))?f.emit("show",e):f.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function lc(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Ni(!0,{},{rtl:!1,enable:Ou.FALSE,getColorSettings:Ou.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Ou.FALSE,getGroupByValue:Ou.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Ou.ARRAY,sections:Ou.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Ou.NOOP,afterHide:Ou.NOOP},interaction:{mouseleave:Ou.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),o=ds(),i=ds(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[tc({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),nc({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:o,internal:i})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal;return{collectNodes:function(e){var i=e.nodes,a=Di(Bu({chart:t,config:n,expando:r,internal:o,nodes:i}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:o});return{gestures:[ac({chart:t,config:n,expando:r,internal:o,facade:i})],native:sc({chart:t,config:n,expando:r,internal:o,facade:i})}}({chart:t,config:r,expando:o,internal:i})),a.interactions},expando:o}}var uc={};function cc(){cc.init.call(this)}uc.isObject=function(e){return"object"==typeof e&&null!==e},uc.isNumber=function(e){return"number"==typeof e},uc.isUndefined=function(e){return void 0===e},uc.isFunction=function(e){return"function"==typeof e};var pc=cc;cc.EventEmitter=cc,cc.prototype._events=void 0,cc.prototype._maxListeners=void 0,cc.defaultMaxListeners=10,cc.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},cc.prototype.setMaxListeners=function(e){if(!uc.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},cc.prototype.emit=function(e){var t,n,r,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(n=this._events[e],uc.isUndefined(n))return!1;if(uc.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(uc.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},cc.prototype.addListener=function(e,t){var n;if(!uc.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,uc.isFunction(t.listener)?t.listener:t),this._events[e]?uc.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,uc.isObject(this._events[e])&&!this._events[e].warned)&&((n=uc.isUndefined(this._maxListeners)?cc.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,uc.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),uc.isFunction(console.trace)&&console.trace()));return this},cc.prototype.on=cc.prototype.addListener,cc.prototype.once=function(e,t){if(!uc.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},cc.prototype.removeListener=function(e,t){var n,r,o,i;if(!uc.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||uc.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(uc.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},cc.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],uc.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},cc.prototype.listeners=function(e){return this._events&&this._events[e]?uc.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},cc.listenerCount=function(e,t){return e._events&&e._events[t]?uc.isFunction(e._events[t])?1:e._events[t].length:0};function dc(){const e={};var t;return t=e,Object.keys(pc.prototype).forEach((e=>{t[e]=pc.prototype[e]})),pc.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function fc({picasso:e}){var t;const n=h(),r=g(),o=y(),[i,a]=v(),s=dc(),l=b(),u=x(),c=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[p,d]=v(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:o}){var i,a,s;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},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:c,isLassoActionActive:p,setIsLassoActionActive:d,translator:u}),q((()=>(i&&(i.interactions.lasso.active=()=>p),{...s.lasso})),[i,p,c,u.language()]),D((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),i=t.chart({element:r,data:[],settings:{}}),u=ku({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=xi({},e),n={},r={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&n[e]?t[e]=n[e](i,a):t[e]=i,!o&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[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}const mc={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 hc(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const gc={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}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:n,width:l}=s,u=i[t]*(n>l?1:n/l),c=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function yc(e,t,n,r){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<n.length;e++)if(n[e].cId===f.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,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,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await gc.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&hc(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await gc.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await gc.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(c,p,f,m,v);if(p.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(hc(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await gc.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(c,n[g],m,v)}return[]}const vc={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(yc(e,r,n,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,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},bc={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await vc.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>vc.checkIfPromisesExist({customTooltipModel:e})};const xc=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:mc.CHART.CHART_PARENT_TYPE,qId:mc.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},qc=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:mc.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const Dc={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=mc.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:mc.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel: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 Dc.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=mc.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=mc.CHART.STATE,a=xc(t,i),s=await e.createSessionObject(a),l=qc(t);if(s.id!==mc.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=n.length>0&&void 0!==(null===(p=n[0].data)||void 0===p?void 0:p.value)?[null===(d=n[0].data)||void 0===d?void 0:d.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(mc.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 Dc.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Dc.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(mc.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=mc.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Cc(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function wc(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=mc.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function Sc(e){const t=wc();return e.filter((e=>t[e.id]))}const Mc={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];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=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Mc.getAttrExprData(a);i.length||n.length?bc.handlePromises({customTooltipModel:o,nodes:Mc.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Dc.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>bc.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";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;n=(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)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[mc.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[mc.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[mc.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Sc(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[mc.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[mc.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Cc(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===Sc(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)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=Cc(e)||[];[...o,t].forEach((e=>{const t=Sc(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=wc(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=se.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),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,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Ec(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case mc.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case mc.CUSTOM.TITLE:case mc.CUSTOM.DESCRIPTION:case mc.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Ac={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Ec(t,e,r,n)}}};const Ic={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[mc.CUSTOM.TITLE]:!0,[mc.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Mc.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===mc.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.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&&r.customTooltipInfoAttrExpsArr.push({...e.id===mc.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>le.getMeasure(e,t))),e,i)}};function Tc({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Ic.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function kc(e){const t=mc.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function Oc(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Lc={attrExpr:{migrateProperties(e){var t,n,r,o;const i=K(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=Oc(i);return s=function(e,t){return t.concat(e.map((e=>kc(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,n,r,o;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=kc(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Oc(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,o,i,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.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 r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:Nc}=mc;function Pc({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:u}){var c,p,d;const f=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Mc,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&cs(t,"tooltip.hideBasic",!1),y=!!(h&&null!==(c=t.tooltip)&&void 0!==c&&null!==(p=c.chart)&&void 0!==p&&null!==(d=p.object)&&void 0!==d&&d.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=Tc({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Nc.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Nc.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>Mc.checkIfPromisesExist({customTooltipModel:f}),createImageRow:({value:e,h:t})=>Mc.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const o=Mc.getDataNodes(i,r),a=Mc.getAttrExprData(t);return bc.handlePromises({customTooltipModel:f,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Dc.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Mc.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>Dc.show({app:n,properties:t,selectedNodes:e,customTooltipModel:f,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=f.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>Dc.hide({app:n,customTooltipModel:f}),destroy:()=>Dc.destroyVisualization({customTooltipModel:f})}}}function Rc(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Fc({flags:e,picasso:t,instance:n}){const r=C(),o=w(),i=x(),a=g(),[s,l]=v(),u=S(),c=M(),p=E(),d=h(),f=A(),{qLocaleInfo:m}=I(),y=T();return D((()=>{if(!n)return;a.style.overflow="hidden";const s=function(e){var t,n,r,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?us: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),S={theme:x,key:v,localeInfo:y,layout:w,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:xi(xi({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?is(w):void 0})},M=rs({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:ls}):ls(e)}));var E=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(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:xi({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:is}),n=as(S,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:n.picasso,model:r,app:o,translator:i,config:{auto:!1,key:"fill"}}),h=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,o=void 0===r?{}:r,i={initialized:!1,definitions:[]};return{initialize:function(){return yi(regeneratorRuntime.mark((function e(){var r,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(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=yi(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(xi({},o));case 4:if("object"===hi(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(xi({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(r=i.definitions).push.apply(r,Ci(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var n=Di(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Ni(!0,{},n.brush);Ni(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===hi(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}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n.picasso,plugins:c,pluginArgs:Rc(u)}),g=Pc({flags:e,layout:u,app:o,model:r,picasso:t,chart:n.chart,translator:i,localeInfo:m,embed:y,options:d}),v=function({chart:e,translator:t,layout:n,constraints:r,options:o,theme:i,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,u="rtl"===o.direction;return lc({chart:e,translator:t,config:{rtl:u,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:i.getStyle("object.pieChart","","fontFamily")},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:o,create:i,util:a})=>{const[u]=n,{title:c,description:p,measures:d}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},f=[];c&&f.push(i.text({value:c,style:{bold:!0}})),p&&f.push(i.text({value:p}));const m=s.hideBasic();if(m&&!d.length&&(c||p)||f.push(i.text({value:u.data.label,style:{bold:!0}})),!m){f.push(i.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}f.push(i.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(u.desc.share)}))}d&&f.push(...d.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),f.push(i.raw({value:s.chart.createLimitationRow()}))):f.push(i.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:h}=u.data;return s.isEnabled()&&h&&f.push(...h.map((t=>i.raw({value:s.createImageRow({value:t,h:e})})))),f},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:n.chart,translator:i,layout:u,constraints:p,options:d,theme:f,colorService:s,custom:g});l({colorService:s,pluginService:h,tooltipService:v})}),[r,o,n,u,i.language(),p,d.direction,f.name()]),s}function jc({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:o}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},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 Hc={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},_c=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{let r=.8,o=0;const i=n?n.style.innerRadius:.55;e.donut.showAsDonut&&(r=.8-i,o=i);return t.scale(Math.max(0,t.datum.radius.value))*r+o}}:.8,zc=({layout:e},t,n)=>{var r,o;if(!e.donut.showAsDonut)return 0;const i=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-i,n=i;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:i},Vc=({layout:e},t)=>{var n,r,o,i,a,s;const l=t.colorService.getDatumProps(),u=l[Object.keys(l)[0]],c=u&&u.field?u.field:void 0,p="qDimensionInfo/0"===c,d=c?t.ds.field(c).raw():null,f=d&&(d.label||d.title||d.qFallbackTitle)||"",m=t.encodings.slice.outerRadius,{formatter:h}=t.chart,g=ne(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>h(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:f,value:e=>p?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?Ac.getNode(e,{dimensionCount:g}):void 0,radius:m?y(m,"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:zc({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?Hc.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:Hc.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(o=v.style)||void 0===o||null===(i=o.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Hc.STROKE.COLOR,outerRadius:_c({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}}}};function Uc({layout:e},t,n){const r=(e.components||[]).filter((e=>"slices"===e.key))[0],o=r?r.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:F(n.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-o,n=o;return e.scale(0)*t+n}}}}}}function Bc({layout:e},t,n){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:F(n.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}const{getThemeStyle:Wc}=j;function $c(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Yc(e){return e.node.data.num.label}function Kc(e){return e.node.data.radius.label}function Jc(e,t,n){if(e.dataPoint.auto)return n?Yc:$c;if("share"===e.dataPoint.labelMode)return $c;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Kc:Yc}return null}function Gc({data:e}){return e?e.label:""}function Zc(e,t,n){const r=parseInt(Wc(e,"object.pieChart",t,n),10);if(!isNaN(r))return r}function Xc(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function Qc({node:e,data:t}){return K({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function ep(e,t,n){const r=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Wc(n.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Zc(n.theme,"label.name","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.name","fontFamily"),label:Gc,linkData:({node:e,data:t})=>K({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(Jc(e,t,!1)){const o=function(e,t,n){return{label:Jc(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Xc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Xc(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),i=pe(K(t,o),n.theme);i.linkData=Qc,r.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:r}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function tp({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=Jc(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.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?n.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:Zc(n.theme,"label.name","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.name","fontFamily"),label:Gc},{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:Zc(n.theme,"label.value","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.value","fontFamily"),label:r}]}}}]}}}(e,n,t):ep(e,n,t))}const np=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.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))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},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 rp(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}function op(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:o}=rp(e,t),i=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*.8;return(i-r)**2+(a-o)**2<=s**2}const ip=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=rp(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const i=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});i.length&&(this.chart.brushFromShapes(i,{components:[{key:i[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),ap=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.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()}}}),sp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const 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((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function lp(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&op(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 n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const up=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&op(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.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 n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),cp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.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}}}),pp=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[up(e,{}),ip(e,t,{}),...n]:[np(e,{}),sp(e,{}),up(e,{}),ap(e,{}),cp(e,{}),ip(e,t,{}),...n]});function dp(e,t,n){const r=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const i=t.tooltipService.getInteractions();return[pp(t,r,i.gestures),lp(t),i.native]}function fp({settings:e},t){const n={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&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function mp({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:n.theme.getStyle("object","axis.title","fontFamily"),fontSize:n.theme.getStyle("object","axis.title","fontSize"),color:n.theme.getStyle("object","axis.title","color")}}}function hp({layout:e},t,n){return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:Z[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:o}}}(function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const o=ne(e,"qHyperCube.qSize.qcy");if(ne(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const i=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":i.length!==r.length&&"NegativeOrZeroValues"}(e,t),t,n)}function gp({layout:e,context:t,selectionService:n},r={}){const o=function({layout:e}={},t={}){const n={};return K(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&K(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),i={scales:o};let a=[];const s=hp({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.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=[Vc({layout:e,settings:i},r),Uc({layout:e},r,t),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Bc({layout:e},r,t),mp({layout:e},r,t),...u.components,jc({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.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}}},tp({layout:{dataPoint:K({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:dp(n,r,t),scales:o,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:fp({settings:i},r),strategy:te(0,r)}}function yp({instance:e,services:t}){const n=g(),r=S();L((o=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:re(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),N((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:re(e.chart,"legend-cat")})})),[e])}var vp={exports:{}};window;var bp=H(vp.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,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,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.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(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,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(n in t)r=c(p,n),p!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:n,newValue:o}));return p}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,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,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.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(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,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(n in t)r=c(p,n),p!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:n,newValue:o}));return p}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},a=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.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 r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var p=c(r[0],o),d=c(r[1],o),f=m(0),h=m(1),g=y(p,f),v=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var p=m(0),d=m(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return h(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==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 C=o.a.bind(null,!0),w={},S=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function E(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=E(e[n||t])?i:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}w.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?C({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);T(i,a)||A(t,o)||(E(a)?r.push({op:"add",path:s,value:i}):M(i)&&M(a)?r=r.concat(w.generate(a,i,s)):S(i)&&S(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&E(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,o))return r;if(!E(t[0])&&E(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(w.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){E(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},w.apply=function(e,t){t.forEach((function(t){var n,r=I(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?r[o]:r[+o]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,i=e),"add"===t.op||"replace"===t.op)if(S(r))"-"===o&&(o=r.length),r.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,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(i)&&M(t.value))n=i,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]})),C(i,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[o]=t.value}else if("move"===t.op){var u=I(e,t.from);S(r)?r.splice(+o,0,u.splice(+a,1)[0]):(r[o]=u[a],delete u[a])}else"remove"===t.op&&(S(r)?r.splice(+o,1):delete r[o])}))},w.clone=function(e){return C({},e)},w.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},w.updateObject=function(e,t){Object.keys(e).length?w.apply(e,w.generate(e,t)):C(e,t)};var k=w,O=function(e,t,n){if(!e)return Promise.resolve();var r=k.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},L="accumulation";function N(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function P(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(n,l),d=q.getAboveComp(n,l,c,p),f=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:n,properties:r,layout:o})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=n.showExcludedValues?q.getExcludedComp({modifier:n,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 n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(L))return!1;var i=N(t,e);return i&&!i.disabled}}}},j="movingAverage";function H(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:o,layout:i}));var c=a(o,"qHyperCubeDef.qDimensions",[]),p=r.showExcludedValues&&r.nullSuppression,d=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=q.getNumStepComp(r,u),m=q.getAboveComp(r,u,d,f);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:o,layout:i})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,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(_(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(_(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(_(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(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(_(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=H(t,e);return i&&!i.disabled}}}},U="difference";function B(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function W(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(n,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:n,properties:r,layout:o})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(d,f,m);d=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(W(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(W(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(W(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(U))return!1;var i=B(t,e);return i&&!i.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},J={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function X(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:J.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(o,i),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,i)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=n.selectionScope,d=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=re(t),l=oe(t,n,r),u=""===s&&""===l?"":s||l,c=ie(o,i),p=ae(o,i,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,n.field,n.value,d,l,n.primaryDimension)},initModifier:function(e){Object.keys(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(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,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,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,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,n){return(Z(t,e).dimensionalScope||0)===J.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=Z(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:F,movingAverage:V,difference:Y,normalization:se},fe=(t.default={modifiers:de,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=qe(e);Ae({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Le({modifiers:t,properties:n,layout:r}))})),o&&!i},ifEnableTotalsFunction:be},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,n&&"object"===pe(n))return he({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:p,layout:u,model:t,lastReloadTime:d});return f||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ae({modifiers:qe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);Ce(n);var r=Ne(n);return Ie({model:t}).then((function(o){return Te({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ee({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(n++,"object"!==pe(de[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=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Se(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),he({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ne(n);return Pe({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Oe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Ce(r);var d=Ne(r);return Pe({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Ne(n);return Ie({model:r,dimensionAndFieldList:s}).then((function(e){return Te({libraryIds:l,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ae({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof de[n.type].updateModifier&&de[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=de[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),we(t)):ge(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Oe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,we(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({modifiers:qe(e),properties:n,layout:r})}))}function ve(e){var t=qe(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(de[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function we(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Se(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Se(e);return e.qLibraryId||t&&t.qLibraryId}function Ee(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&Ae({modifiers:qe(t),properties:n,layout:r})}function Ae(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===o[e.type]&&(o[e.type]=de[e.type].isApplicable({properties:n,layout:r})),o[e.type])}))}function Ie(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));r.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return o}))}function Te(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Oe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):O(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return o})):Promise.resolve(o)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ne(e){var t=xe(e),n=[],r=[],o=!1;return t.forEach((function(t){var r=qe(t);if(Ae({modifiers:r,properties:e})){var i=Me(t);i&&n.push(i),o=o||Le({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Pe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){o[e]||i[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function 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)}n.r(t);var i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n: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:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c},d=n(1),f=n.n(d),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&p.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,n){var r,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(r=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return C(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 C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(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 C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=v(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=b(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,o.dimensions.length,q),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,q),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(p.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,p.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=y()(!0,{},n,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=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>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>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=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=D(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=w(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function E(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){i.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var A={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),r||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),y=i.getValue(r,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,q=b.minDimensions,D=b.maxMeasures,C=b.minMeasures,w=l.defaultDimension,S=void 0===w?M.getDefaultDimension():w,A=l.defaultMeasure,I=void 0===A?M.getDefaultMeasure():A;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:v,defaultDimension:S}),M.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:C,newHyperCubeDef:v,defaultMeasure:I}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),h.qProperty=g;var T=i.getValue(c||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:T}),d&&E(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&E(h.qProperty,"dynamicScript"),h}},I={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function T(e,t,n,r){t=t||[];var o=c(e,r,n),i=c(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function k(e,t){return e.length!==t}var O={create:function(e,t){if(!e||!I[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(T(a,t,r,o),k(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},L={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},N={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.getNumMeasures(e)>=1}}},P={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},R={scatterplot:P,"sn-scatter-plot":P,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumDimensions(e)>=1}}}};function F(e,t,n){if(Array.isArray(e[t])){var r=p.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function j(e,t){var n=O.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)})),t.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)}))}function H(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function _(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;j(r,o);var l=r[r.length-1];if(l){var u=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),d=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=O.create(O.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=p.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,n,r){var o=n?"expression":t.type,i=e.color,a=i.mode,s=L.getItemLabel(t);switch(H(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&V.useMasterNumberFormat(i.formatting)}r||(i.auto=!1,i.mode=a)}function B(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=O.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return U(e,z("dimension",!!a,a||r)),!!a}function W(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=z("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,U(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;_({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=z("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,U(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=O.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;_({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||N).colorModeOptions||N.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},updateColorBy:function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?j(o,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:o})?W(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:r,colorMode:n,dimensions:o,measures:a,properties:e})?$(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),j(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=A.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=O.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return O.moveByIdFromGroup(a,[],"qAttributeDimensions",u),O.moveByIdFromGroup(a,[],"qAttributeExpressions",u),O.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=A.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=i.getValue(p,"visualization"),f=i.getValue(p,"qHyperCubeDef.qDimensions",[]),m=i.getValue(p,"color.mode",""),h=i.getValue(p,"color.auto",""),g=Y.getCanColorBy(p,d),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&Y.addColorByExpression(p):Y.switchToAutoColor(p),y&&Y.updateColorBy(p,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(p)&&Y.changeProperty(p,"color.persistent",!0),Y.deleteTotalMode(f),c}},J=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?E(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):E(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),J.includes(r)&&t[o].type[r]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:p}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:p,measureType:a}),G.setInterColumnSortOrder(p.qHyperCubeDef),c}};function X(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=X(n,r,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=X(n,r,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:A,colorChart:K,axisChart:Z,quarantineProperty:h,unquarantineProperty:E,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}]));const xp={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},qp={getDimensions:e=>xp.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>xp.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>xp.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>xp.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=xp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=xp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const Dp={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>qp.getNumMeasures(e)>=1},showLegend:e=>{const t=xp.getValue(e,"color.auto"),n=xp.getValue(e,"color.expressionIsColor"),r=xp.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!xp.getValue(e,"color.auto")&&"byDimension"===xp.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===xp.getValue(e,"color.useDimColVal")&&xp.setValue(e,"color.useDimColVal",!1),!xp.getValue(e,"color.auto")&&"byDimension"===xp.getValue(e,"color.mode")&&"libraryItem"===xp.getValue(e,"color.byDimDef.type"))},Cp=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=Dp;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!xp.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=xp.getValue(e,"color.auto");return xp.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===xp.getValue(e,"color.mode")&&!0===xp.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>xp.getValue(e,"legend.show")&&o(e)}}};function wp(e){return new Cp(e)}const Sp={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:{slices:{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,n)=>n.layout.donut.showAsDonut}}}}},Mp={component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Ep=wp("hard");const Ap=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(ps(e,"color.mode","byDimension"),ps(e,"color.byDimDef.activeDimensionIndex",0),ps(e,"color.persistent",!1))},Ip=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},Tp=e=>{const{flags:t,translator:n}=e||{},r={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?n.get("Simple.Color.Auto",n.get("properties.colorMode.byDimension")):n.get("Common.Custom")},change:Ap},colorMode:{options:Ip}}}}};return{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||ps(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,o){o.dimensionTitle=!e}}}}}}},general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?Mp:Sp,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:Ep.color.colorMode.options},persistentColors:{show:Ep.color.persistentColors.show}}},simpleColors:r,legend:{show:Ep.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Ep.legend.showTitle.show},dock:{show:Ep.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},kp={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Op={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Lp={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Np(e){return{type:"items",component:"accordion",items:{data:kp,sorting:Op,addons:Lp,settings:Tp(e)}}}const Pp=wp("explore"),Rp=Np();var Fp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Rp.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:Rp.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:Pp.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Pp.color.useDimColVal.show(e))}}}}}}};function jp(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Hp(e){return e.data.num.label}function _p(e){return e.data.radius.label}function zp(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Hp:jp;if("share"===e.dataPoint.labelMode)return jp;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?_p:Hp;return Hp}(n,r)(e,t)}function Vp(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Up{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.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,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-r.left+l.x*(s.x+a*Math.sin(c)),d=u.top-r.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:Vp(n),label:zp(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=K(e.options,{effect:null}),n?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 Bp extends Up{init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&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 Wp extends Up{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 n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}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(((n,r)=>{const o=zp(n,this.chart.formatter,e,t);return{text:`${Vp(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var $p={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new Bp(e):"/effects/highlight-value"===e.effectPath?new Wp(e):null};function Yp(e){const t={},{components:n,tooltip:r}=e,o=n?n.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]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Kp(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Jp(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Gp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Jp(e),Kp(t),Mc.addCallbackCustomTooltip(t)},move(e,t){Jp(e),Kp(t),Mc.moveCallbackCustomTooltip(t,e)},remove(e,t){Mc.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Jp(e),Kp(r),Mc.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Kp(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const Zp=e=>e.qMax<=0,Xp=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Zp));function Qp(e){return{definition:Np(e),softDefinition:Fp,support:{snapshot:Xp,export:Xp,exportData:!0,sharing:Xp,viewData:!0,effects:!0},effects:$p,extendMetrics:Yp,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=bp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Gp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>bp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function ed(e){return{properties:{version:"1.18.6",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:Hc.STROKE.COLOR},cornerRadius:Hc.CORNER_RADIUS,innerRadius:Hc.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:[Gp(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=bp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Gp(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>bp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const td=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(P).forEach((t=>{e.add(P[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(si()),o.component("pie-dividers",pi),o.component("negative-indicators",mi),o}();return{qae:ed(o),ext:Qp(o),component(){const e=fc({picasso:a}),t=Fc({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=h(),a=C(),s=w(),l=x(),u=A(),c=S(),p=y(),d=E(),{qLocaleInfo:f}=I(),[m]=k((()=>t?(Lc.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);D((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),D((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,tooltipService:x}=t,q=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",q.legendScrollOffset||0),g.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))}(c,g),x.expando.set("properties",m[1]);const D=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),C=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],w={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const S=function(e,t){return t.slice.outerRadius?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:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),w),M=p?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{p.select(e)}))}:()=>{},E=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,A=t=>e.selectionService.getIsSelectionLocked(t),I=()=>gp({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:d,model:a},selectionService:e.selectionService},{picasso:r,ds:D,model:a,app:s,chart:h,onSelect:M,isLocked:A,interactions:y,constraints:d,translator:l,viewState:g,dataRowCount:S,encodings:w,colorService:v,pluginService:b,tooltipService:x,debouncer:fs,properties:m[1],logicalSize:E,flags:o});e.generateSettings=I,h.update({data:C,settings:I()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:w}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,d,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=S(),n=h(),r=O();D((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),yp({instance:e,services:t})}}};export{td as default};
|
|
9
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,u,c,d,p=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=p-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(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=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)h+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(gl={exports:{}}),gl.exports);function vl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var bl={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"},xl=/%$/,ql=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Dl=/^\(oct\)/i,Cl=/^\(dec\)/i,wl=/^\(hex\)/i,Sl=/^\(bin\)/i,Ml=/^\(rom\)/i,El=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Al=/#|0/g;function Il(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Tl(e,t,n){var r=vl(e);return n?r:new RegExp(r||"",t)}function kl(e,t,n){var r,o,i,a,s,l,u,c,d,p,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),p=t,(f=n)&&(f=vl(f)),p&&(p=vl(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(d))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===n&&(o=(r=i.split(n)).pop(),i=r.join("")+n+o,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(i=i.replace(Tl(l,"g"),t)),u=n,n=".",u&&(i=i.replace(Tl(u,"g"),n)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Al)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=xl.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Tl(t,null,!0),"|").concat(Tl(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Ol=function(){function e(t,n,r,o,i){gs(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return bl;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return vs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],El.test(e[0])&&(r.positive.isFunctional=!0),e[1]?El.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?El.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||kl(r.positive,t,n),r.negative&&!r.negative.isFunctional&&kl(r.negative,t,n),r.zero&&!r.zero.isFunctional&&kl(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,o,i,a,s,l,u,c=this._prepared,d="",p="",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,n){var r;return ql.test(t)?e=Il(e,Number(/\d{2}/.exec(t)[0]),t,n):Dl.test(t)?e=Il(e,8,t,n):Cl.test(t)?e=Il(e,10,t,n):wl.test(t)?e=Il(e,16,t,n):Sl.test(t)?e=Il(e,2,t,n):Ml.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",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(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,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,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=yl(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%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(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(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(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=yl(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+p+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ll(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?5e3:o,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),p=0,f=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return p>=i&&(delete c[d[f]],delete d[f],p--,f++),c[e]=t,d[p]=e,p++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),p=0,f=0},t.size=function(){return p},t}function Nl(e,t,n,r,o){var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ws(Ol,t)}(o,e,t,n,r),a=Ll(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var Pl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Rl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Fl=["January","February","March","April","May","June","July","August","September","October","November","December"],jl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Hl(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function _l(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var zl=function(){function e(t,n,r){gs(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Pl,qDayNames:Rl,qLongMonthNames:Fl,qMonthNames:jl}),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(),n||(n=(bs(o={},"T",i.qTimeFmt||"hh:mm:ss"),bs(o,"D",i.qDateFmt||"YYYY-MM-DD"),bs(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return vs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(r=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:i,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*_l(t),r=60*_l(n),o=60*_l(r),i=1e3*_l(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date: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:Hl("".concat(t.year).slice(-2),2),YYY:Hl("".concat(t.year).slice(-3),3),def:function(e){return Hl("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Hl("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Hl("".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 Hl("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Hl("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Hl("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Hl("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var o=0;o<r;o++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in l[n])if(o===e||o.toLowerCase()===e){void 0===(r=l[n][o])&&(r=l[n][o.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Vl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ws(zl,t)}function Ul(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Vl(n,e,t),o=Ll(r.format.bind(r),{toKey:function(e){return"object"===hs(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?Ul(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),r.format(t,e)},a.locale=function(n){return r=Vl(n,e,t),o=Ll(r.format.bind(r),{toKey:function(e){return"object"===hs(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Wl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Bl(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=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?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##A"),i="U"),Nl(n,r,o,i,t)}function $l(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=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}),d=function(e){return e.qText||""},p="dimension"===l?"first":"avg",f=Wl(n,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return r},key:function(){return o},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:d,reduce:p,reduceLabel:m,formatter:function(){return f},tags:function(){return n.qTags}};return h}function Yl(e,t,n,r,o){return(t[e]||[]).map((function(t,i){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:$l(Rs({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=Yl("qAttrDimInfo",t,n,a,Rs({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Yl("qAttrExprInfo",t,n,a,Rs({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=Yl("qMeasureInfo",t,n,a,Rs({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function Kl(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.key,i=r.data,a=r.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=Kl.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},p={key:function(){return o},raw:function(){return u},field:function(e){return tl(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,p,l,c)},hierarchy:function(e){return d.hierarchy(e,p,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=hl,d.hierarchy=ml,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=_s,d.pages=u.qDataPages,d.hierarchy=ml):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},p,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,Ss(Yl("qDimensionInfo",u,o,"",Rs({},d,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,Ss(Yl("qMeasureInfo",u,o,"",Rs({},d,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=p.field(e.from),n=$l(qs({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},p,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,Ss(l.virtualFields)),p}var Jl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Gl=/\/qDimensionInfo(?:\/(\d+))?/,Zl=/\/qMeasureInfo\/(\d+)/,Xl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Ql=/\/qAttrExprInfo\/(\d+)/,eu=/\/?qHyperCube/,tu=/\/?qTreeData/,nu=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},ru=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function ou(e,t){var n=e,r=-1,o=-1,i="",a=function(e){return e};eu.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=nu):tu.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=ru);var s=!0;if(Gl.test(e)&&(r=+Gl.exec(e)[1]),Zl.test(e)&&(o=+Zl.exec(e)[1]),Xl.test(e)){o=-1,r=0;var l=+Xl.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(Ql.test(e)){var u=o;if(t){o=0;var c=Xs(i,t);o+=(c.qMeasureInfo||[]).length,r>-1?(o=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),r=-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+=+Ql.exec(n)[1]}else r>-1?(r=-1,o=+Ql.exec(n)[1]):o+=+Ql.exec(n)[1]+1}return Jl.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Ms(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],o=t[1];n=n.replace(r,o)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}function iu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=n.byCells,i=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=ou(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(o)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,p=d.qNoOfLeftDims,f=d.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===p||f>=p)&&p>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-p})})):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=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function au(e){Kl.util=e.data("matrix").util,e.data("q",Kl),e.formatter("q-number",Nl),e.formatter("q-time",Bl)}function su(e){var t=cs(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function lu(){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"===hi(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 uu(e){var t=e.brush,n=e.colorField,r=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):i&&t.addKeyAlias(r,"qHyperCube/".concat(n))}au.qBrushHelper=iu,au.selections=iu;function cu(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),o=n(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,o,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==n.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,n=void 0===t?{}:t,r=e.values,o=void 0===r?[]:r;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=su({layout:n,path:e}),r=o.filter((function(t){return t.key===e})),i=t?[r.pop()]:r;a.push.apply(a,Ci(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),o=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||o.includes(n.id)&&o.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var du=[],pu=0,fu=function(e){var t=du.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()})))},mu=function(){document.addEventListener("keyup",fu)},hu=function(){document.removeEventListener("keyup",fu)},gu=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},yu=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function vu(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var o=r[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function bu(e){var t=e.chart,n=e.document,r=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=r.event===o,d=n.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!d)return!1;var p=t.component(i);return!!p&&(p.emit(u),"string"==typeof s&&t.brush(s).clear(),p)}function xu(e){var t=e.selectionInfo,n=e.chart,r=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 bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function qu(e){var t=e.selectionInfo,n=e.chart,r=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 bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function Du(e){var t=e.selectionInfo,n=e.chart,r=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,d=bu({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(d){var p=d.settings.settings,f=p.scale,m=p.brush,h=n.scale(f).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Cu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;bu({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function wu(e){var t=e.chart,n=e.selectionInfo,r=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(n&&i.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Su(e){var t=e.selectionInfo,n=e.chart,r=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,d=e.brushName;bu({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&o.clear()}var Mu=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=qi(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Eu(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Au(e){var t,n=e.chart,r=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,d=o.reset,p=void 0===d?Eu:d,f=o.clear,m=!1!==f&&function(e){var t=e.clear,n=void 0===t?Mu:t,r=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:o,chart:i,document:document,cleared:e};return n(xi({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xu(xi(xi({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qu(xi(xi({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Du(xi(xi({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cu(xi(xi({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return wu(xi(xi({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Su(xi(xi({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,o=e.clear,i=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),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===r&&delete a.deactivated,!1===o&&delete a.cleared,!1===r&&!1===o&&delete a.canceled,a}({chart:n,clear:m,reset:p,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:i,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(xi(xi({},void 0===t?{}:t),{},{event:r,components:i.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:o,chart:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(xi(xi({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:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Iu=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Tu(e){var t=e.chart,n=e.actions,r=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,d=(c=void 0===c?{}:c).clear,p=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,S=i.selectionsFn,M=void 0===S?o.selections:S,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var A=!0===D?Iu:D;E.configure({ranges:A})}var I={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,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(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++pu,c=null,d=[],p={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var f=cu({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),m=f.rangeInterceptor,h=f.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(l)}));var g={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};gu(n,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;r.start(),"function"==typeof i.select.getBrushOptions&&(p=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(r,p,c).forEach((function(e){vu(e,i.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,p,c).forEach((function(e){return n.select(e)}))})),0===du.length&&mu(),du.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=du.indexOf(du.filter((function(e){return e.key===u}))[0]);-1!==e&&du.splice(e,1),du.length||hu(),yu(n,g)}}}({brush:E,majorScale:u,actions:n,selections:r,picassoQ:o,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(r,e)}))}))}({brush:E,interceptors:w});var k=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=Di(e,2),i=o[0],a=o[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];t.removeListener(r,o)}))}}({brush:r,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=Au({chart:t,selectionInfo:i,selectionActions:n,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:n,selections:r,selectionInfo:I.selectionInfo,selectionActions:{clear:d,reset:p},selectionEvents:m,brushEvents:g});if(s){var O=!0===s?Ci(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;T.allowSimultaneous(O)}return{unbindEvents:k,state:I,picassoSelections:T,brush:E}}function ku(e){var t=e.chart,n=e.selections,r=e.actions,o=void 0!==r&&r,i=e.config,a=void 0===i?{}:i,s=Tu({chart:t,actions:o,selections:n,picassoQ:au,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,p=a.custom,f=void 0===p?{}:p,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?uu:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:lu(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,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!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return su({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,o=qi(e,["colorField","useLegendCube"]),i=xi({useLegendCube:r,colorField:t,brush:d,legendAlias:h},o);y(xi(xi({},i),{},{defaultFunc:function(){return uu(i)}}))},destroy:function(){l(),c.release()},custom:xi({},f)}}var Ou={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Lu="chart-modules-tooltip",Nu="#".concat(Lu);function Pu(){if(!document.querySelector(Nu)){var e=document.createElement("div");e.id=Lu,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 Ru(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Pu()},beforeUpdate:function(){Pu()},destroyed:function(){var e;null!=(e=document.querySelector(Nu))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Nu)},direction:e.rtl?"rtl":"ltr",duration:e.duration},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 Fu="position",ju={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Hu=function(e){return e.data.value},_u=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function zu(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.collectConfig,i=e.collectibles,a=e.meta,s=o.from,l={chart:t,expando:n,nodes:r,collectConfig:o,collectibles:i,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=Di(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){return e.nodes}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0],i=n.filter,a="function"==typeof i?i:function(){return!0},s=n.by,l=void 0===s?Hu:s;return r.reduce((function(e,n){var r=n.major,i=void 0===r?_u:r,a=ju[n.type]||n.type;return e.push.apply(e,Ci(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&i({data:e.data})===l({data:o.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0].localBounds,i=n.distance,a=n.filter,s="function"==typeof a?a:function(){return!0},l=r.map((function(e){return e.key})),u=Di(l,1)[0],c=t.component(u).rect,d=c.scaleRatio,p=c.computedInner,f=o.width*d.x,m=o.height*d.y,h=o.x*d.x+f/2+p.x,g=o.y*d.y+m/2+p.y,y=i||Math.max(f,m);return t.shapesAt({cx:h,cy:g,r:y},{components:l.map((function(e){return{key:e}}))}).filter(s)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:o})}(l);default:return[]}}var Vu=Number.MAX_VALUE;function Uu(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:Vu,xMax:-Vu,yMin:Vu,yMax:-Vu}),n=t.xMin,r=t.xMax,o=t.yMin;return{x:n,y:o,width:r-n,height:t.yMax-o}}function Bu(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.nodes;if(!i.length)return[];var a=Di(i,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},u=l.collect,c=l.placement;if(!u||!u.from||!c)return[];var d={triggerer:a,position:o.get(Fu)},p=(zu({chart:t,expando:r,nodes:i,collectConfig:u,collectibles:s,meta:d})||[]).map((function(e){return e.children.length?e.children[0]:e}));return p.length?function(e){var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=Di(i,1)[0],u=Array.isArray(o)?o:[o],c={bounds:l.bounds,key:l.key},d=Uu({nodes:a}),p=0;p<u.length;p++){var f=u[p];if("function"==typeof f){var m=f({chart:t,expando:r,hovered:i,collected:a,meta:s,collectedBounds:d,combineBounds:Uu});if(m)return m}if("trigger"===f)return c;if("collectible"===f){var h=n.main.placements.collectible;return{bounds:"function"==typeof h?h({collected:a}):d,key:a[0].key}}}return c}({chart:t,config:n,expando:r,placementConfig:o,hovered:i,collected:a,meta:s}),u=l.bounds,c=l.key,d=Di(a,1)[0].desc;return[{bounds:u,nodes:a,data:a.map((function(e){return e.data})),key:c,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:c,hovered:i,collected:p,meta:d}):[]}var Wu=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),$u=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Yu=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ku=function(e){return Wu.test(e)},Ju=function(e){return $u.test(e)||Yu.test(e)};function Gu(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Ku(r))return"ltr";if(Ju(r))return"rtl"}return"ltr"}function Zu(e){var t=e.visibility;return{type:"divider",content:[{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}],visibility:xi(xi({},{count:!1}),t)}}function Xu(e){var t=e.config,n=e.h,r=e.context,o=e.nodes,i=e.property,a=e.filter,s=e.visibility,l=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:xi(xi({},{count:!0}),s)},c=t.getColorSettings();if("color"===c.type||!c.fieldType)return u;var d=Di(o,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,o=e.node,i=o.data[r];if(i){if(-3===o.data.value)return o.data.label;var a=n.resources.dataset(i.source.key).field(i.source.field).formatter(),s=i.value,l=i.label,u=t.getColorSettings();if(a&&"measure"===u.fieldType)return Number.isNaN(+s)?"-":a(i.value);var c=l||s;return void 0===c||Number.isNaN(c)||"NaN"===c?"-":c}}({config:t,context:r,property:i,node:d}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,o=e.config.getColorSettings();if(o.label)return o.label;var i=r.data[n];if(i&&"color"!==o.type){var a=t.resources.dataset,s=i.source,l=s.key,u=s.field;return a(l).field(u).title()}}({config:t,context:r,property:i,node:d});var p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:d}),margin:"0 8px"}});return u.content.push({content:l?[":",u.label]:[u.label,":"],style:{"text-align":l?"right":"left",direction:Gu(u.label)}},{content:l?[u.value,p]:[p,u.value],style:{"text-align":l?"left":"right","vertical-align":"middle",direction:Gu(u.value)}}),u}function Qu(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,o=(r=void 0===r?{}:r).bold,i=void 0!==o&&o,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":i?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:Gu(n)},colspan:2}],visibility:xi(xi({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:o})},measure:function(e){var r=e.label,o=e.value,i=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,o,i=e.h,a=e.label,s=e.value,l=e.color,u=e.style,c=e.survive,d=e.visibility,p=e.config.rtl,f=i("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:p?[":",a]:[a,":"],style:{"text-align":p?"right":"left","font-weight":null!=u&&null!==(t=u.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=u&&null!==(n=u.label)&&void 0!==n&&n.italic?"italic":"normal",direction:Gu(a)}},{content:l?p?[s,f]:[f,s]:s,style:{"text-align":p?"left":"right","vertical-align":"middle","font-weight":null!=u&&null!==(r=u.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=u&&null!==(o=u.value)&&void 0!==o&&o.italic?"italic":"normal",direction:Gu(s)}}],survive:xi(xi({},{color:!1,duplicate:!1}),c),visibility:xi(xi({},{count:!0}),d)}}({config:t,h:n,label:r,value:o,color:i,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return Zu({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:xi(xi({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:xi(xi({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var o=e.nodes,i=e.property,a=e.filter,s=void 0===a||a,l=e.visibility;return Xu({config:t,h:n,context:r,nodes:o,property:i,filter:s,visibility:l})}}}function ec(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.h,a=e.data,s=e.style,l=Di(a,1)[0],u=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]=[]),e[r].push(n),e}),{});return Object.keys(n).map((function(e){return n[e]}))}({config:r,nodes:l.node.nodes}),c=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.h,i=e.context,a=e.groups,s=i.node.meta,l=i.resources,u=l.dataset,c=l.formatter,d=Qu({config:n,h:o,context:i}),p=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:u}),f=a.map((function(e){var t=d.section({content:Ci((n.main.section({expando:r,h:o,nodes:e,dataset:u,formatter:c,meta:s,create:d,util:p})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),o=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?o:o.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var o="".concat(t.label,"-").concat(t.value);return e.memory[o]||(e.memory[o]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:o,nodes:i.node.nodes,dataset:u,formatter:c,meta:s,create:d,util:p,sections:f}),f.filter(Boolean)}({chart:t,config:r,expando:o,h:i,context:l,groups:u}),d=function(e){var t=e.translator,n=e.config,r=e.context,o=e.templates,i=n.main.layout,a=i.rows,s=i.grouping,l=i.single,u=function(e){var t=e.limit,n=e.grouping,r=e.single,o={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var i=e.visibility,a=e.index;if(r&&0!==a)return n?(o.index.started!==a&&o.index.group!==a&&(o.overflow++,o.index.group=a),!1):(o.overflow++,!1);if(o.count>=t){if(!n)return o.overflow++,!1;if(o.index.started!==a)return o.index.group!==a&&(o.overflow++,o.index.group=a),!1}return i.count&&o.count++,n&&(o.index.started=a),!0},overflow:function(){return o.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:o}):l}),c=o.reduce((function(e,t,n){var r=t.type,i=t.content;"section"===r&&(void 0===i?[]:i).forEach((function(t){u.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===o.length-1;return"divider"!==r||a||u.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),d=u.overflow();return d&&c.push(function(e){var t=e.translator,n=e.config,r=e.count,o=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),i=Gu(o);return[{content:o,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:i},colspan:2}]}({translator:t,config:n,count:d})),c}({translator:n,config:r,h:i,context:l,templates:c});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:xi(xi({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:i,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:i})}function tc(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.internal;if(!r.main.key)return!1;var a=ps(),s=Ru({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,u=l.afterShow,c=l.afterHide,d=function(){var e=a.get("collected");return{expando:o,nodes:e.nodes,meta:e.meta}};return Ni(!0,s,{settings:{filter:function(e){return Bu({chart:t,config:r,expando:o,internal:i,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var i=e.h,a=e.data,s=e.style;return ec({chart:t,translator:n,config:r,expando:o,h:i,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return u(d())},afterHide:function(){return c(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function nc(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Ru({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Ni(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:xi(xi({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function rc(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}function oc(e){var t=e.chart,n=e.event,r=e.component,o={absolute:{x:0,y:0},relative:{x:0,y:0}},i=t.element.getBoundingClientRect(),a=i.left,s=i.top;o.absolute.x=(n.center?n.center.x:n.clientX)-a,o.absolute.y=(n.center?n.center.y:n.clientY)-s;var l=t.component(r);if(l){var u=l.rect.computedInner;o.relative.x=o.absolute.x-u.x,o.relative.y=o.absolute.y-u.y}return o}function ic(e){var t=e.chart,n=e.hits,r=e.position,o=[];if(n.position.length&&o.push.apply(o,Ci(t.shapesAt(r.absolute,{components:n.position.map((function(e){return{key:e}}))}))),!o.length&&n.distances.length){var i=[];n.distances.forEach((function(e){i.push.apply(i,Ci(t.shapesAt({cx:r.absolute.x,cy:r.absolute.y,r:e},{components:n.distanceKeys[e].map((function(e){return{key:e}}))})))})),i.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var o=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=o(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:o(t[0])}).node}({nodes:i,origin:r.relative}))}return o}function ac(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=n.delay.tap,s=rc({config:n}),l=n.main.triggers.reduce((function(e,t){return e.push.apply(e,Ci(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==l.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:vi({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var l=t.component(n.main.key);if(l&&l.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),c=s({components:u});if(c.any){var d=Di(c.components,1)[0],p=oc({chart:t,event:e,component:d});o.set(Fu,p);var f=ic({chart:t,hits:c,position:p});if(f.length){var m=f[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return i.collectNodes({nodes:f})},meta:{triggerer:m,position:p}}).then((function(){l.emit("show",e,{nodes:f,delay:a})}))}else l.emit("hide")}else l.emit("hide")}}}))}}function sc(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=rc({config:n}),s=function(e){var t=e.config,n=e.expando,r=e.internal,o=e.facade,i=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,u=e.nodes,c=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){return{key:e.key,bounds:e.bounds,value:e.data.value}})))}({nodes:u});if(!s.ongoing[c]){s.ongoing[c]=!0,s.latest=c;var d=u[0].key;i({expando:n,event:t,collectNodes:function(){return o.collectNodes({nodes:u})},meta:{triggerer:d,position:r.get(Fu)}}).then((function(){c===s.latest&&l.emit("show",t,{nodes:u,delay:a})})).finally((function(){delete s.ongoing[c],c===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:o,facade:i}),l=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){l.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),i=t.component(n.main.key);if(i&&i.show){var l=a({components:r});if(l.any){var u=Di(l.components,1)[0],c=oc({chart:t,event:e,component:u});o.set(Fu,c);var d=ic({chart:t,hits:l,position:c});if(!d.length)return void i.emit("hide");s({event:e,tooltip:i,nodes:d})}else i.emit("hide")}var p=n.legend;if(p.keys.tooltip&&p.keys.component){var f=t.component(p.keys.tooltip);f&&f.show&&(r.some((function(e){return e.key===p.keys.component}))?f.emit("show",e):f.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function lc(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Ni(!0,{},{rtl:!1,enable:Ou.FALSE,getColorSettings:Ou.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Ou.FALSE,getGroupByValue:Ou.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Ou.ARRAY,sections:Ou.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Ou.NOOP,afterHide:Ou.NOOP},interaction:{mouseleave:Ou.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),o=ps(),i=ps(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[tc({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),nc({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:o,internal:i})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal;return{collectNodes:function(e){var i=e.nodes,a=Di(Bu({chart:t,config:n,expando:r,internal:o,nodes:i}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:o});return{gestures:[ac({chart:t,config:n,expando:r,internal:o,facade:i})],native:sc({chart:t,config:n,expando:r,internal:o,facade:i})}}({chart:t,config:r,expando:o,internal:i})),a.interactions},expando:o}}var uc={};function cc(){cc.init.call(this)}uc.isObject=function(e){return"object"==typeof e&&null!==e},uc.isNumber=function(e){return"number"==typeof e},uc.isUndefined=function(e){return void 0===e},uc.isFunction=function(e){return"function"==typeof e};var dc=cc;cc.EventEmitter=cc,cc.prototype._events=void 0,cc.prototype._maxListeners=void 0,cc.defaultMaxListeners=10,cc.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},cc.prototype.setMaxListeners=function(e){if(!uc.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},cc.prototype.emit=function(e){var t,n,r,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(n=this._events[e],uc.isUndefined(n))return!1;if(uc.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(uc.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},cc.prototype.addListener=function(e,t){var n;if(!uc.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,uc.isFunction(t.listener)?t.listener:t),this._events[e]?uc.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,uc.isObject(this._events[e])&&!this._events[e].warned)&&((n=uc.isUndefined(this._maxListeners)?cc.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,uc.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),uc.isFunction(console.trace)&&console.trace()));return this},cc.prototype.on=cc.prototype.addListener,cc.prototype.once=function(e,t){if(!uc.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},cc.prototype.removeListener=function(e,t){var n,r,o,i;if(!uc.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||uc.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(uc.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},cc.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],uc.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},cc.prototype.listeners=function(e){return this._events&&this._events[e]?uc.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},cc.listenerCount=function(e,t){return e._events&&e._events[t]?uc.isFunction(e._events[t])?1:e._events[t].length:0};function pc(){const e={};var t;return t=e,Object.keys(dc.prototype).forEach((e=>{t[e]=dc.prototype[e]})),dc.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function fc({picasso:e}){var t;const n=h(),r=g(),o=y(),[i,a]=v(),s=pc(),l=b(),u=x(),c=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[d,p]=v(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:o}){var i,a,s;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},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:c,isLassoActionActive:d,setIsLassoActionActive:p,translator:u}),q((()=>(i&&(i.interactions.lasso.active=()=>d),{...s.lasso})),[i,d,c,u.language()]),D((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),i=t.chart({element:r,data:[],settings:{}}),u=ku({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=xi({},e),n={},r={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&n[e]?t[e]=n[e](i,a):t[e]=i,!o&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[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}const mc={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 hc(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const gc={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}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:n,width:l}=s,u=i[t]*(n>l?1:n/l),c=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function yc(e,t,n,r){var o,i,a,s,l,u;const{app:c,flags:d}=t,p=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[f]=p,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===f.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,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,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await gc.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&hc(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await gc.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await gc.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(c,d,f,m,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(hc(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await gc.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(c,n[g],m,v)}return[]}const vc={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(yc(e,r,n,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,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},bc={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await vc.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>vc.checkIfPromisesExist({customTooltipModel:e})};const xc=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:mc.CHART.CHART_PARENT_TYPE,qId:mc.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},qc=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:mc.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const Dc={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=mc.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:mc.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel: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 Dc.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=mc.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=mc.CHART.STATE,a=xc(t,i),s=await e.createSessionObject(a),l=qc(t);if(s.id!==mc.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 d,p,f,m;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(mc.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 Dc.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Dc.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(mc.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=mc.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Cc(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function wc(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=mc.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function Sc(e){const t=wc();return e.filter((e=>t[e.id]))}const Mc={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];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=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Mc.getAttrExprData(a);i.length||n.length?bc.handlePromises({customTooltipModel:o,nodes:Mc.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Dc.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>bc.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";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;n=(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)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[mc.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[mc.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[mc.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Sc(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[mc.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[mc.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Cc(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===Sc(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)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=Cc(e)||[];[...o,t].forEach((e=>{const t=Sc(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=wc(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=se.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),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,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Ec(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case mc.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case mc.CUSTOM.TITLE:case mc.CUSTOM.DESCRIPTION:case mc.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Ac={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Ec(t,e,r,n)}}};const Ic={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[mc.CUSTOM.TITLE]:!0,[mc.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Mc.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===mc.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.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&&r.customTooltipInfoAttrExpsArr.push({...e.id===mc.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>le.getMeasure(e,t))),e,i)}};function Tc({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Ic.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function kc(e){const t=mc.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function Oc(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Lc={attrExpr:{migrateProperties(e){var t,n,r,o;const i=K(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=Oc(i);return s=function(e,t){return t.concat(e.map((e=>kc(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,n,r,o;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=kc(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Oc(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,o,i,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.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 r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:Nc}=mc;function Pc({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:u}){var c,d,p;const f=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Mc,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&cs(t,"tooltip.hideBasic",!1),y=!!(h&&null!==(c=t.tooltip)&&void 0!==c&&null!==(d=c.chart)&&void 0!==d&&null!==(p=d.object)&&void 0!==p&&p.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=Tc({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Nc.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Nc.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>Mc.checkIfPromisesExist({customTooltipModel:f}),createImageRow:({value:e,h:t})=>Mc.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const o=Mc.getDataNodes(i,r),a=Mc.getAttrExprData(t);return bc.handlePromises({customTooltipModel:f,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Dc.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Mc.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>Dc.show({app:n,properties:t,selectedNodes:e,customTooltipModel:f,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=f.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>Dc.hide({app:n,customTooltipModel:f}),destroy:()=>Dc.destroyVisualization({customTooltipModel:f})}}}function Rc(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Fc({flags:e,picasso:t,instance:n}){const r=C(),o=w(),i=x(),a=g(),[s,l]=v(),u=S(),c=M(),d=E(),p=h(),f=A(),{qLocaleInfo:m}=I(),y=T();return D((()=>{if(!n)return;a.style.overflow="hidden";const s=function(e){var t,n,r,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,p=void 0===d?us:d,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),S={theme:x,key:v,localeInfo:y,layout:w,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:xi(xi({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?is(w):void 0})},M=rs({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:ls}):ls(e)}));var E=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(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:xi({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?p:e)({getUseBaseColors:is}),n=as(S,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:n.picasso,model:r,app:o,translator:i,config:{auto:!1,key:"fill"}}),h=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,o=void 0===r?{}:r,i={initialized:!1,definitions:[]};return{initialize:function(){return yi(regeneratorRuntime.mark((function e(){var r,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(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=yi(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(xi({},o));case 4:if("object"===hi(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(xi({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(r=i.definitions).push.apply(r,Ci(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var n=Di(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Ni(!0,{},n.brush);Ni(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===hi(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}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n.picasso,plugins:c,pluginArgs:Rc(u)}),g=Pc({flags:e,layout:u,app:o,model:r,picasso:t,chart:n.chart,translator:i,localeInfo:m,embed:y,options:p}),v=function({chart:e,translator:t,layout:n,constraints:r,options:o,theme:i,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,u="rtl"===o.direction;return lc({chart:e,translator:t,config:{rtl:u,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:i.getStyle("object.pieChart","","fontFamily")},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:o,create:i,util:a})=>{const[u]=n,{title:c,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},f=[];c&&f.push(i.text({value:c,style:{bold:!0}})),d&&f.push(i.text({value:d}));const m=s.hideBasic();if(m&&!p.length&&(c||d)||f.push(i.text({value:u.data.label,style:{bold:!0}})),!m){f.push(i.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}f.push(i.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(u.desc.share)}))}p&&f.push(...p.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),f.push(i.raw({value:s.chart.createLimitationRow()}))):f.push(i.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:h}=u.data;return s.isEnabled()&&h&&f.push(...h.map((t=>i.raw({value:s.createImageRow({value:t,h:e})})))),f},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:n.chart,translator:i,layout:u,constraints:d,options:p,theme:f,colorService:s,custom:g});l({colorService:s,pluginService:h,tooltipService:v})}),[r,o,n,u,i.language(),d,p.direction,f.name()]),s}function jc({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:o}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},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 Hc={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},_c=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,o;let i=.8,a=0;const s=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;e.donut.showAsDonut&&(i=.8-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*i+a}}:.8,zc=({layout:e},t,n)=>{var r,o;if(!e.donut.showAsDonut)return 0;const i=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-i,n=i;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:i},Vc=({layout:e},t)=>{var n,r,o,i,a,s;const l=t.colorService.getDatumProps(),u=l[Object.keys(l)[0]],c=u&&u.field?u.field:void 0,d="qDimensionInfo/0"===c,p=c?t.ds.field(c).raw():null,f=p&&(p.label||p.title||p.qFallbackTitle)||"",m=t.encodings.slice.outerRadius,{formatter:h}=t.chart,g=ne(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>h(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:f,value:e=>d?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?Ac.getNode(e,{dimensionCount:g}):void 0,radius:m?y(m,"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:zc({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?Hc.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:Hc.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(o=v.style)||void 0===o||null===(i=o.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Hc.STROKE.COLOR,outerRadius:_c({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}},animations:{enabled:!0,trackBy:e=>e.d.match(/A/gi).length>=2?Math.random():e.data.value}}};function Uc({layout:e},t,n){var r,o;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],a=null!==(r=null==i||null===(o=i.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55,s=t.encodings.slice.outerRadius;return!(!e.donut.showAsDonut||!s)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:F(n.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-a,n=a;return e.scale(0)*t+n}}}},animations:{enabled:!0}}}function Bc({layout:e},t,n){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:F(n.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}const{getThemeStyle:Wc}=j;function $c(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Yc(e){return e.node.data.num.label}function Kc(e){return e.node.data.radius.label}function Jc(e,t,n){if(e.dataPoint.auto)return n?Yc:$c;if("share"===e.dataPoint.labelMode)return $c;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Kc:Yc}return null}function Gc({data:e}){return e?e.label:""}function Zc(e,t,n){const r=parseInt(Wc(e,"object.pieChart",t,n),10);if(!isNaN(r))return r}function Xc(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function Qc({node:e,data:t}){return K({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function ed(e,t,n){const r=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Wc(n.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Zc(n.theme,"label.name","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.name","fontFamily"),label:Gc,linkData:({node:e,data:t})=>K({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(Jc(e,t,!1)){const o=function(e,t,n){return{label:Jc(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Xc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Xc(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),i=de(K(t,o),n.theme);i.linkData=Qc,r.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:r}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:!0}}}function td({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=Jc(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.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?n.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:Zc(n.theme,"label.name","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.name","fontFamily"),label:Gc},{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:Zc(n.theme,"label.value","fontSize"),fontFamily:Wc(n.theme,"object.pieChart","label.value","fontFamily"),label:r}]}}}]}}}(e,n,t):ed(e,n,t))}const nd=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.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))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},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 rd(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}function od(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:o}=rd(e,t),i=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*.8;return(i-r)**2+(a-o)**2<=s**2}const id=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=rd(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const i=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});i.length&&(this.chart.brushFromShapes(i,{components:[{key:i[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),ad=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.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()}}}),sd=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const 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((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function ld(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&od(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 n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const ud=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&od(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.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 n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),cd=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.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}}}),dd=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[ud(e,{}),id(e,t,{}),...n]:[nd(e,{}),sd(e,{}),ud(e,{}),ad(e,{}),cd(e,{}),id(e,t,{}),...n]});function pd(e,t,n){const r=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const i=t.tooltipService.getInteractions();return[dd(t,r,i.gestures),ld(t),i.native]}function fd({settings:e},t){const n={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&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function md({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:n.theme.getStyle("object","axis.title","fontFamily"),fontSize:n.theme.getStyle("object","axis.title","fontSize"),color:n.theme.getStyle("object","axis.title","color")}}}function hd({layout:e},t,n){return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:Z[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:o}}}(function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const o=ne(e,"qHyperCube.qSize.qcy");if(ne(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const i=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":i.length!==r.length&&"NegativeOrZeroValues"}(e,t),t,n)}function gd({layout:e,context:t,selectionService:n},r={}){const o=function({layout:e}={},t={}){const n={};return K(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&K(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),i={scales:o};let a=[];const s=hd({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.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=[Vc({layout:e,settings:i},r),Uc({layout:e},r,t),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:!0,trackBy:()=>Math.random()}},Bc({layout:e},r,t),md({layout:e},r,t),...u.components,jc({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.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}}},td({layout:{dataPoint:K({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:pd(n,r,t),scales:o,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:fd({settings:i},r),strategy:te(0,r)}}function yd({instance:e,services:t}){const n=g(),r=S();L((o=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:re(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),N((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:re(e.chart,"legend-cat")})})),[e])}var vd={exports:{}};window;var bd=H(vd.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,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,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.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(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(d,{name:n,newValue:o}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,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,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.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(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(d,{name:n,newValue:o}));return d}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},a=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.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 r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],o),p=c(r[1],o),f=m(0),h=m(1),g=y(d,f),v=y(p,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return h(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==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 C=o.a.bind(null,!0),w={},S=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function E(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=E(e[n||t])?i:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}w.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?C({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);T(i,a)||A(t,o)||(E(a)?r.push({op:"add",path:s,value:i}):M(i)&&M(a)?r=r.concat(w.generate(a,i,s)):S(i)&&S(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&E(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,o))return r;if(!E(t[0])&&E(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(w.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){E(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},w.apply=function(e,t){t.forEach((function(t){var n,r=I(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?r[o]:r[+o]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,i=e),"add"===t.op||"replace"===t.op)if(S(r))"-"===o&&(o=r.length),r.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,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(i)&&M(t.value))n=i,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]})),C(i,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[o]=t.value}else if("move"===t.op){var u=I(e,t.from);S(r)?r.splice(+o,0,u.splice(+a,1)[0]):(r[o]=u[a],delete u[a])}else"remove"===t.op&&(S(r)?r.splice(+o,1):delete r[o])}))},w.clone=function(e){return C({},e)},w.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},w.updateObject=function(e,t){Object.keys(e).length?w.apply(e,w.generate(e,t)):C(e,t)};var k=w,O=function(e,t,n){if(!e)return Promise.resolve();var r=k.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},L="accumulation";function N(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function P(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getNumStepComp(n,l),p=q.getAboveComp(n,l,c,d),f=q.getRangeComp("RangeSum",p);if(q.needDimension({modifier:n,properties:r,layout:o})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=n.showExcludedValues?q.getExcludedComp({modifier:n,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 n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(L))return!1;var i=N(t,e);return i&&!i.disabled}}}},j="movingAverage";function H(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:o,layout:i}));var c=a(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=q.getNumStepComp(r,u),m=q.getAboveComp(r,u,p,f);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:o,layout:i})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,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(_(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(_(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(_(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(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(_(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=H(t,e);return i&&!i.disabled}}}},U="difference";function B(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function W(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(q.needDimension({modifier:n,properties:r,layout:o})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(p,f,m);p=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(W(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(W(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(W(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(U))return!1;var i=B(t,e);return i&&!i.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},J={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function X(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:J.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(o,i),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,i)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=re(t),l=oe(t,n,r),u=""===s&&""===l?"":s||l,c=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,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,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,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,n){return(Z(t,e).dimensionalScope||0)===J.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=Z(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ce=ue;function de(e){return(de="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 pe={accumulation:F,movingAverage:V,difference:Y,normalization:se},fe=(t.default={modifiers:pe,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return pe[e]&&pe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=qe(e);Ae({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Le({modifiers:t,properties:n,layout:r}))})),o&&!i},ifEnableTotalsFunction:be},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,n&&"object"===de(n))return he({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var d=a(u,"qHyperCube.qMeasureInfo"),p=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:u,model:t,lastReloadTime:p});return f||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ae({modifiers:qe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);Ce(n);var r=Ne(n);return Ie({model:t}).then((function(o){return Te({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ee({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(pe[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=pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Se(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),he({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ne(n);return Pe({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Oe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Ce(r);var p=Ne(r);return Pe({model:t,libraryIds:p,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Ne(n);return Ie({model:r,dimensionAndFieldList:s}).then((function(e){return Te({libraryIds:l,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ae({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(pe[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)");pe[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=pe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof pe[n.type].updateModifier&&pe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=pe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),we(t)):ge(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Oe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!pe[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,we(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ae({modifiers:qe(e),properties:n,layout:r})}))}function ve(e){var t=qe(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(pe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||pe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function we(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!pe[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Se(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Se(e);return e.qLibraryId||t&&t.qLibraryId}function Ee(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&Ae({modifiers:qe(t),properties:n,layout:r})}function Ae(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=pe[e.type].isApplicable({properties:n,layout:r})),o[e.type])}))}function Ie(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));r.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return o}))}function Te(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Oe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):O(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return o})):Promise.resolve(o)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&pe[e.type]&&pe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ne(e){var t=xe(e),n=[],r=[],o=!1;return t.forEach((function(t){var r=qe(t);if(Ae({modifiers:r,properties:e})){var i=Me(t);i&&n.push(i),o=o||Le({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Pe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){o[e]||i[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function 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)}n.r(t);var i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n: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:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c},p=n(1),f=n.n(p),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,n){var r,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(r=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return C(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 C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(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 C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=v(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=b(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,o.dimensions.length,q),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,q),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=y()(!0,{},n,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=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>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>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=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=D(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=w(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function E(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){i.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var A={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),r||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),y=i.getValue(r,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,q=b.minDimensions,D=b.maxMeasures,C=b.minMeasures,w=l.defaultDimension,S=void 0===w?M.getDefaultDimension():w,A=l.defaultMeasure,I=void 0===A?M.getDefaultMeasure():A;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:v,defaultDimension:S}),M.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:C,newHyperCubeDef:v,defaultMeasure:I}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),h.qProperty=g;var T=i.getValue(c||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:T}),p&&E(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&E(h.qProperty,"dynamicScript"),h}},I={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function T(e,t,n,r){t=t||[];var o=c(e,r,n),i=c(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function k(e,t){return e.length!==t}var O={create:function(e,t){if(!e||!I[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(T(a,t,r,o),k(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},L={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},N={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.getNumMeasures(e)>=1}}},P={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},R={scatterplot:P,"sn-scatter-plot":P,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return L.getNumDimensions(e)>=1}}}};function F(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function j(e,t){var n=O.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)})),t.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)}))}function H(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function _(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;j(r,o);var l=r[r.length-1];if(l){var u=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=O.create(O.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,n,r){var o=n?"expression":t.type,i=e.color,a=i.mode,s=L.getItemLabel(t);switch(H(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&V.useMasterNumberFormat(i.formatting)}r||(i.auto=!1,i.mode=a)}function B(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=O.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return U(e,z("dimension",!!a,a||r)),!!a}function W(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=z("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,U(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;_({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=z("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,U(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=O.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;_({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||N).colorModeOptions||N.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},updateColorBy:function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?j(o,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:o})?W(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:r,colorMode:n,dimensions:o,measures:a,properties:e})?$(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),j(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=A.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=O.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return O.moveByIdFromGroup(a,[],"qAttributeDimensions",u),O.moveByIdFromGroup(a,[],"qAttributeExpressions",u),O.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=A.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,p),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(f),c}},J=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?E(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):E(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),J.includes(r)&&t[o].type[r]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:d}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),G.setInterColumnSortOrder(d.qHyperCubeDef),c}};function X(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=X(n,r,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=X(n,r,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:A,colorChart:K,axisChart:Z,quarantineProperty:h,unquarantineProperty:E,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}]));const xd={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},qd={getDimensions:e=>xd.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>xd.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>xd.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>xd.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=xd.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=xd.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const Dd={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>qd.getNumMeasures(e)>=1},showLegend:e=>{const t=xd.getValue(e,"color.auto"),n=xd.getValue(e,"color.expressionIsColor"),r=xd.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!xd.getValue(e,"color.auto")&&"byDimension"===xd.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===xd.getValue(e,"color.useDimColVal")&&xd.setValue(e,"color.useDimColVal",!1),!xd.getValue(e,"color.auto")&&"byDimension"===xd.getValue(e,"color.mode")&&"libraryItem"===xd.getValue(e,"color.byDimDef.type"))},Cd=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=Dd;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!xd.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=xd.getValue(e,"color.auto");return xd.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===xd.getValue(e,"color.mode")&&!0===xd.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>xd.getValue(e,"legend.show")&&o(e)}}};function wd(e){return new Cd(e)}const Sd={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:{slices:{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,n)=>n.layout.donut.showAsDonut}}}}},Md={component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Ed=wd("hard");const Ad=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(ds(e,"color.mode","byDimension"),ds(e,"color.byDimDef.activeDimensionIndex",0),ds(e,"color.persistent",!1))},Id=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},Td=e=>{const{flags:t,translator:n}=e||{},r={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?n.get("Simple.Color.Auto",n.get("properties.colorMode.byDimension")):n.get("Common.Custom")},change:Ad},colorMode:{options:Id}}}}};return{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||ds(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,o){o.dimensionTitle=!e}}}}}}},general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?Md:Sd,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:Ed.color.colorMode.options},persistentColors:{show:Ed.color.persistentColors.show}}},simpleColors:r,legend:{show:Ed.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Ed.legend.showTitle.show},dock:{show:Ed.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},kd={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Od={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Ld={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Nd(e){return{type:"items",component:"accordion",items:{data:kd,sorting:Od,addons:Ld,settings:Td(e)}}}const Pd=wd("explore"),Rd=Nd();var Fd={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Rd.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:Rd.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:Pd.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Pd.color.useDimColVal.show(e))}}}}}}};function jd(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Hd(e){return e.data.num.label}function _d(e){return e.data.radius.label}function zd(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Hd:jd;if("share"===e.dataPoint.labelMode)return jd;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?_d:Hd;return Hd}(n,r)(e,t)}function Vd(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Ud{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.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,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,d=u.left-r.left+l.x*(s.x+a*Math.sin(c)),p=u.top-r.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:Vd(n),label:zd(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=K(e.options,{effect:null}),n?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 Bd extends Ud{init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&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 Wd extends Ud{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 n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}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(((n,r)=>{const o=zd(n,this.chart.formatter,e,t);return{text:`${Vd(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var $d={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new Bd(e):"/effects/highlight-value"===e.effectPath?new Wd(e):null};function Yd(e){const t={},{components:n,tooltip:r}=e,o=n?n.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]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Kd(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Jd(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Gd({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Jd(e),Kd(t),Mc.addCallbackCustomTooltip(t)},move(e,t){Jd(e),Kd(t),Mc.moveCallbackCustomTooltip(t,e)},remove(e,t){Mc.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Jd(e),Kd(r),Mc.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Kd(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const Zd=e=>e.qMax<=0,Xd=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Zd));function Qd(e){return{definition:Nd(e),softDefinition:Fd,support:{snapshot:Xd,export:Xd,exportData:!0,sharing:Xd,viewData:!0,effects:!0},effects:$d,extendMetrics:Yd,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=bd.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Gd(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>bd.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function ep(e){return{properties:{version:"1.19.2",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:Hc.STROKE.COLOR},cornerRadius:Hc.CORNER_RADIUS,innerRadius:Hc.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:[Gd(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=bd.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Gd(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>bd.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const tp=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(P).forEach((t=>{e.add(P[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(si()),o.component("pie-dividers",di),o.component("negative-indicators",mi),o}();return{qae:ep(o),ext:Qd(o),component(){const e=fc({picasso:a}),t=Fc({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=h(),a=C(),s=w(),l=x(),u=A(),c=S(),d=y(),p=E(),{qLocaleInfo:f}=I(),[m]=k((()=>t?(Lc.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);D((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),D((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,tooltipService:x}=t,q=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",q.legendScrollOffset||0),g.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))}(c,g),x.expando.set("properties",m[1]);const D=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),C=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],w={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const S=function(e,t){return t.slice.outerRadius?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:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),w),M=d?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{d.select(e)}))}:()=>{},E=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,A=t=>e.selectionService.getIsSelectionLocked(t),I=()=>gd({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:p,model:a},selectionService:e.selectionService},{picasso:r,ds:D,model:a,app:s,chart:h,onSelect:M,isLocked:A,interactions:y,constraints:p,translator:l,viewState:g,dataRowCount:S,encodings:w,colorService:v,pluginService:b,tooltipService:x,debouncer:fs,properties:m[1],logicalSize:E,flags:o});e.generateSettings=I,h.update({data:C,settings:I()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:w}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,p,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=S(),n=h(),r=O();D((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),yd({instance:e,services:t})}}};export{tp as default};
|