@nebula.js/sn-funnel-chart 1.10.2 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/properties.json +2 -2
- package/core/esm/index.js +4 -4
- package/dist/sn-funnel-chart.js +5 -5
- package/dist/sn-funnel-chart.systemjs.js +2 -2
- package/package.json +1 -1
- package/sn-funnel-chart-ext/dist/sn-funnel-chart.js +5 -5
- package/sn-funnel-chart-ext/sn-funnel-chart.qext +1 -1
- package/api-specifications/api.md +0 -395
- package/api-specifications/plugins.md +0 -90
package/core/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-funnel-chart v1.10.
|
|
2
|
+
* @nebula.js/sn-funnel-chart v1.10.4
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import e from"picasso.js";import t from"picasso-plugin-q";import{useElement as n,useSelections as r,useModel as i,useApp as o,useTranslator as a,useOptions as l,useState as s,useEffect as u,useStaleLayout as c,useTheme as d,useConstraints as f,useRect as p,usePlugins as h,useAppLayout as m,usePromise as g,onTakeSnapshot as v}from"@nebula.js/stardust";var y={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_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","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":"Выключить выбор лассо"}}};const b={fill:"steelblue",num:1},x=.9,w=150,q=(e,t,n)=>{let r=0,i=0,o=0,a={},l=0;if("labelCenter"===e)r=t.bottomLeft.x,i=t.topRight.y,o=t.bottomRight.x-t.bottomLeft.x,l=t.bottomRight.y-t.topRight.y,a={share:n.share,fill:n.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));r=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,i=t.topRight.y,o=t.width-r,l=t.bottomRight.y-t.topRight.y,a={fill:n.fill}}return{tag:e,type:"rect",x:r,y:i,width:o,height:l,data:n.data,desc:a,fill:"none"}},D=(e,t)=>{const n=(e=>{const t=(e=>{let t=0;return e.forEach(e=>{e.num>t&&(t=e.num)}),t})(e);let n=0;return e.slice().reverse().map(e=>{const r={datum:e,s:n/t,e:e.num/t};return n=e.num,r}).reverse()})(e),r=t.width*x,i=t.height*x,o=(t.width-r)/2,a=(t.height-i)/2,l=r-(r>w&&i>w?100:0),s=(i-1*(n.length-1))/n.length,u=[];return n.forEach((e,r)=>{const i=(c=e.e,d=r<n.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*d,.5-.5*d]).map(e=>Math.round(e*l+o));var c,d;const f=s*r+1*r+a,p={bottomRight:{x:i[2],y:Math.round(f+s)},bottomLeft:{x:i[3],y:Math.round(f+s)},topRight:{x:i[1],y:Math.round(f)},topLeft:{x:i[0],y:Math.round(f)},width:t.width},h=`M${p.topLeft.x},${p.topLeft.y} L${p.topRight.x},${p.topRight.y} ${p.bottomRight.x},${p.bottomRight.y} ${p.bottomLeft.x},${p.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:h,data:e.datum.data,fill:e.datum.fill});const m={share:e.e,fill:e.datum.fill,data:e.datum.data};s>12&&(p.bottomRight.x-p.bottomLeft.x>32&&u.push(q("labelCenter",p,m)),u.push(q("labelLeft",p,m)))}),u},S=(e,t,n,r)=>(r-e)/r*(t-n)+n,k=(e,t,n)=>{const r=e.filter(e=>"NaN"!==e.num&&e.num>0),i=r.length,o=n.width*x,a=n.height*x,l=Math.round((n.width-o)/2),s=Math.round((n.height-a)/2),u=o-(o>w&&a>w?100:0),c=a-1*(i-1),d=[],f=r[0].data.num.value;let p=s;return r.forEach((e,r)=>{const i=t[r]*c,o=Math.round(S(p-s,u,.2*u,a)/2),h=Math.round(S(p-s+i,u,.2*u,a)/2),m=l+Math.round(u/2),g={bottomRight:{x:m+h,y:Math.round(p+i)},bottomLeft:{x:m-h,y:Math.round(p+i)},topRight:{x:m+o,y:p},topLeft:{x:m-o,y:p},width:n.width},v=`M${g.topLeft.x},${g.topLeft.y} L${g.topRight.x},${g.topRight.y} ${g.bottomRight.x},${g.bottomRight.y} ${g.bottomLeft.x},${g.bottomLeft.y}Z`;d.push({tag:"section",type:"path",d:v,data:e.data,fill:e.fill});const y={share:e.data.num.value/f,fill:e.fill,data:e.data};i>2&&(g.bottomRight.x-g.bottomLeft.x>32&&d.push(q("labelCenter",g,y)),d.push(q("labelLeft",g,y))),p+=i+1}),d},M=(e,t,n)=>{const r=e.filter(e=>"NaN"!==e.num&&e.num>0);if(r&&r.length>0)switch(t){case"WIDTH":default:return D(r,n);case"ORDER":return k(r,r.map(()=>1/r.length),n);case"HEIGHT":return k(r,(e=>{const t=e.reduce((e,t)=>e+t.data.num.value,0);return e.map(e=>e.data.num.value/t)})(r),n);case"AREA":return k(r,((e,t,n)=>{const r=e.reduce((e,t)=>e+t.data.num.value,0),i=t.width*x,o=t.height*x,a=i*n,l=o*(i+a)/2,s=(i-a)/2/o,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const n=e[t].data.num.value/r,i=2*s*c+a,d=-i/(2*s)+Math.sqrt(i*i/(4*s*s)+n*l/s);u[t]=d/o,c+=d}return u})(r,n,.2),n)}return[]};var C={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...b,...this.style.item},settings:this.settings.settings});return M(t.items,this.settings.settings.mode,this.rect)}};const I={version:"1.10.2",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",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},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t,n,r,i,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,i)}function E(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){O(o,r,i,a,l,"next",e)}function l(e){O(o,r,i,a,l,"throw",e)}a(void 0)})}}function R(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){R(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function z(){
|
|
7
|
+
import e from"picasso.js";import t from"picasso-plugin-q";import{useElement as n,useSelections as r,useModel as i,useApp as o,useTranslator as a,useOptions as l,useState as s,useEffect as u,useStaleLayout as c,useTheme as d,useConstraints as f,useRect as p,usePlugins as h,useAppLayout as m,usePromise as g,onTakeSnapshot as v}from"@nebula.js/stardust";var y={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","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.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};const b={fill:"steelblue",num:1},x=.9,w=150,q=(e,t,n)=>{let r=0,i=0,o=0,a={},l=0;if("labelCenter"===e)r=t.bottomLeft.x,i=t.topRight.y,o=t.bottomRight.x-t.bottomLeft.x,l=t.bottomRight.y-t.topRight.y,a={share:n.share,fill:n.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));r=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,i=t.topRight.y,o=t.width-r,l=t.bottomRight.y-t.topRight.y,a={fill:n.fill}}return{tag:e,type:"rect",x:r,y:i,width:o,height:l,data:n.data,desc:a,fill:"none"}},D=(e,t)=>{const n=(e=>{const t=(e=>{let t=0;return e.forEach(e=>{e.num>t&&(t=e.num)}),t})(e);let n=0;return e.slice().reverse().map(e=>{const r={datum:e,s:n/t,e:e.num/t};return n=e.num,r}).reverse()})(e),r=t.width*x,i=t.height*x,o=(t.width-r)/2,a=(t.height-i)/2,l=r-(r>w&&i>w?100:0),s=(i-1*(n.length-1))/n.length,u=[];return n.forEach((e,r)=>{const i=(c=e.e,d=r<n.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*d,.5-.5*d]).map(e=>Math.round(e*l+o));var c,d;const f=s*r+1*r+a,p={bottomRight:{x:i[2],y:Math.round(f+s)},bottomLeft:{x:i[3],y:Math.round(f+s)},topRight:{x:i[1],y:Math.round(f)},topLeft:{x:i[0],y:Math.round(f)},width:t.width},h=`M${p.topLeft.x},${p.topLeft.y} L${p.topRight.x},${p.topRight.y} ${p.bottomRight.x},${p.bottomRight.y} ${p.bottomLeft.x},${p.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:h,data:e.datum.data,fill:e.datum.fill});const m={share:e.e,fill:e.datum.fill,data:e.datum.data};s>12&&(p.bottomRight.x-p.bottomLeft.x>32&&u.push(q("labelCenter",p,m)),u.push(q("labelLeft",p,m)))}),u},S=(e,t,n,r)=>(r-e)/r*(t-n)+n,k=(e,t,n)=>{const r=e.filter(e=>"NaN"!==e.num&&e.num>0),i=r.length,o=n.width*x,a=n.height*x,l=Math.round((n.width-o)/2),s=Math.round((n.height-a)/2),u=o-(o>w&&a>w?100:0),c=a-1*(i-1),d=[],f=r[0].data.num.value;let p=s;return r.forEach((e,r)=>{const i=t[r]*c,o=Math.round(S(p-s,u,.2*u,a)/2),h=Math.round(S(p-s+i,u,.2*u,a)/2),m=l+Math.round(u/2),g={bottomRight:{x:m+h,y:Math.round(p+i)},bottomLeft:{x:m-h,y:Math.round(p+i)},topRight:{x:m+o,y:p},topLeft:{x:m-o,y:p},width:n.width},v=`M${g.topLeft.x},${g.topLeft.y} L${g.topRight.x},${g.topRight.y} ${g.bottomRight.x},${g.bottomRight.y} ${g.bottomLeft.x},${g.bottomLeft.y}Z`;d.push({tag:"section",type:"path",d:v,data:e.data,fill:e.fill});const y={share:e.data.num.value/f,fill:e.fill,data:e.data};i>2&&(g.bottomRight.x-g.bottomLeft.x>32&&d.push(q("labelCenter",g,y)),d.push(q("labelLeft",g,y))),p+=i+1}),d},C=(e,t,n)=>{const r=e.filter(e=>"NaN"!==e.num&&e.num>0);if(r&&r.length>0)switch(t){case"WIDTH":default:return D(r,n);case"ORDER":return k(r,r.map(()=>1/r.length),n);case"HEIGHT":return k(r,(e=>{const t=e.reduce((e,t)=>e+t.data.num.value,0);return e.map(e=>e.data.num.value/t)})(r),n);case"AREA":return k(r,((e,t,n)=>{const r=e.reduce((e,t)=>e+t.data.num.value,0),i=t.width*x,o=t.height*x,a=i*n,l=o*(i+a)/2,s=(i-a)/2/o,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const n=e[t].data.num.value/r,i=2*s*c+a,d=-i/(2*s)+Math.sqrt(i*i/(4*s*s)+n*l/s);u[t]=d/o,c+=d}return u})(r,n,.2),n)}return[]};var M={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...b,...this.style.item},settings:this.settings.settings});return C(t.items,this.settings.settings.mode,this.rect)}};const I={version:"1.10.4",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",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},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t,n,r,i,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,i)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){E(o,r,i,a,l,"next",e)}function l(e){E(o,r,i,a,l,"throw",e)}a(void 0)})}}function R(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach(function(t){R(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function P(){
|
|
8
8
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
9
|
-
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return j(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,l=0,s=e,f.n=n,a}};function p(n,r){for(l=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,h=o[2];n>3?(i=h===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(l=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,h){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),p(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(j(t={},r,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,j(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,j(d,"constructor",u),j(u,"constructor",s),s.displayName="GeneratorFunction",j(u,i,"GeneratorFunction"),j(d),j(d,i,"Generator"),j(d,r,function(){return this}),j(d,"toString",function(){return"[object Generator]"}),(z=function(){return{w:o,m:f}})()}function j(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}j=function(e,t,n,r){function o(t,n){j(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},j(e,t,n,r)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||$(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 F(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function $(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.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)?N(e,t):void 0}}var H,U="top",V="top-right",B="right",W="bottom-right",K="bottom",J="bottom-left",Y="left",G="top-left";R(R(R(R(R(R(R(R(R(R(H={},"equal-equal",[U,K]),"equal-higher",[K,W]),"equal-lower",[U,V]),"equal-void",[U,K]),"higher-equal",[Y,J,U,V]),"higher-higher-acute",[K,J,Y,V]),"higher-higher-obtuse",[K,U]),"higher-lower-negative",[U,V,B]),"higher-lower-positive",[K,J,Y]),"higher-void",[U]),R(R(R(R(R(R(R(R(R(R(H,"lower-equal",[U]),"lower-higher-negative",[U,G]),"lower-higher-positive",[W]),"lower-lower-acute",[U,G,Y,V,B]),"lower-lower-obtuse",[U,K]),"lower-void",[U]),"void-equal",[U]),"void-higher",[U,K]),"void-lower",[U,K,Y]),"void-void",[U]),R(H,"unclassified",[U,K,B,Y,V,W,J,G]);var Z=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],X=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var Q=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function ee(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,F(new Set([r].concat(F(a.map(function(e){return e.split(",").map(function(e){return e.trim()}).map(function(e){return e.replace(/\s+/g," ").trim()}).filter(Boolean).join(", ")})))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(F(o.map(function(e){return Q(e)})),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],F(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?X:Z}(i).map(function(e){return Q(e)})))}function te(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return ee({theme:t,translator:n,defaultValue:a(),flags:o})}}}var ne,re,ie=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],oe=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function ae(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,F(new Set([n].concat(F(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(F(r.map(function(e){return oe(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],F(ie.map(function(e){return oe(e)})))}({theme:t,translator:n,defaultValue:o()})}}}function le(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:te({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:ae({theme:t,translator:n,id:r,path:i})}}var se,ue=function(){if(re)return ne;re=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return ne=function e(){var t,n,r,s,u,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},ne}(),ce=(se=ue)&&se.__esModule&&Object.prototype.hasOwnProperty.call(se,"default")?se.default:se;function de(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.value%i.length]})},valueAccessor:e.value}}function fe(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.row.value%i.length]})},valueAccessor:e.value}}function pe(e,t,n,r,i){var o,a,l=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return l(r,u)}return{}}function he(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function me(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 ge(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ve(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ye(){}var be=1/.7,xe="\\s*([+-]?\\d+)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Se=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),ke=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),Me=new RegExp(`^rgba\\(${xe},${xe},${xe},${we}\\)$`),Ce=new RegExp(`^rgba\\(${qe},${qe},${qe},${we}\\)$`),Ie=new RegExp(`^hsl\\(${we},${qe},${qe}\\)$`),Ne=new RegExp(`^hsla\\(${we},${qe},${qe},${we}\\)$`),Oe={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 Re(){return this.rgb().formatRgb()}function Pe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=De.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Te(t):3===n?new Ae(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Le(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Le(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Se.exec(e))?new Ae(t[1],t[2],t[3],1):(t=ke.exec(e))?new Ae(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Me.exec(e))?Le(t[1],t[2],t[3],t[4]):(t=Ce.exec(e))?Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ie.exec(e))?Ve(t[1],t[2]/100,t[3]/100,1):(t=Ne.exec(e))?Ve(t[1],t[2]/100,t[3]/100,t[4]):Oe.hasOwnProperty(e)?Te(Oe[e]):"transparent"===e?new Ae(NaN,NaN,NaN,0):null}function Te(e){return new Ae(e>>16&255,e>>8&255,255&e,1)}function Le(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ae(e,t,n,r)}function ze(e){return e instanceof ye||(e=Pe(e)),e?new Ae((e=e.rgb()).r,e.g,e.b,e.opacity):new Ae}function je(e,t,n,r){return 1===arguments.length?ze(e):new Ae(e,t,n,null==r?1:r)}function Ae(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Fe(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}`}function _e(){const e=$e(this.opacity);return`${1===e?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${1===e?")":`, ${e})`}`}function $e(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function He(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ue(e){return((e=He(e))<16?"0":"")+e.toString(16)}function Ve(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new We(e,t,n,r)}function Be(e){if(e instanceof We)return new We(e.h,e.s,e.l,e.opacity);if(e instanceof ye||(e=Pe(e)),!e)return new We;if(e instanceof We)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new We(a,l,s,e.opacity)}function We(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ke(e){return(e=(e||0)%360)<0?e+360:e}function Je(e){return Math.max(0,Math.min(1,e||0))}function Ye(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ge(ye,Pe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Be(this).formatHsl()},formatRgb:Re,toString:Re}),ge(Ae,je,ve(ye,{brighter(e){return e=null==e?be:Math.pow(be,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(He(this.r),He(this.g),He(this.b),$e(this.opacity))},displayable(){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:Fe,formatHex:Fe,formatHex8:function(){return`#${Ue(this.r)}${Ue(this.g)}${Ue(this.b)}${Ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:_e,toString:_e})),ge(We,function(e,t,n,r){return 1===arguments.length?Be(e):new We(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return e=null==e?be:Math.pow(be,e),new We(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new We(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ae(Ye(e>=240?e-240:e+120,i,r),Ye(e,i,r),Ye(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new We(Ke(this.h),Je(this.s),Je(this.l),$e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$e(this.opacity);return`${1===e?"hsl(":"hsla("}${Ke(this.h)}, ${100*Je(this.s)}%, ${100*Je(this.l)}%${1===e?")":`, ${e})`}`}}));const Ge=Math.PI/180,Ze=180/Math.PI,Xe=4/29,Qe=6/29,et=3*Qe*Qe;function tt(e){if(e instanceof nt)return new nt(e.l,e.a,e.b,e.opacity);if(e instanceof lt)return st(e);e instanceof Ae||(e=ze(e));var t,n,r=at(e.r),i=at(e.g),o=at(e.b),a=rt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=rt((.4360747*r+.3850649*i+.1430804*o)/.96422),n=rt((.0139322*r+.0971045*i+.7141733*o)/.82521)),new nt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function nt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function rt(e){return e>.008856451679035631?Math.pow(e,1/3):e/et+Xe}function it(e){return e>Qe?e*e*e:et*(e-Xe)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function at(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function st(e){if(isNaN(e.h))return new nt(e.l,0,0,e.opacity);var t=e.h*Ge;return new nt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ge(nt,function(e,t,n,r){return 1===arguments.length?tt(e):new nt(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return new nt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new nt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Ae(ot(3.1338561*(t=.96422*it(t))-1.6168667*(e=1*it(e))-.4906146*(n=.82521*it(n))),ot(-.9787684*t+1.9161415*e+.033454*n),ot(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ge(lt,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof lt)return new lt(e.h,e.c,e.l,e.opacity);if(e instanceof nt||(e=tt(e)),0===e.a&&0===e.b)return new lt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ze;return new lt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new lt(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return new lt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new lt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return st(this).rgb()}}));var ut=e=>()=>e;function ct(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ut(isNaN(e)?t:e)}var dt=function e(t){var n=function(e){return 1==(e=+e)?ct: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):ut(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=je(e)).r,(t=je(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=ct(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),ft=/^class(-pyramid)?/,pt=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,l=o,s=t.limits,u={},c="percent"===t.limitType?s.map(function(e){return i+(o-i)*e}):s,d=t.colors.map(function(t){return e.resolveUIColor(t)});if(i=Math.min.apply(Math,[i].concat(F(c))),o=Math.max.apply(Math,[o].concat(F(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var l=0;l<r.length;l++)if(t<r[l]){o.push(i[l]);break}}for(var s=0;s<r.length;s++)t<r[s]&&r[s]<n&&(a.push(r[s]),o.push(i[s]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:l,range:d,limits:"percent"===t.limitType?c:s}));else if(t.breakTypes){var f=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var p=0;p<c.length;p+=1)if(f[p]){var h=d[p],m=d[p+1],g=dt(h,m)(.5);u.range.push(g),u.domain.push(c[p]),p<c.length-1&&f[p+1]&&(u.range.push(d[p+1]),u.domain.push((c[p]+c[p+1])/2))}else u.range.push(d[p]),u.range.push(d[p+1]),u.domain.push(c[p]),u.domain.push(c[p]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function ht(e,t,n,r,i){var o,a,l,s=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),l=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(l)||(u[l]?u[l]+=1:u[l]=1);for(o=0;o<u.length;o+=1)u[o]&&(s+=1);return s<=r||s>=i?Math.max(s,r):ht(e,t,n,r+1,i)}var mt=function(e,t,n,r){var i,o,a=t.theme,l=t.hc,s=r.f,u={mode:"field",fieldType:"measure",field:s?s.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(s){if(Number.isNaN(+s.min())||Number.isNaN(+s.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:s.key()},exclude:{fields:l.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return Math.min.apply(Math,F(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(s&&!d)u.min=s.min(),u.max=s.max();else if(s){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,F(c)),u.max=Math.max.apply(Math,F(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter(function(e){return e.key===n.input.measureScheme})[0];u.type=f&&ft.test(f.type)?"categorical":"continuous","categorical"===u.type&&(o=f.colors.some(function(e){return Array.isArray(e)})?Math.max.apply(Math,F(f.colors.map(function(e){return e?e.length:0}))):f.colors.length)}if("categorical"===u.type){for(var p=d?ht(u.max,u.min,c,1,o):o,h=(u.max-u.min)/p,m=[],g=0;g<p+1;g+=1)m.push(u.min+h*g);u.domain=m,u.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function gt(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 vt(e){e.measureOverrides.every(function(e){return!e})&&(e.measureOverrides=null)}function yt(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var l=n.indexOf(o);-1===l?(n.push(o),r.push(a.primary)):r[l]=a.primary,e[o]=null}else if(a){i.push(o);var s=n.indexOf(o);-1!==s&&(n.splice(s,1),r.splice(s,1))}}return{domain:n,range:r,exclude:i}}function bt(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?gt:o,l=n.input.byMeasureDef||{activeMeasureIndex:0},s=a(n,l),u=mt(0,{theme:r,hc:i},n,{f:s});if(u.invalid)return u;"expression"===l.type&&(l.activeMeasureIndex<0||void 0===l.activeMeasureIndex)&&(u.label=l.label,s&&"color.altLabel"===s.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&s&&(u.label=s.title());var c=l.activeMeasureIndex>=0?s:null;if(!c&&s&&void 0!==s.raw().matchMeasure&&s.raw().matchMeasure>-1&&(c=n.pic.fields().filter(function(e){return"measure"===e.type()})[s.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===l.type)if(c){var d=c.raw().coloring;d&&d.gradient&&ce(u,pt(e,d.gradient,u,c))}else u.auxiliary=l;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?he:i,a=r.getCByField,l=void 0===a?me:a,s=r.getPersistence,u=void 0===s?pe:s,c=o(t,n),d=l(n,c),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var h={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(h.label=c.label,"color.altLabel"===f.labelExpRef&&(h.label=n.input.altLabel)),!h.label&&d&&(h.label=d.title()),n.input.dimensionScheme&&(h.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(h.auxiliary=c),ce(h,u(t,n,c,d,{byRow:fe,byElemNo:de})),h}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.pic.field(function(e){return"colorByExpression"===e.raw().id});if(!l||!l.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(l.raw().qMin)&&Number.isFinite(l.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:l?l.key():void 0,type:"color"};var s=mt(0,{hc:i,theme:o},n,{f:l});return s.invalid||(s.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),s}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(l="measure"),"measure"===l){var s=[],u=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){s.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(r.primary):u.push(i)}});var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:s.length?{domain:s,range:u}:void 0}}if("dimension"===l){var f=[],p=[];return i.qDimensionInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}}),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var h=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(h=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(h=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:h}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map(function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var l=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===l?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),T(T({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===l?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field(function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id}),o=i;return T(T({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})}),function(e,t){var n,r,i,o=t.translator;if(vt(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=yt(e.measureOverrides,e.explicit),vt(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every(function(e){return"constant"===(null==e?void 0:e.mode)})){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=yt(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every(function(e){return e})?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var xt=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},wt=function(e){throw e.isHandled=!0,e};function qt(e){return function(t){return"object"===_(t.datum[e])?t.datum[e].value:void 0}}function Dt(e){return"object"===_(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function St(e){return-3===e.datum.value}var kt={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Mt={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function Ct(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:kt.COLOR,fontSize:kt.FONT_SIZE,fontFamily:kt.FONT_FAMILY},label:{color:Mt.COLOR,fontSize:Mt.FONT_SIZE,fontFamily:Mt.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,l=o.label,s=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=s(null==a?void 0:a.color,"legend.title","color",kt.COLOR),i.title.fontSize=s(null==a?void 0:a.fontSize,"legend.title","fontSize",kt.FONT_SIZE),i.title.fontFamily=s(null==a?void 0:a.fontFamily,"legend.title","fontFamily",kt.FONT_FAMILY),i.label.color=s(null==l?void 0:l.color,"legend.label","color",Mt.COLOR),i.label.fontSize=s(null==l?void 0:l.fontSize,"legend.label","fontSize",Mt.FONT_SIZE),i.label.fontFamily=s(null==l?void 0:l.fontFamily,"legend.label","fontFamily",Mt.FONT_FAMILY),i}var It=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Nt=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 Ot(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,l=t.coloring,s=t.theme,u=t.hc,c=Ct({theme:s,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:It(a,i,o)},show:"function"==typeof a.show?function(){return Nt(a,u,l)}:Nt(a,u,l),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:l.label||"",fill:c.title.color,fontSize:c.title.fontSize,fontFamily:c.title.fontFamily}}}}function Et(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ot(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,l=e.styleOverrides,s=e.viewState,u=e.rtl,c=e.settings,d=e.style,f=t.scaleKey,p=t.theme,h=t.scales,m=Ct({theme:p,key:a,styleOverrides:l}),g=r.layout.dock,v="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},y={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"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return ce(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in h?b:f,settings:{layout:{scrollOffset:function(){return s?s.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:u?"rtl":"ltr",horizontal:20},item:{show:i,label:T({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},v)},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:y[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:c,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,l=e.settings,s=e.style,u=t.scaleKey,c=t.theme,d="".concat(u,"Range"),f=Ot(e,t);if(!f.show)return!1;var p=Ct({theme:c,key:i,styleOverrides:o}),h=f.layout.dock,m="right"===h||"left"===h,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),ce(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:u,major:d,length:1,tick:{fill:p.label.color,fontSize:p.label.fontSize,fontFamily:p.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:l,style:s})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return e.key==="".concat(t,"-cat")}))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some(function(e){return e.key==="".concat(n,"-cat")})}},events:R(R(R({},"".concat(t,"start"),function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))}),"".concat(t,"move"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)}),"".concat(t,"end"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})}}(e,n))),{interactions:i,components:r}}function Rt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=T({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ce(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ce(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var l=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(l=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[l]&&t.hc.qDimensionInfo[l].coloring&&t.hc.qDimensionInfo[l].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[l].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every(function(e){return!e||!e.on})&&(n.input=ce(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach(function(e){r.push({key:"ui",colors:e.colors})}),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch(function(){});if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch(function(){}):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch(function(){}):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then(function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return pt(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},l=r[0],s=r[1]?r[1].colorMap:null;if(l){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:l,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return s?function(e,t,n,r){var i=r.external,o=r.field,a=T({},e);ce(a,de(o,o.raw().qCardinal));var l=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},l&&!t.pal&&(a.palettes.categorical=l.key,ce(a,de(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(l&&(a.palettes={categorical:l.key}),ce(a,de(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var l=0;l<i.items.length;l++){var s=i.items[l],u=(s.text||s).label;r[u]&&-1===a.indexOf(s.value)&&(a.push(s.value),o.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,s,i,{external:t,field:n.pic.field(e.field)}):a}return{}})):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter(function(e){return"ui"===e.key})[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=T(T({},e),r.getDataColorSpecials())),n.settings=ce(e,bt(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap(function(e,t){return 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()}(e,{layout:t.layout,app:t.app})}).getMeasure(function(e,t){return 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()}(e,{layout:t.layout,app:t.app})}).getAttributeDimension(function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(wt):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})});return n.getSnapshotData=xt,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=T({},i),r={},!n.key)throw new Error("Missing key");t.set(T(T({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then(function(e){return r.auxiliarySettings=e||{},r.settings=T(T({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings})},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then(function(e){return t.getSnapshotData(n,e)})},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter(function(e){return e.key===o})[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var l=n.palettes.metric||t.measureScheme,s=r.getDataColorScales().filter(function(e){return e.key===l})[0]||r.getDataColorScales()[0];if(s){var u=s.colors[0]?s.colors:[[]].concat(F(s.colors.slice(1)));u=Array.isArray(u[0])?u.map(function(e){return e.slice().reverse()}):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,l={},s=i;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(F((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(F((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var h={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}};l[s]=h,c&&(l["".concat(s,"Legend")]=T(T({},h),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||h.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};l[s]=ce({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===l[s].type&&(l["".concat(s,"Range")]=ce({},m,{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"};l[s]=g}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map(function(e,t){return t}).filter(function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))}),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=v}}return l}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=qt(r),o=qt("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,l=e.mode,s=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return St(e)||o(e)?u:s}:n[t]?function(e){return St(e)?u:Dt(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?s:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===l?function(e){return St(e)||o(e)?u:Dt(e)?s:c}:"color"===d?function(e){return St(e)||o(e)?u:Dt(e)?s:i(e)||u}:null},l=a(t,r);if(t.measureOverrides){var s=qt("".concat(r,"MeasureIdx")),u=t.measureOverrides.map(function(e){return e&&a(e)});return function(e){var t=s(e);return u[t]?u[t](e):l(e)}}return l}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,l=e.addMeasureIx,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&Pe(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=s);var d=R({},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)}}),l&&(d["".concat(u,"MeasureIdx")]=s),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,l=e.rtl,s=e.styleReference,u=void 0===s?"object.legend":s,c=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,p=e.style,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Et({eventName:t,key:r,rtl:l,viewState:o,chart:a,styleReference:u,styleOverrides:c,settings:f,style:void 0===p?{}:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},h)}};return o}var Pt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Tt(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Pt),o=r.some(Pt),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var Lt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function zt(e){var t,n=e.qHyperCube.qDimensionInfo.some(Lt),r=e.qHyperCube.qMeasureInfo.some(Lt),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var jt=function(){};function At(e){var t,n,r,i,o=e.picasso,a=e.model,l=e.app,s=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,f=void 0===d?jt:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,v=h.localeInfo,y=h.key,b=h.theme,x=void 0===b?void 0:b,w=h.auto,q=void 0===w?void 0:w,D=h.definitionPath,S=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),k={theme:x,key:y,localeInfo:v,layout:S,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:T(T({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:S?Tt(S):void 0})},M=Rt({picasso:o,model:a,app:l,translator:s,auto:q});!1!==q&&M.auto(function(e){return q?q({layout:e,defaultAuto:zt}):zt(e)});var C=!1,I={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(D)},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 C},custom:T({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:Tt}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T(T(T({},e),t),{},{colorProps:T(T({},e.colorProps),t.colorProps||{})})}(k,t);return M.config(n),M.getAuxiliarySettings(D).then(function(){C=!0})}};return I}var Ft="center",_t="bottom";function $t(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}[{key:"NoDataExist",alignment:Ft,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Ft,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Ft,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Ft},{key:"DataRangeIncludingZero",alignment:_t},{key:"LimitedData",alignment:_t},{key:"NegativeOrZeroValues",alignment:_t}].reduce(function(e,t){return e[t.key]=t,e},{});var Ht=["__proto__","constructor"];function Ut(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Ht.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var l=r[a];void 0===o[l]&&(o[l]=Number.isNaN(+r[a+1])?{}:[]),o=o[l]}void 0!==n?o[i]=n:delete o[i]}}}function Vt(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach(function(e){var n=-1;t.some(function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n}),n>-1?t[n]=e:t.push(e)}),t):n}function Bt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach(function(t){Bt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Jt=Object.prototype.hasOwnProperty,Yt=Object.prototype.toString,Gt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Xt=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Yt.call(e)},Qt=function(e){if(!e||"[object Object]"!==Yt.call(e))return!1;var t,n=Jt.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Jt.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Jt.call(e,t)},en=function(e,t){Gt&&"__proto__"===t.name?Gt(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},tn=function(e,t){if("__proto__"===t){if(!Jt.call(e,t))return;if(Zt)return Zt(e,t).value}return e[t]},nn=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=tn(l,n),l!==(i=tn(t,n))&&(c&&i&&(Qt(i)||(o=Xt(i)))?(o?(o=!1,a=r&&Xt(r)?r:[]):a=r&&Qt(r)?r:{},en(l,{name:n,newValue:e(c,a,i)})):void 0!==i&&en(l,{name:n,newValue:i}));return l};function rn(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),l=-1,s=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(s=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),l=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==s||-1!==l){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:s>=0?e=>e[a].qAttrDims.qValues[s]:l>=0?e=>e[a].qAttrExps.qValues[l]:e=>e[a]}function on(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function an(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:l,sourceKey:s,target:u,targetProp:c,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=rn(i.field,o,{cache:t},d);if(-1===e)return;f=nn({qRow:a},e(l))}u[c]=on(i,f,{key:s})}function ln(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),l=t.key(),s="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),d=Object.keys(u),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=rn(s,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let v=0;v<a.qDataPages[t].qMatrix.length;v++){const y=a.qDataPages[t].qArea.qTop+v,b=nn({qRow:y},o(a.qDataPages[t].qMatrix[v])),x=on(c,b,{key:l});if(!c.filter||c.filter(b)){for(let e=0;e<d.length;e++){const r=u[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)an({cache:n,f:s,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:y,row:a.qDataPages[t].qMatrix[v],sourceKey:l,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const v=f?r.collect(m,{main:c,propsArr:d,props:u}):g;o=[...o,...v]}return o}function sn(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 un(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dn)):void 0===t&&(t=cn);for(var n,r,i,o,a,l=new hn(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new hn(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(pn)}function cn(e){return e.children}function dn(e){return Array.isArray(e)?e[1]:null}function fn(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pn(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function hn(e){this.data=e,this.depth=this.height=0,this.parent=null}function mn(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}hn.prototype=un.prototype={constructor:hn,count:function(){return this.eachAfter(sn)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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 un(this).eachBefore(fn)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var gn={depth:-1},vn={},yn={};function bn(e){return e.id}function xn(e){return e.parentId}function wn(e){let t=e.length;if(t<2)return"";for(;--t>1&&!qn(e,t););return e.slice(0,t)}function qn(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Dn(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Dn(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Dn(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Sn(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Sn(e[i].children,t-1,n)]);return r}function kn(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Sn(e.children,r-1,n)}return!1}const Mn=/^qDimensionInfo(?:\/(\d+))?/,Cn=/^\/?qMeasureInfo\/(\d+)/,In=/\/qAttrExprInfo\/(\d+)/,Nn=/\/qAttrDimInfo\/(\d+)/;function On(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function En(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,l=-1,s=-1,u=-1,c=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=On(n);return Mn.test(d)&&(i=!0,o=+Mn.exec(d)[1],d=r.replace(Mn,"")),Cn.test(d)&&("K"===n.qMode?u=+Cn.exec(d)[1]:f&&-1!==f.indexOf(-1)?(u=+Cn.exec(d)[1],c=0):c=+Cn.exec(d)[1],d=d.replace(Cn,"")),d&&(Nn.exec(d)?l=+Nn.exec(d)[1]:In.exec(d)&&(a=+In.exec(d)[1])),s=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:s+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:l,attrIdx:a}}function Rn(e,t){let n,r,i=kn(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function Pn(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Tn(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields||[l];let u,c;l.fields&&(u=[],c=[]);for(let n=0;n<s.length;n++){const d=s[n];let f,p,h,m,g,v;if("primitive"===d.type?(h=d.value,v=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(v=g.map(p),p=null),h=d.reduce?d.reduce(h):h,v=d.reduceLabel?d.reduceLabel(v,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),v=h)):(h=i,v=i)),l.fields){const e=f?f(h):h;u.push(e),c.push(p&&null!=v?p(v):null!=v?v:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(v):null!=v?v:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(c,r):c})}}const Ln=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Dn(r,e);return o&&o[0]?(t.tree=un(o[0],n.children||(e=>e[i])),t.tree):null};function zn(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",s=!1;for(let e=0;e<i.length;e++){var l;const t=n[i[e]],o="".concat(r,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);a[o]||(a[o]=Kt({__id:o,__parent:r,qValues:[]},t),s=!0),r=o}if(s)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const s=Object.keys(a).map(e=>a[e]);return function(){var e,t=bn,n=xn;function r(r){var i,o,a,l,s,u,c,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){let t=(e=`${e}`).length;return qn(e,t-1)&&!qn(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(wn),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(wn(e)),f.push(yn));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],u=f[a]=new hn(o),null!=(c=p(o,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?vn:u)),null!=(c=h(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=f[a]).parent){if(!(s=m.get(c)))throw new Error("missing: "+c);if(s===vn)throw new Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw new Error("multiple roots");l=u}if(!l)throw new Error("no root");if(null!=e){for(;l.data===yn&&1===l.children.length;)l=l.children[0],--i;for(let e=f.length-1;e>=0&&(u=f[e]).data===yn;--e)u.data=null}if(l.parent=gn,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(pn),l.parent=null,i>0)throw new Error("cycle");return l}return r.id=function(e){return arguments.length?(t=mn(e),r):t},r.parentId=function(e){return arguments.length?(n=mn(e),r):n},r.path=function(t){return arguments.length?(e=mn(t),r):e},r}().id(e=>e.__id).parentId(e=>e.__parent)(s)}const jn=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],l=i.fields?i.fields:[i];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=Rn(o,En(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function An(){let 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;const i=t.raw(),o=t.key(),a="S"===i.qMode?zn(t):Ln(i,n,e);if(!a)return null;const l=a.height,s=[];for(let o=0;o<=l;o++){let a=null;if(o>0)if("S"===i.qMode){let e=On(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:l,main:u}=r.normalizeConfig(Kt(Kt({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(l);s[o]={propsArr:c,props:l,main:u};const d=a?En(a,{cube:i}):{fieldDepth:0};jn({propsArr:c,props:l,cube:i,cache:n,itemDepthObject:d,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=s[c[e].depth].propsArr,n=s[c[e].depth].props,r=s[c[e].depth].main,i=u[e],a=i.data,l=Pn(r,a,{key:o});Tn({propsArr:t,props:n,item:i,itemData:a,ret:l,sourceKey:o}),c[e].data=l}return a}function Fn(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const l=t.raw(),s=t.key();if(!Ln(l,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(c),p=En(u,{cube:l}),{nodeFn:h,attrFn:m,valueFn:g}=Rn({fieldDepth:0},p);jn({propsArr:f,props:c,cube:l,cache:n,itemDepthObject:p,f:u});const v=!!i[a].trackBy,y=typeof i[a].trackBy,b={},x=[],w=h(n.tree),q=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=Pn(d,n,{key:s});Tn({propsArr:f,props:c,item:t,itemData:n,ret:o,sourceKey:s}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:y}),q.push(o)}const D=v?r.collect(x,{main:d,propsArr:f,props:c}):q;o=[...o,...D]}return o}var _n,$n,Hn=(_n=function(e){
|
|
9
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return j(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,l=0,s=e,f.n=n,a}};function p(n,r){for(l=n,s=r,t=0;!d&&u&&!i&&t<c.length;t++){var i,o=c[t],p=f.p,h=o[2];n>3?(i=h===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(l=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,h){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,h),l=c,s=h;(t=l<2?e:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),p(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),t=o[i]){if(!(t=t.call(o,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(t){o=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(j(t={},r,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,j(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,j(d,"constructor",u),j(u,"constructor",s),s.displayName="GeneratorFunction",j(u,i,"GeneratorFunction"),j(d),j(d,i,"Generator"),j(d,r,function(){return this}),j(d,"toString",function(){return"[object Generator]"}),(P=function(){return{w:o,m:f}})()}function j(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}j=function(e,t,n,r){function o(t,n){j(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},j(e,t,n,r)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||$(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 F(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function $(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.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)?N(e,t):void 0}}var H,B="top",U="top-right",V="right",W="bottom-right",K="bottom",J="bottom-left",Y="left",G="top-left";R(R(R(R(R(R(R(R(R(R(H={},"equal-equal",[B,K]),"equal-higher",[K,W]),"equal-lower",[B,U]),"equal-void",[B,K]),"higher-equal",[Y,J,B,U]),"higher-higher-acute",[K,J,Y,U]),"higher-higher-obtuse",[K,B]),"higher-lower-negative",[B,U,V]),"higher-lower-positive",[K,J,Y]),"higher-void",[B]),R(R(R(R(R(R(R(R(R(R(H,"lower-equal",[B]),"lower-higher-negative",[B,G]),"lower-higher-positive",[W]),"lower-lower-acute",[B,G,Y,U,V]),"lower-lower-obtuse",[B,K]),"lower-void",[B]),"void-equal",[B]),"void-higher",[B,K]),"void-lower",[B,K,Y]),"void-void",[B]),R(H,"unclassified",[B,K,V,Y,U,W,J,G]);var Z=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],X=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var Q=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function ee(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,F(new Set([r].concat(F(a.map(function(e){return e.split(",").map(function(e){return e.trim()}).map(function(e){return e.replace(/\s+/g," ").trim()}).filter(Boolean).join(", ")})))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(F(o.map(function(e){return Q(e)})),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],F(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?X:Z}(i).map(function(e){return Q(e)})))}function te(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return ee({theme:t,translator:n,defaultValue:a(),flags:o})}}}var ne,re,ie=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],oe=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function ae(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,F(new Set([n].concat(F(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(F(r.map(function(e){return oe(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],F(ie.map(function(e){return oe(e)})))}({theme:t,translator:n,defaultValue:o()})}}}function le(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:te({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:ae({theme:t,translator:n,id:r,path:i})}}var se,ue=function(){if(re)return ne;re=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return ne=function e(){var t,n,r,s,u,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},ne}(),ce=(se=ue)&&se.__esModule&&Object.prototype.hasOwnProperty.call(se,"default")?se.default:se;function de(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.value%i.length]})},valueAccessor:e.value}}function fe(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.row.value%i.length]})},valueAccessor:e.value}}function pe(e,t,n,r,i){var o,a,l=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return l(r,u)}return{}}function he(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function me(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 ge(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ve(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ye(){}var be=1/.7,xe="\\s*([+-]?\\d+)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Se=new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`),ke=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),Ce=new RegExp(`^rgba\\(${xe},${xe},${xe},${we}\\)$`),Me=new RegExp(`^rgba\\(${qe},${qe},${qe},${we}\\)$`),Ie=new RegExp(`^hsl\\(${we},${qe},${qe}\\)$`),Ne=new RegExp(`^hsla\\(${we},${qe},${qe},${we}\\)$`),Ee={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 Oe(){return this.rgb().formatHex()}function Re(){return this.rgb().formatRgb()}function Le(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=De.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Te(t):3===n?new Ae(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ze(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ze(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=Se.exec(e))?new Ae(t[1],t[2],t[3],1):(t=ke.exec(e))?new Ae(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ce.exec(e))?ze(t[1],t[2],t[3],t[4]):(t=Me.exec(e))?ze(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ie.exec(e))?Ue(t[1],t[2]/100,t[3]/100,1):(t=Ne.exec(e))?Ue(t[1],t[2]/100,t[3]/100,t[4]):Ee.hasOwnProperty(e)?Te(Ee[e]):"transparent"===e?new Ae(NaN,NaN,NaN,0):null}function Te(e){return new Ae(e>>16&255,e>>8&255,255&e,1)}function ze(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ae(e,t,n,r)}function Pe(e){return e instanceof ye||(e=Le(e)),e?new Ae((e=e.rgb()).r,e.g,e.b,e.opacity):new Ae}function je(e,t,n,r){return 1===arguments.length?Pe(e):new Ae(e,t,n,null==r?1:r)}function Ae(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Fe(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}`}function _e(){const e=$e(this.opacity);return`${1===e?"rgb(":"rgba("}${He(this.r)}, ${He(this.g)}, ${He(this.b)}${1===e?")":`, ${e})`}`}function $e(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function He(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Be(e){return((e=He(e))<16?"0":"")+e.toString(16)}function Ue(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new We(e,t,n,r)}function Ve(e){if(e instanceof We)return new We(e.h,e.s,e.l,e.opacity);if(e instanceof ye||(e=Le(e)),!e)return new We;if(e instanceof We)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new We(a,l,s,e.opacity)}function We(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ke(e){return(e=(e||0)%360)<0?e+360:e}function Je(e){return Math.max(0,Math.min(1,e||0))}function Ye(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ge(ye,Le,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Oe,formatHex:Oe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ve(this).formatHsl()},formatRgb:Re,toString:Re}),ge(Ae,je,ve(ye,{brighter(e){return e=null==e?be:Math.pow(be,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ae(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ae(He(this.r),He(this.g),He(this.b),$e(this.opacity))},displayable(){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:Fe,formatHex:Fe,formatHex8:function(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}${Be(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:_e,toString:_e})),ge(We,function(e,t,n,r){return 1===arguments.length?Ve(e):new We(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return e=null==e?be:Math.pow(be,e),new We(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new We(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ae(Ye(e>=240?e-240:e+120,i,r),Ye(e,i,r),Ye(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new We(Ke(this.h),Je(this.s),Je(this.l),$e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$e(this.opacity);return`${1===e?"hsl(":"hsla("}${Ke(this.h)}, ${100*Je(this.s)}%, ${100*Je(this.l)}%${1===e?")":`, ${e})`}`}}));const Ge=Math.PI/180,Ze=180/Math.PI,Xe=4/29,Qe=6/29,et=3*Qe*Qe;function tt(e){if(e instanceof nt)return new nt(e.l,e.a,e.b,e.opacity);if(e instanceof lt)return st(e);e instanceof Ae||(e=Pe(e));var t,n,r=at(e.r),i=at(e.g),o=at(e.b),a=rt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=rt((.4360747*r+.3850649*i+.1430804*o)/.96422),n=rt((.0139322*r+.0971045*i+.7141733*o)/.82521)),new nt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function nt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function rt(e){return e>.008856451679035631?Math.pow(e,1/3):e/et+Xe}function it(e){return e>Qe?e*e*e:et*(e-Xe)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function at(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function st(e){if(isNaN(e.h))return new nt(e.l,0,0,e.opacity);var t=e.h*Ge;return new nt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ge(nt,function(e,t,n,r){return 1===arguments.length?tt(e):new nt(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return new nt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new nt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Ae(ot(3.1338561*(t=.96422*it(t))-1.6168667*(e=1*it(e))-.4906146*(n=.82521*it(n))),ot(-.9787684*t+1.9161415*e+.033454*n),ot(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ge(lt,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof lt)return new lt(e.h,e.c,e.l,e.opacity);if(e instanceof nt||(e=tt(e)),0===e.a&&0===e.b)return new lt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ze;return new lt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new lt(e,t,n,null==r?1:r)},ve(ye,{brighter(e){return new lt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new lt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return st(this).rgb()}}));var ut=e=>()=>e;function ct(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ut(isNaN(e)?t:e)}var dt=function e(t){var n=function(e){return 1==(e=+e)?ct: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):ut(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=je(e)).r,(t=je(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=ct(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),ft=/^class(-pyramid)?/,pt=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,l=o,s=t.limits,u={},c="percent"===t.limitType?s.map(function(e){return i+(o-i)*e}):s,d=t.colors.map(function(t){return e.resolveUIColor(t)});if(i=Math.min.apply(Math,[i].concat(F(c))),o=Math.max.apply(Math,[o].concat(F(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var l=0;l<r.length;l++)if(t<r[l]){o.push(i[l]);break}}for(var s=0;s<r.length;s++)t<r[s]&&r[s]<n&&(a.push(r[s]),o.push(i[s]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:l,range:d,limits:"percent"===t.limitType?c:s}));else if(t.breakTypes){var f=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var p=0;p<c.length;p+=1)if(f[p]){var h=d[p],m=d[p+1],g=dt(h,m)(.5);u.range.push(g),u.domain.push(c[p]),p<c.length-1&&f[p+1]&&(u.range.push(d[p+1]),u.domain.push((c[p]+c[p+1])/2))}else u.range.push(d[p]),u.range.push(d[p+1]),u.domain.push(c[p]),u.domain.push(c[p]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function ht(e,t,n,r,i){var o,a,l,s=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),l=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(l)||(u[l]?u[l]+=1:u[l]=1);for(o=0;o<u.length;o+=1)u[o]&&(s+=1);return s<=r||s>=i?Math.max(s,r):ht(e,t,n,r+1,i)}var mt=function(e,t,n,r){var i,o,a=t.theme,l=t.hc,s=r.f,u={mode:"field",fieldType:"measure",field:s?s.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(s){if(Number.isNaN(+s.min())||Number.isNaN(+s.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:s.key()},exclude:{fields:l.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return Math.min.apply(Math,F(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(s&&!d)u.min=s.min(),u.max=s.max();else if(s){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,F(c)),u.max=Math.max.apply(Math,F(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter(function(e){return e.key===n.input.measureScheme})[0];u.type=f&&ft.test(f.type)?"categorical":"continuous","categorical"===u.type&&(o=f.colors.some(function(e){return Array.isArray(e)})?Math.max.apply(Math,F(f.colors.map(function(e){return e?e.length:0}))):f.colors.length)}if("categorical"===u.type){for(var p=d?ht(u.max,u.min,c,1,o):o,h=(u.max-u.min)/p,m=[],g=0;g<p+1;g+=1)m.push(u.min+h*g);u.domain=m,u.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function gt(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 vt(e){e.measureOverrides.every(function(e){return!e})&&(e.measureOverrides=null)}function yt(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var l=n.indexOf(o);-1===l?(n.push(o),r.push(a.primary)):r[l]=a.primary,e[o]=null}else if(a){i.push(o);var s=n.indexOf(o);-1!==s&&(n.splice(s,1),r.splice(s,1))}}return{domain:n,range:r,exclude:i}}function bt(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?gt:o,l=n.input.byMeasureDef||{activeMeasureIndex:0},s=a(n,l),u=mt(0,{theme:r,hc:i},n,{f:s});if(u.invalid)return u;"expression"===l.type&&(l.activeMeasureIndex<0||void 0===l.activeMeasureIndex)&&(u.label=l.label,s&&"color.altLabel"===s.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&s&&(u.label=s.title());var c=l.activeMeasureIndex>=0?s:null;if(!c&&s&&void 0!==s.raw().matchMeasure&&s.raw().matchMeasure>-1&&(c=n.pic.fields().filter(function(e){return"measure"===e.type()})[s.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===l.type)if(c){var d=c.raw().coloring;d&&d.gradient&&ce(u,pt(e,d.gradient,u,c))}else u.auxiliary=l;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?he:i,a=r.getCByField,l=void 0===a?me:a,s=r.getPersistence,u=void 0===s?pe:s,c=o(t,n),d=l(n,c),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var h={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(h.label=c.label,"color.altLabel"===f.labelExpRef&&(h.label=n.input.altLabel)),!h.label&&d&&(h.label=d.title()),n.input.dimensionScheme&&(h.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(h.auxiliary=c),ce(h,u(t,n,c,d,{byRow:fe,byElemNo:de})),h}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.pic.field(function(e){return"colorByExpression"===e.raw().id});if(!l||!l.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(l.raw().qMin)&&Number.isFinite(l.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:l?l.key():void 0,type:"color"};var s=mt(0,{hc:i,theme:o},n,{f:l});return s.invalid||(s.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),s}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(l="measure"),"measure"===l){var s=[],u=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){s.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(r.primary):u.push(i)}});var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:s.length?{domain:s,range:u}:void 0}}if("dimension"===l){var f=[],p=[];return i.qDimensionInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}}),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var h=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(h=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(h=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:h}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map(function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var l=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===l?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),T(T({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===l?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field(function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id}),o=i;return T(T({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})}),function(e,t){var n,r,i,o=t.translator;if(vt(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=yt(e.measureOverrides,e.explicit),vt(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every(function(e){return"constant"===(null==e?void 0:e.mode)})){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=yt(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every(function(e){return e})?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var xt=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},wt=function(e){throw e.isHandled=!0,e};function qt(e){return function(t){return"object"===_(t.datum[e])?t.datum[e].value:void 0}}function Dt(e){return"object"===_(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function St(e){return-3===e.datum.value}var kt={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Ct={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function Mt(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:kt.COLOR,fontSize:kt.FONT_SIZE,fontFamily:kt.FONT_FAMILY},label:{color:Ct.COLOR,fontSize:Ct.FONT_SIZE,fontFamily:Ct.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,l=o.label,s=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=s(null==a?void 0:a.color,"legend.title","color",kt.COLOR),i.title.fontSize=s(null==a?void 0:a.fontSize,"legend.title","fontSize",kt.FONT_SIZE),i.title.fontFamily=s(null==a?void 0:a.fontFamily,"legend.title","fontFamily",kt.FONT_FAMILY),i.label.color=s(null==l?void 0:l.color,"legend.label","color",Ct.COLOR),i.label.fontSize=s(null==l?void 0:l.fontSize,"legend.label","fontSize",Ct.FONT_SIZE),i.label.fontFamily=s(null==l?void 0:l.fontFamily,"legend.label","fontFamily",Ct.FONT_FAMILY),i}var It=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Nt=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 Et(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,l=t.coloring,s=t.theme,u=t.hc,c=Mt({theme:s,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:It(a,i,o)},show:"function"==typeof a.show?function(){return Nt(a,u,l)}:Nt(a,u,l),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:l.label||"",fill:c.title.color,fontSize:c.title.fontSize,fontFamily:c.title.fontFamily}}}}function Ot(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Et(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,l=e.styleOverrides,s=e.viewState,u=e.rtl,c=e.settings,d=e.style,f=t.scaleKey,p=t.theme,h=t.scales,m=Mt({theme:p,key:a,styleOverrides:l}),g=r.layout.dock,v="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},y={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"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return ce(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in h?b:f,settings:{layout:{scrollOffset:function(){return s?s.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:u?"rtl":"ltr",horizontal:20},item:{show:i,label:T({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},v)},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:y[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:c,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,l=e.settings,s=e.style,u=t.scaleKey,c=t.theme,d="".concat(u,"Range"),f=Et(e,t);if(!f.show)return!1;var p=Mt({theme:c,key:i,styleOverrides:o}),h=f.layout.dock,m="right"===h||"left"===h,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),ce(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:u,major:d,length:1,tick:{fill:p.label.color,fontSize:p.label.fontSize,fontFamily:p.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:l,style:s})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return e.key==="".concat(t,"-cat")}))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some(function(e){return e.key==="".concat(n,"-cat")})}},events:R(R(R({},"".concat(t,"start"),function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))}),"".concat(t,"move"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)}),"".concat(t,"end"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})}}(e,n))),{interactions:i,components:r}}function Rt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=T({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ce(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ce(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var l=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(l=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[l]&&t.hc.qDimensionInfo[l].coloring&&t.hc.qDimensionInfo[l].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[l].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every(function(e){return!e||!e.on})&&(n.input=ce(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach(function(e){r.push({key:"ui",colors:e.colors})}),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch(function(){});if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch(function(){}):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch(function(){}):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then(function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return pt(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},l=r[0],s=r[1]?r[1].colorMap:null;if(l){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:l,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return s?function(e,t,n,r){var i=r.external,o=r.field,a=T({},e);ce(a,de(o,o.raw().qCardinal));var l=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},l&&!t.pal&&(a.palettes.categorical=l.key,ce(a,de(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(l&&(a.palettes={categorical:l.key}),ce(a,de(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var l=0;l<i.items.length;l++){var s=i.items[l],u=(s.text||s).label;r[u]&&-1===a.indexOf(s.value)&&(a.push(s.value),o.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,s,i,{external:t,field:n.pic.field(e.field)}):a}return{}})):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter(function(e){return"ui"===e.key})[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=T(T({},e),r.getDataColorSpecials())),n.settings=ce(e,bt(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap(function(e,t){return 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()}(e,{layout:t.layout,app:t.app})}).getMeasure(function(e,t){return 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()}(e,{layout:t.layout,app:t.app})}).getAttributeDimension(function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(wt):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})});return n.getSnapshotData=xt,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=T({},i),r={},!n.key)throw new Error("Missing key");t.set(T(T({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then(function(e){return r.auxiliarySettings=e||{},r.settings=T(T({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings})},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then(function(e){return t.getSnapshotData(n,e)})},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter(function(e){return e.key===o})[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var l=n.palettes.metric||t.measureScheme,s=r.getDataColorScales().filter(function(e){return e.key===l})[0]||r.getDataColorScales()[0];if(s){var u=s.colors[0]?s.colors:[[]].concat(F(s.colors.slice(1)));u=Array.isArray(u[0])?u.map(function(e){return e.slice().reverse()}):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,l={},s=i;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(F((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(F((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var h={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}};l[s]=h,c&&(l["".concat(s,"Legend")]=T(T({},h),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||h.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};l[s]=ce({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===l[s].type&&(l["".concat(s,"Range")]=ce({},m,{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"};l[s]=g}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map(function(e,t){return t}).filter(function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))}),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=v}}return l}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=qt(r),o=qt("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,l=e.mode,s=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return St(e)||o(e)?u:s}:n[t]?function(e){return St(e)?u:Dt(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?s:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===l?function(e){return St(e)||o(e)?u:Dt(e)?s:c}:"color"===d?function(e){return St(e)||o(e)?u:Dt(e)?s:i(e)||u}:null},l=a(t,r);if(t.measureOverrides){var s=qt("".concat(r,"MeasureIdx")),u=t.measureOverrides.map(function(e){return e&&a(e)});return function(e){var t=s(e);return u[t]?u[t](e):l(e)}}return l}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,l=e.addMeasureIx,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&Le(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=s);var d=R({},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)}}),l&&(d["".concat(u,"MeasureIdx")]=s),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,l=e.rtl,s=e.styleReference,u=void 0===s?"object.legend":s,c=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,p=e.style,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ot({eventName:t,key:r,rtl:l,viewState:o,chart:a,styleReference:u,styleOverrides:c,settings:f,style:void 0===p?{}:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},h)}};return o}var Lt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Tt(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Lt),o=r.some(Lt),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var zt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Pt(e){var t,n=e.qHyperCube.qDimensionInfo.some(zt),r=e.qHyperCube.qMeasureInfo.some(zt),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var jt=function(){};function At(e){var t,n,r,i,o=e.picasso,a=e.model,l=e.app,s=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,f=void 0===d?jt:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,v=h.localeInfo,y=h.key,b=h.theme,x=void 0===b?void 0:b,w=h.auto,q=void 0===w?void 0:w,D=h.definitionPath,S=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),k={theme:x,key:y,localeInfo:v,layout:S,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:T(T({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:S?Tt(S):void 0})},C=Rt({picasso:o,model:a,app:l,translator:s,auto:q});!1!==q&&C.auto(function(e){return q?q({layout:e,defaultAuto:Pt}):Pt(e)});var M=!1,I={getColor:function(){return C.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return C.resolveUIColor({index:t,color:n})},getData:function(){return C.data()},getDatumProps:function(e){return C.datumProps(e)},getSnapshotData:function(){return C.getSnapshotData(D)},getSettingsForMeasure:function(e){return C.settingsForMeasure(e)},getSettings:function(){return C.settings()},getLegend:function(e,t){return C.legend(e,t)},getScales:function(){return C.scales()},getPalettes:function(){return C.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return C.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return M},custom:T({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:Tt}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T(T(T({},e),t),{},{colorProps:T(T({},e.colorProps),t.colorProps||{})})}(k,t);return C.config(n),C.getAuxiliarySettings(D).then(function(){M=!0})}};return I}var Ft="center",_t="bottom";function $t(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}[{key:"NoDataExist",alignment:Ft,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Ft,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Ft,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Ft},{key:"DataRangeIncludingZero",alignment:_t},{key:"LimitedData",alignment:_t},{key:"NegativeOrZeroValues",alignment:_t}].reduce(function(e,t){return e[t.key]=t,e},{});var Ht=["__proto__","constructor"];function Bt(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Ht.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var l=r[a];void 0===o[l]&&(o[l]=Number.isNaN(+r[a+1])?{}:[]),o=o[l]}void 0!==n?o[i]=n:delete o[i]}}}function Ut(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach(function(e){var n=-1;t.some(function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n}),n>-1?t[n]=e:t.push(e)}),t):n}function Vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach(function(t){Vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Jt=Object.prototype.hasOwnProperty,Yt=Object.prototype.toString,Gt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Xt=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Yt.call(e)},Qt=function(e){if(!e||"[object Object]"!==Yt.call(e))return!1;var t,n=Jt.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Jt.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Jt.call(e,t)},en=function(e,t){Gt&&"__proto__"===t.name?Gt(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},tn=function(e,t){if("__proto__"===t){if(!Jt.call(e,t))return;if(Zt)return Zt(e,t).value}return e[t]},nn=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=tn(l,n),l!==(i=tn(t,n))&&(c&&i&&(Qt(i)||(o=Xt(i)))?(o?(o=!1,a=r&&Xt(r)?r:[]):a=r&&Qt(r)?r:{},en(l,{name:n,newValue:e(c,a,i)})):void 0!==i&&en(l,{name:n,newValue:i}));return l};function rn(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),l=-1,s=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(s=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),l=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==s||-1!==l){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:s>=0?e=>e[a].qAttrDims.qValues[s]:l>=0?e=>e[a].qAttrExps.qValues[l]:e=>e[a]}function on(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function an(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:l,sourceKey:s,target:u,targetProp:c,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=rn(i.field,o,{cache:t},d);if(-1===e)return;f=nn({qRow:a},e(l))}u[c]=on(i,f,{key:s})}function ln(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),l=t.key(),s="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),d=Object.keys(u),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=rn(s,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let v=0;v<a.qDataPages[t].qMatrix.length;v++){const y=a.qDataPages[t].qArea.qTop+v,b=nn({qRow:y},o(a.qDataPages[t].qMatrix[v])),x=on(c,b,{key:l});if(!c.filter||c.filter(b)){for(let e=0;e<d.length;e++){const r=u[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)an({cache:n,f:s,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:y,row:a.qDataPages[t].qMatrix[v],sourceKey:l,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const v=f?r.collect(m,{main:c,propsArr:d,props:u}):g;o=[...o,...v]}return o}function sn(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 un(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dn)):void 0===t&&(t=cn);for(var n,r,i,o,a,l=new hn(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new hn(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(pn)}function cn(e){return e.children}function dn(e){return Array.isArray(e)?e[1]:null}function fn(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pn(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function hn(e){this.data=e,this.depth=this.height=0,this.parent=null}function mn(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}hn.prototype=un.prototype={constructor:hn,count:function(){return this.eachAfter(sn)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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 un(this).eachBefore(fn)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var gn={depth:-1},vn={},yn={};function bn(e){return e.id}function xn(e){return e.parentId}function wn(e){let t=e.length;if(t<2)return"";for(;--t>1&&!qn(e,t););return e.slice(0,t)}function qn(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Dn(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Dn(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Dn(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Sn(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Sn(e[i].children,t-1,n)]);return r}function kn(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Sn(e.children,r-1,n)}return!1}const Cn=/^qDimensionInfo(?:\/(\d+))?/,Mn=/^\/?qMeasureInfo\/(\d+)/,In=/\/qAttrExprInfo\/(\d+)/,Nn=/\/qAttrDimInfo\/(\d+)/;function En(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function On(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,l=-1,s=-1,u=-1,c=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=En(n);return Cn.test(d)&&(i=!0,o=+Cn.exec(d)[1],d=r.replace(Cn,"")),Mn.test(d)&&("K"===n.qMode?u=+Mn.exec(d)[1]:f&&-1!==f.indexOf(-1)?(u=+Mn.exec(d)[1],c=0):c=+Mn.exec(d)[1],d=d.replace(Mn,"")),d&&(Nn.exec(d)?l=+Nn.exec(d)[1]:In.exec(d)&&(a=+In.exec(d)[1])),s=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:s+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:l,attrIdx:a}}function Rn(e,t){let n,r,i=kn(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function Ln(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Tn(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields||[l];let u,c;l.fields&&(u=[],c=[]);for(let n=0;n<s.length;n++){const d=s[n];let f,p,h,m,g,v;if("primitive"===d.type?(h=d.value,v=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(v=g.map(p),p=null),h=d.reduce?d.reduce(h):h,v=d.reduceLabel?d.reduceLabel(v,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),v=h)):(h=i,v=i)),l.fields){const e=f?f(h):h;u.push(e),c.push(p&&null!=v?p(v):null!=v?v:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(v):null!=v?v:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(c,r):c})}}const zn=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Dn(r,e);return o&&o[0]?(t.tree=un(o[0],n.children||(e=>e[i])),t.tree):null};function Pn(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",s=!1;for(let e=0;e<i.length;e++){var l;const t=n[i[e]],o="".concat(r,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);a[o]||(a[o]=Kt({__id:o,__parent:r,qValues:[]},t),s=!0),r=o}if(s)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const s=Object.keys(a).map(e=>a[e]);return function(){var e,t=bn,n=xn;function r(r){var i,o,a,l,s,u,c,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){let t=(e=`${e}`).length;return qn(e,t-1)&&!qn(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(wn),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(wn(e)),f.push(yn));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],u=f[a]=new hn(o),null!=(c=p(o,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?vn:u)),null!=(c=h(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=f[a]).parent){if(!(s=m.get(c)))throw new Error("missing: "+c);if(s===vn)throw new Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw new Error("multiple roots");l=u}if(!l)throw new Error("no root");if(null!=e){for(;l.data===yn&&1===l.children.length;)l=l.children[0],--i;for(let e=f.length-1;e>=0&&(u=f[e]).data===yn;--e)u.data=null}if(l.parent=gn,l.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(pn),l.parent=null,i>0)throw new Error("cycle");return l}return r.id=function(e){return arguments.length?(t=mn(e),r):t},r.parentId=function(e){return arguments.length?(n=mn(e),r):n},r.path=function(t){return arguments.length?(e=mn(t),r):e},r}().id(e=>e.__id).parentId(e=>e.__parent)(s)}const jn=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],l=i.fields?i.fields:[i];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=Rn(o,On(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function An(){let 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;const i=t.raw(),o=t.key(),a="S"===i.qMode?Pn(t):zn(i,n,e);if(!a)return null;const l=a.height,s=[];for(let o=0;o<=l;o++){let a=null;if(o>0)if("S"===i.qMode){let e=En(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:l,main:u}=r.normalizeConfig(Kt(Kt({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(l);s[o]={propsArr:c,props:l,main:u};const d=a?On(a,{cube:i}):{fieldDepth:0};jn({propsArr:c,props:l,cube:i,cache:n,itemDepthObject:d,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=s[c[e].depth].propsArr,n=s[c[e].depth].props,r=s[c[e].depth].main,i=u[e],a=i.data,l=Ln(r,a,{key:o});Tn({propsArr:t,props:n,item:i,itemData:a,ret:l,sourceKey:o}),c[e].data=l}return a}function Fn(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const l=t.raw(),s=t.key();if(!zn(l,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(c),p=On(u,{cube:l}),{nodeFn:h,attrFn:m,valueFn:g}=Rn({fieldDepth:0},p);jn({propsArr:f,props:c,cube:l,cache:n,itemDepthObject:p,f:u});const v=!!i[a].trackBy,y=typeof i[a].trackBy,b={},x=[],w=h(n.tree),q=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=Ln(d,n,{key:s});Tn({propsArr:f,props:c,item:t,itemData:n,ret:o,sourceKey:s}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:y}),q.push(o)}const D=v?r.collect(x,{main:d,propsArr:f,props:c}):q;o=[...o,...D]}return o}var _n,$n,Hn=(_n=function(e){
|
|
10
10
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
11
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,l,s,u,c,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=f-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%s,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-v+1)%s)&&b<f-s&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},_n($n={exports:{}}),$n.exports);function Un(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const Vn={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"},Bn=/%\)?$/,Wn=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Kn=/^\(oct\)/i,Jn=/^\(dec\)/i,Yn=/^\(hex\)/i,Gn=/^\(bin\)/i,Zn=/^\(rom\)/i,Xn=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Qn=/#|0/g;function er(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 tr(e,t,n){const r=Un(e);return n?r:new RegExp(r||"",t)}function nr(e,t,n,r){let i,o,a,l,s,u,c,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=Un(m)),h&&(h=Un(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",l=a?p.substr(0,p.indexOf(a)):p,s=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(tr(u,"g"),t)),c=n,n=".",c&&(a=a.replace(tr(c,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(c);let v;g[1]&&(v=g[1].match(Qn)),e.prefix=l||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=v?v.length:2,e.percentage=Bn.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(tr(t,null,!0),"|").concat(tr(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class rr{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Vn;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new rr(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});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],Xn.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Xn.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Xn.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||nr(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&nr(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&nr(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,l,s,u,c=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){let r;return Wn.test(t)?e=er(e,Number(/\d{2}/.exec(t)[0]),t,n):Kn.test(t)?e=er(e,8,t,n):Jn.test(t)?e=er(e,10,t,n):Yn.test(t)?e=er(e,16,t,n):Gn.test(t)?e=er(e,2,t,n):Zn.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),l=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=l[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(l=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&l<t.length;)l++,o=t[l];l>0&&(r=t[l-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,s=c.numericPattern,u=s.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==s.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=s.split(o)[0];if(n+=o,e=Hn(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(l=i.length;l<n;l++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(s+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=Hn(s,e)}e=e.replace(c.numericRegex,e=>e===a?c.groupTemp:e===o?c.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function ir(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,l=Object.create(null),s=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),o.get=e=>l[e],o.has=e=>e in l,o.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},o.size=()=>u,o}function or(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rr(...t)}(i,e,t,n,r),a=ir(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},l}const ar="D",lr="T",sr="TS",ur=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],cr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dr=["January","February","March","April","May","June","July","August","September","October","November","December"],fr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pr(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function hr(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class mr{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:ur,qDayNames:cr,qLongMonthNames:dr,qMonthNames:fr}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[lr]:r.qTimeFmt||"hh:mm:ss",[ar]:r.qDateFmt||"YYYY-MM-DD",[sr]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new mr(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*hr(t),r=60*hr(n),i=60*hr(r),o=1e3*hr(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,l=r.s,s=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(l+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:l,f:s,t:c}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:pr("".concat(a.year).slice(-2),2),YYY:pr("".concat(a.year).slice(-3),3),def:e=>pr("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:pr("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:pr("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>pr("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>pr("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>pr("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>pr("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const l=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&l.push(e);const s=new RegExp(l.join("|"),"g");return t.replace(s,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r})}}function gr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mr(...t)}function vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=gr(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=ir(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=gr(i,e,t),r=ir(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function yr(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return vr(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),or(n,r,i,o,t)}(t,i),f="dimension"===l?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function br(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),l={instance:yr(nn({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return l.attrDims=br("qAttrDimInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=br("qAttrExprInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=br("qMeasureInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l})}function xr(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=xr.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,l,r,o),hierarchy:e=>a.hierarchy(e,l,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=Fn,a.hierarchy=An,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=ln,a.pages=i.qDataPages,a.hierarchy=An):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,o);const s="S"===i.qMode?e=>e.qElemNumber:void 0,u="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...br("qDimensionInfo",i,e,"",nn({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...br("qMeasureInfo",i,e,"",nn({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const c=e=>{e.forEach(e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)})};return c(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=l.field(t.from),i=yr(Kt({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),l}const wr=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],qr=/\/qDimensionInfo(?:\/(\d+))?/,Dr=/\/qMeasureInfo\/(\d+)/,Sr=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,kr=/\/qAttrExprInfo\/(\d+)/,Mr=/\/?qHyperCube/,Cr=/\/?qTreeData/,Ir=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Nr=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function Or(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},l=e.isActive();let s=!1;return e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;Mr.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Ir):Cr.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Nr);let l=!0;if(qr.test(e)&&(r=+qr.exec(e)[1]),Dr.test(e)&&(i=+Dr.exec(e)[1]),Sr.test(e)){i=-1,r=0;const e=+Sr.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(kr.test(e)){const e=i;if(t){i=0;const a=Dn(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+kr.exec(n)[1]}else r>-1?(r=-1,i=+kr.exec(n)[1]):i+=+kr.exec(n)[1]+1}return wr.forEach(e=>{let[t,r]=e;n=n.replace(t,r)}),l&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.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){const n=e.brush.ranges();n.length&&(s=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.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(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,l=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||l>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),s=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));s=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!s&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function Er(e){xr.util=e.data("matrix").util,e.data("q",xr),e.formatter("q-number",or),e.formatter("q-time",vr)}function Rr(e){var t=$t(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Pr(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Er.qBrushHelper=Or,Er.selections=Or;var Tr="Shift";var Lr=function(e,t){return t[e]?Lr(e+1,t):e},zr=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=Lr(r,n);return n[i]=!0,e[r]=i,e},{})};function jr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,l=i.qMeasureInfo,s=void 0===l?[]:l;return{dimensions:zr(a,r.dimensions||[]),measures:zr(s,r.measures||[])}}function Ar(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var Fr=[],_r=0,$r=function(e){var t=Fr.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()}))};function Hr(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,l=void 0===a?"selection":a,s=e.emit,u=void 0===s?"rangeClear":s,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof l&&t.brush(l).clear(),f)}var Ur=["chart","document","selections","selectionInfo"],Vr=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=L(e,Ur);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Br(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Wr(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,l=e.selections,s=e.selectionEvents;if(!1===i||!1===s)return function(){};var u=i.reset,c=void 0===u?Br:u,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?Vr:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(T({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,l=void 0===a?"discrete-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,emit:"areaClear",brushName:e.brushName})}(T(T({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,l=void 0===a?"continuous-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,brushName:e.brushName})}(T(T({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,l=void 0===a?"minorRange":a,s=e.cleared,u=void 0!==s&&s,c=e.brushName,d=Hr({selectionInfo:t,chart:n,document:r,eventName:u?void 0:l,componentName:o,brushName:void 0!==c&&c});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map(function(e){return e.id()}),g=n.brush(h),v=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&v.length&&v.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(T(T({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,l=e.cleared;Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(T(T({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,l=void 0===a?[]:a;if(n&&o.includes(n.event)){var s=n.currentComponent;n.previousComponent!==s&&(r.clear(),l.forEach(function(e){return t.brush(e).end()}))}}(T(T({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,l=e.componentName,s=void 0===l?"legend-range-brush":l,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Hr({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:s,brushName:void 0!==d&&d})&&i.clear()}(T(T({},t),e))}},t))}}({clear:d,selections:l,selectionInfo:r,chart:n}),p=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:c,actions:a}),h={};Object.entries(p).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];h[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,s[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,l=t.start,s={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(T(T({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof l?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];l(T(T({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},s),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:s,selections:l,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(h).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];null==l||l.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(h).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];null==l||l.removeListener(n,r)})}}var Kr=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Jr(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,l=void 0!==a&&a,s=o.majorScale,u=void 0===s?void 0:s,c=o.selectionActions,d=void 0===c?{}:c,f=d.clear,p=d.reset,h=o.selectionEvents,m=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,g=o.brushEvents,v=void 0===g?{}:g,y=o.brushName,b=void 0===y?"selection":y,x=o.brushMaxListeners,w=void 0===x?20:x,q=o.brushRanges,D=void 0!==q&&q,S=o.interceptors,k=void 0===S?{}:S,M=o.selectionsFn,C=void 0===M?i.selections:M,I=t.brush(b);if("number"==typeof w&&I.setMaxListeners(w),D){var N=!0===D?Kr:D;I.configure({ranges:N})}var O={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},E=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,s=void 0===l?"/qHyperCubeDef":l;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var u=++_r,c=null,d={dimensions:[],measures:[]},f=[],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 h=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,l=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var s=e.filter(function(e){return-2!==e.value});if(s.length>1){var u=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=Rr({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,F(o))}),a.filter(Boolean)}({layout:l,values:s});return u}return s},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(s)});var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})}(n,v);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,p,c),t=jr({layout:c,filtered:d});e.forEach(function(e){var r=Ar({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,y),n.select(r)})})):r.on("update",function(){var e=a(r,p,c),t=jr({layout:c,filtered:d});e.forEach(function(e){n.select(Ar({selection:e,fieldMap:t}))})}),0===Fr.length&&document.addEventListener("keyup",$r),Fr.push({key:u,selections:n}),{layout:function(e){c=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=Fr.indexOf(Fr.filter(function(e){return e.key===u})[0]);-1!==e&&Fr.splice(e,1),Fr.length||document.removeEventListener("keyup",$r),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,v)}}}({brush:I,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:C});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=A(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:I,interceptors:k});var R=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,l=e.selectionEvents,s=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=A(e,2),o=i[0],a=i[1],l=function(){return a({chart:n,selectionInfo:r})};return t.on(o,l),[o,l]});return function(){a.forEach(function(e){var n=A(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=Wr({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:l}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==Tr||(t.lasso.action(!0),n=!0)},i=function(e){e.key===Tr&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){s(),u(),c()}}({chart:t,brush:I,actions:n,selections:r,selectionInfo:O.selectionInfo,selectionActions:{clear:f,reset:p},selectionEvents:m,brushEvents:v});if(l){var P=!0===l?F(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):l;E.allowSimultaneous(P)}return{unbindEvents:R,state:O,picassoSelections:E,brush:I}}var Yr=["colorField","useLegendCube"];function Gr(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,l=Jr({chart:t,actions:i,selections:n,picassoQ:Er,config:a}),s=l.unbindEvents,u=l.state,c=l.picassoSelections,d=l.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,v=void 0===g?Pr: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:function(){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"===_(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}(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},getSelectionsObject:function(){return n},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,l={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var s=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===s?[]:s;return l.lockedDimensions=u.map(function(e){return!!e.qLocked}),l.singleSelectDimensions=u.map(function(e,t){return Rr({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),l.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=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});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),l.canSelect=0===u.length||u.some(function(e){return!e.qLocked}),l.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),l}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setFilteredFields:function(e){c.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=L(e,Yr),o=T({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);v(T(T({},o),{},{defaultFunc:function(){return Pr(o)}}))},destroy:function(){s(),c.release()},custom:T({},p)}}var Zr="'Source Sans Pro', 'Arial', 'sans-serif'",Xr="#333333",Qr="#595959",ei="#737373",ti="#cccccc",ni="#e6e6e6";function ri(e){var t={};return[].concat(F(e),F([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Qr],["object","axis.label.name","fontFamily",Zr],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",ti],["object","axis.line.minor","color",ni],["object","axis.title","color"],["object","axis.title","fontFamily",Zr],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ni],["object","grid.line.major","color",ti],["object","grid.line.minor","color",ni],["object","label.value","color",Qr],["object","label.value","fontFamily",Zr],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Qr],[!1,"label.value","lightColor",ni],["object","outOfRange","color","#999"],["object","legend.title","color",Xr],["object","legend.title","fontFamily",Zr],["object","legend.title","fontSize","15px"],["object","legend.label","color",Qr],["object","legend.label","fontFamily",Zr],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Xr],["object","referenceLine.label.name","fontFamily",Zr],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ni],["object","referenceLine.outOfBounds","fontFamily",Zr],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",ei,function(e){return"transparent"===e?ei:e}]])).reduce(function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e},[]).sort(function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)})}var ii=function(e){return e};function oi(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},l=r.reduce(function(e,t){var n=A(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=A(e,5),i=r[0],o=r[1],s=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var l=t.getStyle(n,r,i);return void 0===l?a:l}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:s,defaultValue:u}),p=(l["".concat(o,".").concat(s)]||ii)(d(f));Ut(a,[o,s].filter(Boolean).join("."),p)}),i.forEach(function(e){var t=A(e,2),n=t[0],r=t[1];Ut(a,n,r)}),a}function ai(e,t,n){const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",e,"color")})}}}}}function li(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),l=a.id,s=a.paths,u={};s.forEach(function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var s=r[a];a===r.length-1?i[s]=le({theme:t,translator:n,id:l,path:e,flags:o}):void 0===i[s]&&(i[s]={}),i=i[s]}});var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:ai("axis.title",r,e)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:ai("axis.label.name",r,e)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...ai("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const si={uses:"sorting"},ui=(e,t,n)=>{const r=n?.sense?.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...t?.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING")&&{funnelStyling:li(r,t,e)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},ci={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function di({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:ci,sorting:si,settings:ui(e,t,n)}}}function fi(e){return{definition:di(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const pi=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mi,gi;var vi=function(){if(gi)return mi;gi=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return mi=function e(){var t,n,r,s,u,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},mi}(),yi=hi(vi),bi={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function xi(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...l}=t,s=yi(!0,{},{...n,qHyperCube:{...l}}),{dataRelatedPropertiesPaths:u}=bi;function c(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==$t(e,t)&&Ut(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;$t(e,r,[]).forEach(e=>{o&&c(e,o)})}return u.forEach(e=>{c(s,e)}),s}var wi={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:l})=>{const s=a.x-l.x,u=a.y-l.y,c=a.width-l.width,d=a.height-l.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=s,e.x2-=s):"text"===e.type&&(e.x-=s)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=s,e.x2+=s+c)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let l=-r,s=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(l=t.width);break;case"left":o<0&&(l=-n.width);break;case"top":a<0&&(s=-n.height);break;case"bottom":i>0&&(s=t.height)}switch(e.type){case"text":case"rect":e.x+=l,e.y+=s;break;case"circle":e.cx+=l,e.cy+=s;break;case"path":e.transform=`translate(${l}, ${s})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=xi(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=xi(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function qi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Di(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Si(){}[["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}]].forEach(([e,{width:t,height:n}])=>{});var ki=.7,Mi=1/ki,Ci="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oi=/^#([0-9a-f]{3,8})$/,Ei=new RegExp(`^rgb\\(${Ci},${Ci},${Ci}\\)$`),Ri=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),Pi=new RegExp(`^rgba\\(${Ci},${Ci},${Ci},${Ii}\\)$`),Ti=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${Ii}\\)$`),Li=new RegExp(`^hsl\\(${Ii},${Ni},${Ni}\\)$`),zi=new RegExp(`^hsla\\(${Ii},${Ni},${Ni},${Ii}\\)$`),ji={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 Ai(){return this.rgb().formatHex()}function Fi(){return this.rgb().formatRgb()}function _i(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Oi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?$i(t):3===n?new Vi(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Hi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Hi(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=Ei.exec(e))?new Vi(t[1],t[2],t[3],1):(t=Ri.exec(e))?new Vi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pi.exec(e))?Hi(t[1],t[2],t[3],t[4]):(t=Ti.exec(e))?Hi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Li.exec(e))?Gi(t[1],t[2]/100,t[3]/100,1):(t=zi.exec(e))?Gi(t[1],t[2]/100,t[3]/100,t[4]):ji.hasOwnProperty(e)?$i(ji[e]):"transparent"===e?new Vi(NaN,NaN,NaN,0):null}function $i(e){return new Vi(e>>16&255,e>>8&255,255&e,1)}function Hi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Vi(e,t,n,r)}function Ui(e){return e instanceof Si||(e=_i(e)),e?new Vi((e=e.rgb()).r,e.g,e.b,e.opacity):new Vi}function Vi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Bi(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}`}function Wi(){const e=Ki(this.opacity);return`${1===e?"rgb(":"rgba("}${Ji(this.r)}, ${Ji(this.g)}, ${Ji(this.b)}${1===e?")":`, ${e})`}`}function Ki(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ji(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yi(e){return((e=Ji(e))<16?"0":"")+e.toString(16)}function Gi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Xi(e,t,n,r)}function Zi(e){if(e instanceof Xi)return new Xi(e.h,e.s,e.l,e.opacity);if(e instanceof Si||(e=_i(e)),!e)return new Xi;if(e instanceof Xi)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Xi(a,l,s,e.opacity)}function Xi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Qi(e){return(e=(e||0)%360)<0?e+360:e}function eo(e){return Math.max(0,Math.min(1,e||0))}function to(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}qi(Si,_i,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ai,formatHex:Ai,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Zi(this).formatHsl()},formatRgb:Fi,toString:Fi}),qi(Vi,function(e,t,n,r){return 1===arguments.length?Ui(e):new Vi(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return e=null==e?Mi:Math.pow(Mi,e),new Vi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ki:Math.pow(ki,e),new Vi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vi(Ji(this.r),Ji(this.g),Ji(this.b),Ki(this.opacity))},displayable(){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:Bi,formatHex:Bi,formatHex8:function(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}${Yi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Wi,toString:Wi})),qi(Xi,function(e,t,n,r){return 1===arguments.length?Zi(e):new Xi(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return e=null==e?Mi:Math.pow(Mi,e),new Xi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ki:Math.pow(ki,e),new Xi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Vi(to(e>=240?e-240:e+120,i,r),to(e,i,r),to(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Xi(Qi(this.h),eo(this.s),eo(this.l),Ki(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ki(this.opacity);return`${1===e?"hsl(":"hsla("}${Qi(this.h)}, ${100*eo(this.s)}%, ${100*eo(this.l)}%${1===e?")":`, ${e})`}`}}));const no=Math.PI/180,ro=180/Math.PI,io=.96422,oo=.82521,ao=4/29,lo=6/29,so=3*lo*lo,uo=lo*lo*lo;function co(e){if(e instanceof fo)return new fo(e.l,e.a,e.b,e.opacity);if(e instanceof yo)return bo(e);e instanceof Vi||(e=Ui(e));var t,n,r=go(e.r),i=go(e.g),o=go(e.b),a=po((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=po((.4360747*r+.3850649*i+.1430804*o)/io),n=po((.0139322*r+.0971045*i+.7141733*o)/oo)),new fo(116*a-16,500*(t-a),200*(a-n),e.opacity)}function fo(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function po(e){return e>uo?Math.pow(e,1/3):e/so+ao}function ho(e){return e>lo?e*e*e:so*(e-ao)}function mo(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function go(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vo(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof yo)return new yo(e.h,e.c,e.l,e.opacity);if(e instanceof fo||(e=co(e)),0===e.a&&0===e.b)return new yo(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ro;return new yo(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new yo(e,t,n,null==r?1:r)}function yo(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function bo(e){if(isNaN(e.h))return new fo(e.l,0,0,e.opacity);var t=e.h*no;return new fo(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}qi(fo,function(e,t,n,r){return 1===arguments.length?co(e):new fo(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return new fo(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new fo(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Vi(mo(3.1338561*(t=io*ho(t))-1.6168667*(e=1*ho(e))-.4906146*(n=oo*ho(n))),mo(-.9787684*t+1.9161415*e+.033454*n),mo(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),qi(yo,vo,Di(Si,{brighter(e){return new yo(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new yo(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return bo(this).rgb()}}));var xo,wo,qo={isDark:function(e){return vo(e).l<70}};function Do(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}1===(xo=Do).length&&(wo=xo,xo=function(e,t){return Do(wo(e),t)});var So="$";function ko(){}function Mo(e,t){var n=new ko;if(e instanceof ko)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Co(){}ko.prototype=Mo.prototype={constructor:ko,has:function(e){return So+e in this},get:function(e){return this[So+e]},set:function(e,t){return this[So+e]=t,this},remove:function(e){var t=So+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===So&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===So&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===So&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===So&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===So&&++e;return e},empty:function(){for(var e in this)if(e[0]===So)return!1;return!0},each:function(e){for(var t in this)t[0]===So&&e(this[t],t.slice(1),this)}};var Io=Mo.prototype;Co.prototype={constructor:Co,has:Io.has,add:function(e){return this[So+(e+="")]=e,this},remove:Io.remove,clear:Io.clear,values:Io.keys,size:Io.size,empty:Io.empty,each:Io.each},yi.bind(null,!0);const No=[[2,4,6],[2,4],[3]],Oo=[,[,,[[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 Eo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Ro(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Eo(e[r],t,n)}function Po(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}!function(){let e,t;for(Ro(No,1,10),e=0;e<Oo.length;e++)if(Oo[e])for(t=0;t<Oo[e].length;t++)Array.isArray(Oo[e][t])&&Ro(Oo[e][t])}();var To=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},Lo=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return To.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return To.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||To.newInstanceIfNeeded(e,t,this._value)}},zo=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new Lo);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new zo;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);function jo(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Ao(e){return e.formatter("num")(e.node.data.num.value)}function Fo({data:e}){return e?e.label:""}function _o(e){if(e.dataPoint.auto)return jo;switch(e.dataPoint.labelMode){case"share":default:return jo;case"value":return Ao;case"none":return null}}function $o(e,t,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),l=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:Po(e,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Fo}],linkData:e=>`${e.data.value} ${Fo(e)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:e})=>(e=>qo.isDark(e.desc.fill)?l.lightColor:l.darkColor)(e):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:_o(t)}],linkData:e=>"none"===t.dataPoint.labelMode?Math.random():`${e.data.value} ${_o(t)(e)}`}}}]},animations:{enabled:r,trackBy:e=>e.data}}}function Ho(e,t,n){if(!t.showDimensionTitle||!t.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=t.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:Po(e,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function Uo({picasso:e,flags:t}){const y=c(),b=d(),x=f(),w=p(),q=h(),D=m().qLocaleInfo,[S,k,M,C]=function({picasso:e}){const t=n(),c=r(),d=i(),f=o(),p=a(),h=l(),[m,g]=s(),[v,y]=s(),[b,x]=s(),[w,q]=s();return u(()=>{const n=At({picasso:e,model:d,app:f,translator:p,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const r=e({renderer:{prio:[h.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),i=Gr({chart:r,selections:c,config:{selectionActions:!1}});return x(i),y(n),g(r),q(function(){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={}}}}()),()=>{i.destroy(),r.destroy()}},[]),[m,v,b,w]}({picasso:e}),I=l(),N=()=>{const e=S.element.clientWidth!==C.get("width")||S.element.clientHeight!==C.get("height");return!1!==I.chartAnimations&&!e&&!wi.propertiesHaveChanged({viewCache:C,layout:y})},[O]=g(()=>{if(!k)return Promise.resolve();const t=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(y),n=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return E(z().m(function e(){var r,a,l,s;return z().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=E(z().m(function e(n){var r;return z().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(T({},i));case 2:if("object"===_(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),l=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(T({},i))})),e.n=2,Promise.all([a,l]);case 2:s=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,F(s[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=A(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=ce(!0,{},n.brush);ce(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===_(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Vt({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Vt({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:e,plugins:q,pluginArgs:t});return Promise.all([k.initialize({createConfig:({getUseBaseColors:e})=>({theme:b,colorProps:{...y.color,useBaseColors:e(y)},layout:y,hc:y.qHyperCube})}),n.initialize()]).then(()=>n)},[y,k]);u(()=>{if(!S||!k||!O)return;const e=[{type:"q",key:"qHyperCube",data:y.qHyperCube,config:{localeInfo:D}},...k.getData()],n=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:ri(a),styles:void 0};return d.styles=oi({theme:t,id:i,transform:s,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=oi({theme:e,id:i,transform:s,extend:c,matrix:d.matrix})}}}({theme:b,config:{id:"funnelChart"}}),r=function({layout:e,themeService:t}){const n=t.getStyles(),r=t=>e.components?.find(e=>e.key===t)??void 0;return{axis:{title:{getStyle:()=>({fontFamily:r("axis")?.axis?.title?.fontFamily??n.axis.title.fontFamily,fontSize:r("axis")?.axis?.title?.fontSize??n.axis.title.fontSize,fill:r("axis")?.axis?.title?.color?.color??n.axis.title.color})},label:{getStyle:()=>({fontSize:r("axis")?.axis?.label?.name?.fontSize??n.axis.label.name.fontSize,fontFamily:r("axis")?.axis?.label?.name?.fontFamily??n.axis.label.name.fontFamily,fill:r("axis")?.axis?.label?.name?.color?.color??n.axis.label.name.color})}},label:{value:{getStyle:()=>({fontSize:r("label")?.label?.value?.fontSize??n.label.value.fontSize,fontFamily:r("label")?.label?.value?.fontFamily??n.label.value.fontFamily,fill:r("label")?.label?.value?.color?.color??n.label.value.color,useContrastColor:r("label")?.label?.value?.useContrastColor??!0})}}}}({layout:y,themeService:n}),i=function({flags:e,layout:t,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:l}){const s=function(e){return{...e.getScales()}}(r),u=r.getPalettes(),c=function({layout:e,constraints:t,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor();return{type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:e.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}}}({layout:t,constraints:n,colorService:r,animationsEnabled:l}),d=[c,$o(e,t,i,l,o),Ho(e,t,o)];return{palettes:u,scales:s,components:a.extendComponents(d),formatters:{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}}({flags:t,layout:y,constraints:x,colorService:k,themeService:n,styleModel:r,pluginService:O,animationsEnabled:N});S.update({data:e,settings:i}),C.set("width",S.element.clientWidth),C.set("height",S.element.clientHeight),wi.cacheProperties({viewCache:C,layout:y})},[S,k,b.name(),O,x]),u(()=>{S&&(S.update(),C.set("width",S.element.clientWidth),C.set("height",S.element.clientHeight))},[w.width,w.height]),u(()=>{M&&M.setLayout(y)},[y]),v(e=>k.getSnapshotData().then(t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e)).catch(()=>e))}function Vo(n){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(y).forEach(t=>{e.add(y[t])})}}(n.translator);const r=e();r.use(t),r.component("funnel",C);const{flags:i}=n;return{ext:fi(n),qae:{properties:{initial:I},data:{targets:pi}},component(){Uo({picasso:r,flags:i})}}}export{Vo as default};
|
|
11
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,l,s,u,c,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=f-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%s,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-v+1)%s)&&b<f-s&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},_n($n={exports:{}}),$n.exports);function Bn(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const Un={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"},Vn=/%\)?$/,Wn=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Kn=/^\(oct\)/i,Jn=/^\(dec\)/i,Yn=/^\(hex\)/i,Gn=/^\(bin\)/i,Zn=/^\(rom\)/i,Xn=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Qn=/#|0/g;function er(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 tr(e,t,n){const r=Bn(e);return n?r:new RegExp(r||"",t)}function nr(e,t,n,r){let i,o,a,l,s,u,c,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=Bn(m)),h&&(h=Bn(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",l=a?p.substr(0,p.indexOf(a)):p,s=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(tr(u,"g"),t)),c=n,n=".",c&&(a=a.replace(tr(c,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(c);let v;g[1]&&(v=g[1].match(Qn)),e.prefix=l||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=v?v.length:2,e.percentage=Vn.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(tr(t,null,!0),"|").concat(tr(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class rr{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Un;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new rr(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});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],Xn.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Xn.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Xn.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||nr(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&nr(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&nr(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,l,s,u,c=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){let r;return Wn.test(t)?e=er(e,Number(/\d{2}/.exec(t)[0]),t,n):Kn.test(t)?e=er(e,8,t,n):Jn.test(t)?e=er(e,10,t,n):Yn.test(t)?e=er(e,16,t,n):Gn.test(t)?e=er(e,2,t,n):Zn.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),l=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=l[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(l=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&l<t.length;)l++,o=t[l];l>0&&(r=t[l-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,s=c.numericPattern,u=s.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==s.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=s.split(o)[0];if(n+=o,e=Hn(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(l=i.length;l<n;l++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(s+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=Hn(s,e)}e=e.replace(c.numericRegex,e=>e===a?c.groupTemp:e===o?c.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function ir(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,l=Object.create(null),s=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),o.get=e=>l[e],o.has=e=>e in l,o.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},o.size=()=>u,o}function or(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rr(...t)}(i,e,t,n,r),a=ir(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},l}const ar="D",lr="T",sr="TS",ur=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],cr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dr=["January","February","March","April","May","June","July","August","September","October","November","December"],fr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pr(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function hr(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class mr{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:ur,qDayNames:cr,qLongMonthNames:dr,qMonthNames:fr}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[lr]:r.qTimeFmt||"hh:mm:ss",[ar]:r.qDateFmt||"YYYY-MM-DD",[sr]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new mr(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*hr(t),r=60*hr(n),i=60*hr(r),o=1e3*hr(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,l=r.s,s=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(l+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:l,f:s,t:c}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:pr("".concat(a.year).slice(-2),2),YYY:pr("".concat(a.year).slice(-3),3),def:e=>pr("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:pr("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:pr("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>pr("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>pr("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>pr("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>pr("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const l=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&l.push(e);const s=new RegExp(l.join("|"),"g");return t.replace(s,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r})}}function gr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mr(...t)}function vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=gr(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=ir(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=gr(i,e,t),r=ir(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function yr(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return vr(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),or(n,r,i,o,t)}(t,i),f="dimension"===l?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function br(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),l={instance:yr(nn({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return l.attrDims=br("qAttrDimInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=br("qAttrExprInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=br("qMeasureInfo",t,n,a,nn({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l})}function xr(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=xr.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,l,r,o),hierarchy:e=>a.hierarchy(e,l,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=Fn,a.hierarchy=An,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=ln,a.pages=i.qDataPages,a.hierarchy=An):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,o);const s="S"===i.qMode?e=>e.qElemNumber:void 0,u="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...br("qDimensionInfo",i,e,"",nn({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...br("qMeasureInfo",i,e,"",nn({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const c=e=>{e.forEach(e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)})};return c(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=l.field(t.from),i=yr(Kt({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),l}const wr=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],qr=/\/qDimensionInfo(?:\/(\d+))?/,Dr=/\/qMeasureInfo\/(\d+)/,Sr=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,kr=/\/qAttrExprInfo\/(\d+)/,Cr=/\/?qHyperCube/,Mr=/\/?qTreeData/,Ir=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Nr=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function Er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},l=e.isActive();let s=!1;return e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;Cr.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Ir):Mr.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Nr);let l=!0;if(qr.test(e)&&(r=+qr.exec(e)[1]),Dr.test(e)&&(i=+Dr.exec(e)[1]),Sr.test(e)){i=-1,r=0;const e=+Sr.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(kr.test(e)){const e=i;if(t){i=0;const a=Dn(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+kr.exec(n)[1]}else r>-1?(r=-1,i=+kr.exec(n)[1]):i+=+kr.exec(n)[1]+1}return wr.forEach(e=>{let[t,r]=e;n=n.replace(t,r)}),l&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.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){const n=e.brush.ranges();n.length&&(s=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.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(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,l=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||l>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),s=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));s=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!s&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function Or(e){xr.util=e.data("matrix").util,e.data("q",xr),e.formatter("q-number",or),e.formatter("q-time",vr)}function Rr(e){var t=$t(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Lr(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Or.qBrushHelper=Er,Or.selections=Er;var Tr="Shift";var zr=function(e,t){return t[e]?zr(e+1,t):e},Pr=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=zr(r,n);return n[i]=!0,e[r]=i,e},{})};function jr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,l=i.qMeasureInfo,s=void 0===l?[]:l;return{dimensions:Pr(a,r.dimensions||[]),measures:Pr(s,r.measures||[])}}function Ar(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var Fr=[],_r=0,$r=function(e){var t=Fr.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()}))};function Hr(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,l=void 0===a?"selection":a,s=e.emit,u=void 0===s?"rangeClear":s,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof l&&t.brush(l).clear(),f)}var Br=["chart","document","selections","selectionInfo"],Ur=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=z(e,Br);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Vr(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Wr(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,l=e.selections,s=e.selectionEvents;if(!1===i||!1===s)return function(){};var u=i.reset,c=void 0===u?Vr:u,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?Ur:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(T({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,l=void 0===a?"discrete-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,emit:"areaClear",brushName:e.brushName})}(T(T({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,l=void 0===a?"continuous-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,brushName:e.brushName})}(T(T({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,l=void 0===a?"minorRange":a,s=e.cleared,u=void 0!==s&&s,c=e.brushName,d=Hr({selectionInfo:t,chart:n,document:r,eventName:u?void 0:l,componentName:o,brushName:void 0!==c&&c});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map(function(e){return e.id()}),g=n.brush(h),v=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&v.length&&v.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(T(T({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,l=e.cleared;Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(T(T({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,l=void 0===a?[]:a;if(n&&o.includes(n.event)){var s=n.currentComponent;n.previousComponent!==s&&(r.clear(),l.forEach(function(e){return t.brush(e).end()}))}}(T(T({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,l=e.componentName,s=void 0===l?"legend-range-brush":l,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Hr({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:s,brushName:void 0!==d&&d})&&i.clear()}(T(T({},t),e))}},t))}}({clear:d,selections:l,selectionInfo:r,chart:n}),p=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:c,actions:a}),h={};Object.entries(p).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];h[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,s[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,l=t.start,s={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(T(T({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof l?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];l(T(T({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},s),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:s,selections:l,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(h).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];null==l||l.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(h).forEach(function(e){var t=A(e,2),n=t[0],r=t[1];null==l||l.removeListener(n,r)})}}var Kr=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Jr(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,l=void 0!==a&&a,s=o.majorScale,u=void 0===s?void 0:s,c=o.selectionActions,d=void 0===c?{}:c,f=d.clear,p=d.reset,h=o.selectionEvents,m=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,g=o.brushEvents,v=void 0===g?{}:g,y=o.brushName,b=void 0===y?"selection":y,x=o.brushMaxListeners,w=void 0===x?20:x,q=o.brushRanges,D=void 0!==q&&q,S=o.interceptors,k=void 0===S?{}:S,C=o.selectionsFn,M=void 0===C?i.selections:C,I=t.brush(b);if("number"==typeof w&&I.setMaxListeners(w),D){var N=!0===D?Kr:D;I.configure({ranges:N})}var E={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,s=void 0===l?"/qHyperCubeDef":l;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var u=++_r,c=null,d={dimensions:[],measures:[]},f=[],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 h=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,l=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var s=e.filter(function(e){return-2!==e.value});if(s.length>1){var u=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=Rr({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,F(o))}),a.filter(Boolean)}({layout:l,values:s});return u}return s},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(s)});var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})}(n,v);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,p,c),t=jr({layout:c,filtered:d});e.forEach(function(e){var r=Ar({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,y),n.select(r)})})):r.on("update",function(){var e=a(r,p,c),t=jr({layout:c,filtered:d});e.forEach(function(e){n.select(Ar({selection:e,fieldMap:t}))})}),0===Fr.length&&document.addEventListener("keyup",$r),Fr.push({key:u,selections:n}),{layout:function(e){c=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=Fr.indexOf(Fr.filter(function(e){return e.key===u})[0]);-1!==e&&Fr.splice(e,1),Fr.length||document.removeEventListener("keyup",$r),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,v)}}}({brush:I,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=A(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:I,interceptors:k});var R=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,l=e.selectionEvents,s=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=A(e,2),o=i[0],a=i[1],l=function(){return a({chart:n,selectionInfo:r})};return t.on(o,l),[o,l]});return function(){a.forEach(function(e){var n=A(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=Wr({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:l}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==Tr||(t.lasso.action(!0),n=!0)},i=function(e){e.key===Tr&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){s(),u(),c()}}({chart:t,brush:I,actions:n,selections:r,selectionInfo:E.selectionInfo,selectionActions:{clear:f,reset:p},selectionEvents:m,brushEvents:v});if(l){var L=!0===l?F(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):l;O.allowSimultaneous(L)}return{unbindEvents:R,state:E,picassoSelections:O,brush:I}}var Yr=["colorField","useLegendCube"];function Gr(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,l=Jr({chart:t,actions:i,selections:n,picassoQ:Or,config:a}),s=l.unbindEvents,u=l.state,c=l.picassoSelections,d=l.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,v=void 0===g?Lr: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:function(){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"===_(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}(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},getSelectionsObject:function(){return n},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,l={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var s=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===s?[]:s;return l.lockedDimensions=u.map(function(e){return!!e.qLocked}),l.singleSelectDimensions=u.map(function(e,t){return Rr({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),l.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=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});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),l.canSelect=0===u.length||u.some(function(e){return!e.qLocked}),l.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),l}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setFilteredFields:function(e){c.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=z(e,Yr),o=T({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);v(T(T({},o),{},{defaultFunc:function(){return Lr(o)}}))},destroy:function(){s(),c.release()},custom:T({},p)}}var Zr="'Source Sans Pro', 'Arial', 'sans-serif'",Xr="#333333",Qr="#595959",ei="#737373",ti="#cccccc",ni="#e6e6e6";function ri(e){var t={};return[].concat(F(e),F([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Qr],["object","axis.label.name","fontFamily",Zr],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",ti],["object","axis.line.minor","color",ni],["object","axis.title","color"],["object","axis.title","fontFamily",Zr],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ni],["object","grid.line.major","color",ti],["object","grid.line.minor","color",ni],["object","label.value","color",Qr],["object","label.value","fontFamily",Zr],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Qr],[!1,"label.value","lightColor",ni],["object","outOfRange","color","#999"],["object","legend.title","color",Xr],["object","legend.title","fontFamily",Zr],["object","legend.title","fontSize","15px"],["object","legend.label","color",Qr],["object","legend.label","fontFamily",Zr],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Xr],["object","referenceLine.label.name","fontFamily",Zr],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ni],["object","referenceLine.outOfBounds","fontFamily",Zr],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",ei,function(e){return"transparent"===e?ei:e}]])).reduce(function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e},[]).sort(function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)})}var ii=function(e){return e};function oi(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},l=r.reduce(function(e,t){var n=A(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=A(e,5),i=r[0],o=r[1],s=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var l=t.getStyle(n,r,i);return void 0===l?a:l}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:s,defaultValue:u}),p=(l["".concat(o,".").concat(s)]||ii)(d(f));Bt(a,[o,s].filter(Boolean).join("."),p)}),i.forEach(function(e){var t=A(e,2),n=t[0],r=t[1];Bt(a,n,r)}),a}function ai(e,t,n){const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",e,"color")})}}}}}function li(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),l=a.id,s=a.paths,u={};s.forEach(function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var s=r[a];a===r.length-1?i[s]=le({theme:t,translator:n,id:l,path:e,flags:o}):void 0===i[s]&&(i[s]={}),i=i[s]}});var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:ai("axis.title",r,e)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:ai("axis.label.name",r,e)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...ai("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const si={uses:"sorting"},ui=(e,t,n)=>{const r=n?.sense?.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...t?.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING")&&{funnelStyling:li(r,t,e)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},ci={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function di({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:ci,sorting:si,settings:ui(e,t,n)}}}function fi(e){return{definition:di(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const pi=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mi,gi;var vi=function(){if(gi)return mi;gi=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return mi=function e(){var t,n,r,s,u,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},mi}(),yi=hi(vi),bi={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function xi(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...l}=t,s=yi(!0,{},{...n,qHyperCube:{...l}}),{dataRelatedPropertiesPaths:u}=bi;function c(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==$t(e,t)&&Bt(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;$t(e,r,[]).forEach(e=>{o&&c(e,o)})}return u.forEach(e=>{c(s,e)}),s}var wi={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:l})=>{const s=a.x-l.x,u=a.y-l.y,c=a.width-l.width,d=a.height-l.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=s,e.x2-=s):"text"===e.type&&(e.x-=s)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=s,e.x2+=s+c)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let l=-r,s=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(l=t.width);break;case"left":o<0&&(l=-n.width);break;case"top":a<0&&(s=-n.height);break;case"bottom":i>0&&(s=t.height)}switch(e.type){case"text":case"rect":e.x+=l,e.y+=s;break;case"circle":e.cx+=l,e.cy+=s;break;case"path":e.transform=`translate(${l}, ${s})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=xi(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=xi(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function qi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Di(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Si(){}[["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}]].forEach(([e,{width:t,height:n}])=>{});var ki=.7,Ci=1/ki,Mi="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ei=/^#([0-9a-f]{3,8})$/,Oi=new RegExp(`^rgb\\(${Mi},${Mi},${Mi}\\)$`),Ri=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),Li=new RegExp(`^rgba\\(${Mi},${Mi},${Mi},${Ii}\\)$`),Ti=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${Ii}\\)$`),zi=new RegExp(`^hsl\\(${Ii},${Ni},${Ni}\\)$`),Pi=new RegExp(`^hsla\\(${Ii},${Ni},${Ni},${Ii}\\)$`),ji={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 Ai(){return this.rgb().formatHex()}function Fi(){return this.rgb().formatRgb()}function _i(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ei.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?$i(t):3===n?new Ui(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Hi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Hi(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=Oi.exec(e))?new Ui(t[1],t[2],t[3],1):(t=Ri.exec(e))?new Ui(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Li.exec(e))?Hi(t[1],t[2],t[3],t[4]):(t=Ti.exec(e))?Hi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zi.exec(e))?Gi(t[1],t[2]/100,t[3]/100,1):(t=Pi.exec(e))?Gi(t[1],t[2]/100,t[3]/100,t[4]):ji.hasOwnProperty(e)?$i(ji[e]):"transparent"===e?new Ui(NaN,NaN,NaN,0):null}function $i(e){return new Ui(e>>16&255,e>>8&255,255&e,1)}function Hi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ui(e,t,n,r)}function Bi(e){return e instanceof Si||(e=_i(e)),e?new Ui((e=e.rgb()).r,e.g,e.b,e.opacity):new Ui}function Ui(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Vi(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}`}function Wi(){const e=Ki(this.opacity);return`${1===e?"rgb(":"rgba("}${Ji(this.r)}, ${Ji(this.g)}, ${Ji(this.b)}${1===e?")":`, ${e})`}`}function Ki(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ji(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yi(e){return((e=Ji(e))<16?"0":"")+e.toString(16)}function Gi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Xi(e,t,n,r)}function Zi(e){if(e instanceof Xi)return new Xi(e.h,e.s,e.l,e.opacity);if(e instanceof Si||(e=_i(e)),!e)return new Xi;if(e instanceof Xi)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Xi(a,l,s,e.opacity)}function Xi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Qi(e){return(e=(e||0)%360)<0?e+360:e}function eo(e){return Math.max(0,Math.min(1,e||0))}function to(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}qi(Si,_i,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ai,formatHex:Ai,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Zi(this).formatHsl()},formatRgb:Fi,toString:Fi}),qi(Ui,function(e,t,n,r){return 1===arguments.length?Bi(e):new Ui(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return e=null==e?Ci:Math.pow(Ci,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ki:Math.pow(ki,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(Ji(this.r),Ji(this.g),Ji(this.b),Ki(this.opacity))},displayable(){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:Vi,formatHex:Vi,formatHex8:function(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}${Yi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Wi,toString:Wi})),qi(Xi,function(e,t,n,r){return 1===arguments.length?Zi(e):new Xi(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return e=null==e?Ci:Math.pow(Ci,e),new Xi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ki:Math.pow(ki,e),new Xi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ui(to(e>=240?e-240:e+120,i,r),to(e,i,r),to(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Xi(Qi(this.h),eo(this.s),eo(this.l),Ki(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ki(this.opacity);return`${1===e?"hsl(":"hsla("}${Qi(this.h)}, ${100*eo(this.s)}%, ${100*eo(this.l)}%${1===e?")":`, ${e})`}`}}));const no=Math.PI/180,ro=180/Math.PI,io=.96422,oo=.82521,ao=4/29,lo=6/29,so=3*lo*lo,uo=lo*lo*lo;function co(e){if(e instanceof fo)return new fo(e.l,e.a,e.b,e.opacity);if(e instanceof yo)return bo(e);e instanceof Ui||(e=Bi(e));var t,n,r=go(e.r),i=go(e.g),o=go(e.b),a=po((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=po((.4360747*r+.3850649*i+.1430804*o)/io),n=po((.0139322*r+.0971045*i+.7141733*o)/oo)),new fo(116*a-16,500*(t-a),200*(a-n),e.opacity)}function fo(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function po(e){return e>uo?Math.pow(e,1/3):e/so+ao}function ho(e){return e>lo?e*e*e:so*(e-ao)}function mo(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function go(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vo(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof yo)return new yo(e.h,e.c,e.l,e.opacity);if(e instanceof fo||(e=co(e)),0===e.a&&0===e.b)return new yo(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ro;return new yo(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new yo(e,t,n,null==r?1:r)}function yo(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function bo(e){if(isNaN(e.h))return new fo(e.l,0,0,e.opacity);var t=e.h*no;return new fo(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}qi(fo,function(e,t,n,r){return 1===arguments.length?co(e):new fo(e,t,n,null==r?1:r)},Di(Si,{brighter(e){return new fo(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new fo(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){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 Ui(mo(3.1338561*(t=io*ho(t))-1.6168667*(e=1*ho(e))-.4906146*(n=oo*ho(n))),mo(-.9787684*t+1.9161415*e+.033454*n),mo(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),qi(yo,vo,Di(Si,{brighter(e){return new yo(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new yo(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return bo(this).rgb()}}));var xo,wo,qo={isDark:function(e){return vo(e).l<70}};function Do(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}1===(xo=Do).length&&(wo=xo,xo=function(e,t){return Do(wo(e),t)});var So="$";function ko(){}function Co(e,t){var n=new ko;if(e instanceof ko)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Mo(){}ko.prototype=Co.prototype={constructor:ko,has:function(e){return So+e in this},get:function(e){return this[So+e]},set:function(e,t){return this[So+e]=t,this},remove:function(e){var t=So+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===So&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===So&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===So&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===So&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===So&&++e;return e},empty:function(){for(var e in this)if(e[0]===So)return!1;return!0},each:function(e){for(var t in this)t[0]===So&&e(this[t],t.slice(1),this)}};var Io=Co.prototype;Mo.prototype={constructor:Mo,has:Io.has,add:function(e){return this[So+(e+="")]=e,this},remove:Io.remove,clear:Io.clear,values:Io.keys,size:Io.size,empty:Io.empty,each:Io.each},yi.bind(null,!0);const No=[[2,4,6],[2,4],[3]],Eo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Oo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Ro(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Oo(e[r],t,n)}function Lo(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}!function(){let e,t;for(Ro(No,1,10),e=0;e<Eo.length;e++)if(Eo[e])for(t=0;t<Eo[e].length;t++)Array.isArray(Eo[e][t])&&Ro(Eo[e][t])}();var To=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},zo=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return To.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return To.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||To.newInstanceIfNeeded(e,t,this._value)}},Po=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new zo);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new Po;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);function jo(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Ao(e){return e.formatter("num")(e.node.data.num.value)}function Fo({data:e}){return e?e.label:""}function _o(e){if(e.dataPoint.auto)return jo;switch(e.dataPoint.labelMode){case"share":default:return jo;case"value":return Ao;case"none":return null}}function $o(e,t,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),l=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:Lo(e,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Fo}],linkData:e=>`${e.data.value} ${Fo(e)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:e})=>(e=>qo.isDark(e.desc.fill)?l.lightColor:l.darkColor)(e):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:_o(t)}],linkData:e=>"none"===t.dataPoint.labelMode?Math.random():`${e.data.value} ${_o(t)(e)}`}}}]},animations:{enabled:r,trackBy:e=>e.data}}}function Ho(e,t,n){if(!t.showDimensionTitle||!t.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=t.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:Lo(e,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function Bo({picasso:e,flags:t}){const y=c(),b=d(),x=f(),w=p(),q=h(),D=m().qLocaleInfo,[S,k,C,M]=function({picasso:e}){const t=n(),c=r(),d=i(),f=o(),p=a(),h=l(),[m,g]=s(),[v,y]=s(),[b,x]=s(),[w,q]=s();return u(()=>{const n=At({picasso:e,model:d,app:f,translator:p,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const r=e({renderer:{prio:[h.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),i=Gr({chart:r,selections:c,config:{selectionActions:!1}});return x(i),y(n),g(r),q(function(){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={}}}}()),()=>{i.destroy(),r.destroy()}},[]),[m,v,b,w]}({picasso:e}),I=l(),N=()=>{const e=S.element.clientWidth!==M.get("width")||S.element.clientHeight!==M.get("height");return!1!==I.chartAnimations&&!e&&!wi.propertiesHaveChanged({viewCache:M,layout:y})},[E]=g(()=>{if(!k)return Promise.resolve();const t=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(y),n=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return O(P().m(function e(){var r,a,l,s;return P().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=O(P().m(function e(n){var r;return P().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(T({},i));case 2:if("object"===_(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),l=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(T({},i))})),e.n=2,Promise.all([a,l]);case 2:s=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,F(s[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=A(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=ce(!0,{},n.brush);ce(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===_(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Ut({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Ut({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:e,plugins:q,pluginArgs:t});return Promise.all([k.initialize({createConfig:({getUseBaseColors:e})=>({theme:b,colorProps:{...y.color,useBaseColors:e(y)},layout:y,hc:y.qHyperCube})}),n.initialize()]).then(()=>n)},[y,k]);u(()=>{if(!S||!k||!E)return;const e=[{type:"q",key:"qHyperCube",data:y.qHyperCube,config:{localeInfo:D}},...k.getData()],n=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:ri(a),styles:void 0};return d.styles=oi({theme:t,id:i,transform:s,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=oi({theme:e,id:i,transform:s,extend:c,matrix:d.matrix})}}}({theme:b,config:{id:"funnelChart"}}),r=function({layout:e,themeService:t}){const n=t.getStyles(),r=t=>e.components?.find(e=>e.key===t)??void 0;return{axis:{title:{getStyle:()=>({fontFamily:r("axis")?.axis?.title?.fontFamily??n.axis.title.fontFamily,fontSize:r("axis")?.axis?.title?.fontSize??n.axis.title.fontSize,fill:r("axis")?.axis?.title?.color?.color??n.axis.title.color})},label:{getStyle:()=>({fontSize:r("axis")?.axis?.label?.name?.fontSize??n.axis.label.name.fontSize,fontFamily:r("axis")?.axis?.label?.name?.fontFamily??n.axis.label.name.fontFamily,fill:r("axis")?.axis?.label?.name?.color?.color??n.axis.label.name.color})}},label:{value:{getStyle:()=>({fontSize:r("label")?.label?.value?.fontSize??n.label.value.fontSize,fontFamily:r("label")?.label?.value?.fontFamily??n.label.value.fontFamily,fill:r("label")?.label?.value?.color?.color??n.label.value.color,useContrastColor:r("label")?.label?.value?.useContrastColor??!0})}}}}({layout:y,themeService:n}),i=function({flags:e,layout:t,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:l}){const s=function(e){return{...e.getScales()}}(r),u=r.getPalettes(),c=function({layout:e,constraints:t,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor();return{type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:e.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}}}({layout:t,constraints:n,colorService:r,animationsEnabled:l}),d=[c,$o(e,t,i,l,o),Ho(e,t,o)];return{palettes:u,scales:s,components:a.extendComponents(d),formatters:{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}}({flags:t,layout:y,constraints:x,colorService:k,themeService:n,styleModel:r,pluginService:E,animationsEnabled:N});S.update({data:e,settings:i}),M.set("width",S.element.clientWidth),M.set("height",S.element.clientHeight),wi.cacheProperties({viewCache:M,layout:y})},[S,k,b.name(),E,x]),u(()=>{S&&(S.update(),M.set("width",S.element.clientWidth),M.set("height",S.element.clientHeight))},[w.width,w.height]),u(()=>{C&&C.setLayout(y)},[y]),v(e=>k.getSnapshotData().then(t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e)).catch(()=>e))}function Uo(n){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(y).forEach(t=>{e.add(y[t])})}}(n.translator);const r=e();r.use(t),r.component("funnel",M);const{flags:i}=n;return{ext:fi(n),qae:{properties:{initial:I},data:{targets:pi}},component(){Bo({picasso:r,flags:i})}}}export{Uo as default};
|