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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-pie-chart v1.11.16
2
+ * @nebula.js/sn-pie-chart v1.11.17
3
3
  * Copyright (c) 2021 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as d,StylesProvider as f,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as y,useState as v,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as M,usePlugins as S,useEmbed as E,useTheme as I,useConstraints as T,useAppLayout as A,usePromise as O,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var N={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}const R=(e,t,r,n,o)=>e?e.getStyle(t,r,n):o;var F=Object.freeze({__proto__:null,getThemeStyle:R});function V(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _=Object.prototype.hasOwnProperty,H=Object.prototype.toString,z=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===H.call(e)},W=function(e){if(!e||"[object Object]"!==H.call(e))return!1;var t,r=_.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||_.call(e,t)},$=function(e,t){z&&"__proto__"===t.name?z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Y=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(U)return U(e,t).value}return e[t]},K=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Y(s,r),s!==(o=Y(t,r))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=n&&B(n)?n:[]):a=n&&W(n)?n:{},$(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:r,newValue:o}));return s};const J="center",Z="bottom";var G={NoDataExist:{label:"NoDataExist",alignment:J,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:J,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:J,default:!1},LimitedData:{label:"LimitedData",alignment:Z,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:Z,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:Z,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:Z,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Q={};X.forEach((([e,{width:t,height:r}])=>{Q[e]={width:t,height:r}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let r;for(r=0;r<X.length;++r)if(e>=X[r][1].width&&t>=X[r][1].height)return X[r][0];return"SPARK"}};function te(e,t){return{layoutModes:ee.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const re=(e,t,r)=>{const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(void 0===i[n[o]])return r;i=i[n[o]]}return i};function ne(e,t){const r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}function oe(){if(!document.querySelector("#la-vie-tooltip")){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ie({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){oe()},beforeUpdate(){oe()},destroyed(){!function(){const e=document.querySelector("#la-vie-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#la-vie-tooltip"),content:({h:e,data:t,style:r})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:r}){return e.map((e=>{const n={style:{...r.cell||{},...e.style||{}},class:e.class};return e.colspan&&(n.colspan=e.colspan),t("td",n,e.content)}))}(t,{h:e,style:r})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const ae=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),se=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),le=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ue={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ae.test(e),isRtlChar:e=>se.test(e)||le.test(e),detectTextDirection(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],ue.isLtrChar(n))return"ltr";if(ue.isRtlChar(n))return"rtl"}return"ltr"}},ce={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,r){const n=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(r.coloring.label&&(a.label=""+r.coloring.label),"color"!==r.coloring.type&&n.fillTooltip){const e=o("fill"),t="measure"===r.coloring.fieldType;if(a.value=t&&e?e(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){const e=i(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===n._fillColor?ce.getNodeFillColor(t):n._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const r=ue.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow(e,t){const r=ue.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:r},colspan:2},{}]},getNMoreRow(e,t,r){const n=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:n,style:{"font-weight":"bold","text-align":r?"right":"left",direction:ue.detectTextDirection(n)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,r){const n=ue.detectTextDirection(t.color.label),o=r?[":",t.color.label]:[t.color.label,":"],i=ue.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":r?"right":"left",direction:n}},{content:r?[t.color.value,ce.getColorSymbol(e,t)]:[ce.getColorSymbol(e,t),t.color.value],style:{"text-align":r?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,r,n,o=!1){const i=ue.detectTextDirection(e.label),a=n?[":",e.label]:[e.label,":"],s=ue.detectTextDirection(e.value);let l;return l=o?n?[e.value,ce.getColorSymbol(t,r)]:[ce.getColorSymbol(t,r),e.value]:[e.value],[{content:a,style:{"text-align":n?"right":"left",direction:i}},{content:l,style:{"text-align":n?"left":"right",direction:s,"vertical-align":"middle"}}]}};function pe(e,t,r,n){const o=parseInt(R(e,t,r,n),10);if(!isNaN(o))return o}const de=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function fe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((r=>function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?R(t,r,"label.value","color"):de(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId))),fontSize:pe(t,e.themeId,"label.value","fontSize"),fontFamily:R(t,e.themeId,"label.value","fontFamily"),label:e.label}}function me(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function he(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ge(){}var ye=1/.7,ve="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qe=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),Ce=new RegExp("^rgb\\("+[xe,xe,xe]+"\\)$"),we=new RegExp("^rgba\\("+[ve,ve,ve,be]+"\\)$"),Me=new RegExp("^rgba\\("+[xe,xe,xe,be]+"\\)$"),Se=new RegExp("^hsl\\("+[be,xe,xe]+"\\)$"),Ee=new RegExp("^hsla\\("+[be,xe,xe,be]+"\\)$"),Ie={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Te(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Oe(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?je(t):3===r?new Ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ke(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=De.exec(e))?new Ne(t[1],t[2],t[3],1):(t=Ce.exec(e))?new Ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=we.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=Me.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Se.exec(e))?Ve(t[1],t[2]/100,t[3]/100,1):(t=Ee.exec(e))?Ve(t[1],t[2]/100,t[3]/100,t[4]):Ie.hasOwnProperty(e)?je(Ie[e]):"transparent"===e?new Ne(NaN,NaN,NaN,0):null}function je(e){return new Ne(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ne(e,t,r,n)}function Le(e){return e instanceof ge||(e=Oe(e)),e?new Ne((e=e.rgb()).r,e.g,e.b,e.opacity):new Ne}function Ne(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Pe(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function Re(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Fe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ve(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,r,n)}function _e(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof ge||(e=Oe(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new He(a,s,l,e.opacity)}function He(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ze(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}me(ge,Oe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHsl:function(){return _e(this).formatHsl()},formatRgb:Ae,toString:Ae}),me(Ne,(function(e,t,r,n){return 1===arguments.length?Le(e):new Ne(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pe,formatHex:Pe,formatRgb:Re,toString:Re})),me(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Ne(ze(e>=240?e-240:e+120,o,n),ze(e,o,n),ze(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ue=Math.PI/180,Be=180/Math.PI,We=4/29,$e=6/29,Ye=3*$e*$e;function Ke(e){if(e instanceof Je)return new Je(e.l,e.a,e.b,e.opacity);if(e instanceof rt)return nt(e);e instanceof Ne||(e=Le(e));var t,r,n=Qe(e.r),o=Qe(e.g),i=Qe(e.b),a=Ze((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=Ze((.4360747*n+.3850649*o+.1430804*i)/.96422),r=Ze((.0139322*n+.0971045*o+.7141733*i)/.82521)),new Je(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Je(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ze(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ye+We}function Ge(e){return e>$e?e*e*e:Ye*(e-We)}function Xe(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Qe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function et(e){if(e instanceof rt)return new rt(e.h,e.c,e.l,e.opacity);if(e instanceof Je||(e=Ke(e)),0===e.a&&0===e.b)return new rt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Be;return new rt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function tt(e,t,r,n){return 1===arguments.length?et(e):new rt(e,t,r,null==n?1:n)}function rt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function nt(e){if(isNaN(e.h))return new Je(e.l,0,0,e.opacity);var t=e.h*Ue;return new Je(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function ot(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}me(Je,(function(e,t,r,n){return 1===arguments.length?Ke(e):new Je(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return new Je(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Je(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Ne(Xe(3.1338561*(t=.96422*Ge(t))-1.6168667*(e=1*Ge(e))-.4906146*(r=.82521*Ge(r))),Xe(-.9787684*t+1.9161415*e+.033454*r),Xe(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),me(rt,tt,he(ge,{brighter:function(e){return new rt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new rt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return nt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return ot(e(t),r)}}(e))}(ot);function it(){}function at(e,t){var r=new it;if(e instanceof it)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,o=-1,i=e.length;if(null==t)for(;++o<i;)r.set(o,e[o]);else for(;++o<i;)r.set(t(n=e[o],o,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function st(){}it.prototype=at.prototype={constructor:it,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var lt=at.prototype;function ut(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ct(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function pt(){}st.prototype={constructor:st,has:lt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:lt.remove,clear:lt.clear,values:lt.keys,size:lt.size,empty:lt.empty,each:lt.each};var dt=1/.7,ft="\\s*([+-]?\\d+)\\s*",mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ht="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gt=/^#([0-9a-f]{3})$/,yt=/^#([0-9a-f]{6})$/,vt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),bt=new RegExp("^rgb\\("+[ht,ht,ht]+"\\)$"),xt=new RegExp("^rgba\\("+[ft,ft,ft,mt]+"\\)$"),qt=new RegExp("^rgba\\("+[ht,ht,ht,mt]+"\\)$"),Dt=new RegExp("^hsl\\("+[mt,ht,ht]+"\\)$"),Ct=new RegExp("^hsla\\("+[mt,ht,ht,mt]+"\\)$"),wt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mt(e){var t;return e=(e+"").trim().toLowerCase(),(t=gt.exec(e))?new Tt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=yt.exec(e))?St(parseInt(t[1],16)):(t=vt.exec(e))?new Tt(t[1],t[2],t[3],1):(t=bt.exec(e))?new Tt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xt.exec(e))?Et(t[1],t[2],t[3],t[4]):(t=qt.exec(e))?Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Dt.exec(e))?Ot(t[1],t[2]/100,t[3]/100,1):(t=Ct.exec(e))?Ot(t[1],t[2]/100,t[3]/100,t[4]):wt.hasOwnProperty(e)?St(wt[e]):"transparent"===e?new Tt(NaN,NaN,NaN,0):null}function St(e){return new Tt(e>>16&255,e>>8&255,255&e,1)}function Et(e,t,r,n){return n<=0&&(e=t=r=NaN),new Tt(e,t,r,n)}function It(e){return e instanceof pt||(e=Mt(e)),e?new Tt((e=e.rgb()).r,e.g,e.b,e.opacity):new Tt}function Tt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function At(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ot(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,r,n)}function jt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof pt||(e=Mt(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new kt(a,s,l,e.opacity)}function kt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Lt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ut(pt,Mt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),ut(Tt,(function(e,t,r,n){return 1===arguments.length?It(e):new Tt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+At(this.r)+At(this.g)+At(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),ut(kt,(function(e,t,r,n){return 1===arguments.length?jt(e):new kt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new kt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Tt(Lt(e>=240?e-240:e+120,o,n),Lt(e,o,n),Lt(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Nt=Math.PI/180,Pt=180/Math.PI,Rt=4/29,Ft=6/29,Vt=3*Ft*Ft;function _t(e){if(e instanceof Ht)return new Ht(e.l,e.a,e.b,e.opacity);if(e instanceof Yt){if(isNaN(e.h))return new Ht(e.l,0,0,e.opacity);var t=e.h*Nt;return new Ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Tt||(e=It(e));var r,n,o=Wt(e.r),i=Wt(e.g),a=Wt(e.b),s=zt((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?r=n=s:(r=zt((.4360747*o+.3850649*i+.1430804*a)/.96422),n=zt((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Ht(116*s-16,500*(r-s),200*(s-n),e.opacity)}function Ht(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function zt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Vt+Rt}function Ut(e){return e>Ft?e*e*e:Vt*(e-Rt)}function Bt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function $t(e){if(e instanceof Yt)return new Yt(e.h,e.c,e.l,e.opacity);if(e instanceof Ht||(e=_t(e)),0===e.a&&0===e.b)return new Yt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Pt;return new Yt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Yt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}ut(Ht,(function(e,t,r,n){return 1===arguments.length?_t(e):new Ht(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Ht(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ht(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Tt(Bt(3.1338561*(t=.96422*Ut(t))-1.6168667*(e=1*Ut(e))-.4906146*(r=.82521*Ut(r))),Bt(-.9787684*t+1.9161415*e+.033454*r),Bt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ut(Yt,(function(e,t,r,n){return 1===arguments.length?$t(e):new Yt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Yt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Yt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return _t(this).rgb()}}));var Kt=-.29227,Jt=-.90649,Zt=1.97294,Gt=Zt*Jt,Xt=1.78277*Zt,Qt=-.6557636667999999;function er(e){if(e instanceof tr)return new tr(e.h,e.s,e.l,e.opacity);e instanceof Tt||(e=It(e));var t=e.r/255,r=e.g/255,n=e.b/255,o=(Qt*n+Gt*t-Xt*r)/(Qt+Gt-Xt),i=n-o,a=(Zt*(r-o)-Kt*i)/Jt,s=Math.sqrt(a*a+i*i)/(Zt*o*(1-o)),l=s?Math.atan2(a,i)*Pt-120:NaN;return new tr(l<0?l+360:l,s,o,e.opacity)}function tr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function rr(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}ut(tr,(function(e,t,r,n){return 1===arguments.length?er(e):new tr(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new tr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new tr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Nt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),o=Math.sin(e);return new Tt(255*(t+r*(-.14861*n+1.78277*o)),255*(t+r*(Kt*n+Jt*o)),255*(t+r*(Zt*n)),this.opacity)}}));var nr,or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ir(e){return new ar(e)}function ar(e){if(!(t=or.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function sr(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}ir.prototype=ar.prototype,ar.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var lr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return sr(100*e,t)},r:sr,s:function(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1],i=o-(nr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+rr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ur(e){return e}var cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pr(e){var t,r,n=e.grouping&&e.thousands?(t=e.grouping,r=e.thousands,function(e,n){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return i.reverse().join(r)}):ur,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):ur,s=e.percent||"%";function l(e){var t=(e=ir(e)).fill,r=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):lr[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=lr[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,r=e.length,n=1,o=-1;n<r;++n)switch(e[n]){case".":o=t=n;break;case"0":0===o&&(o=n),t=n;break;default:if(o>0){if(!+e[n])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?cr[8+nr/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var r=l(((e=ir(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=rr(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-n),i=cr[8+n/3];return function(e){return r(o*e)+i}}}}!function(e){pr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var dr=new Date,fr=new Date;function mr(e,t,r,n){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},o.round=function(e){var t=o(e),r=o.ceil(e);return e-t<r-e?t:r},o.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},o.range=function(r,n,i){var a,s=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return s;do{s.push(a=new Date(+r)),t(r,i),e(r)}while(a<r&&r<n);return s},o.filter=function(r){return mr((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(o.count=function(t,n){return dr.setTime(+t),fr.setTime(+n),e(dr),e(fr),Math.floor(r(dr,fr))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(n?function(t){return n(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var hr=mr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));hr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):hr:null};mr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),mr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),mr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var gr=mr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function yr(e){return mr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var vr=yr(0),br=yr(1);yr(2),yr(3);var xr=yr(4);yr(5),yr(6),mr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var qr=mr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));qr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},mr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),mr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}));var Dr=mr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Cr(e){return mr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var wr=Cr(0),Mr=Cr(1);Cr(2),Cr(3);var Sr=Cr(4);Cr(5),Cr(6),mr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));var Er=mr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Ir(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Tr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ar(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var Or,jr,kr,Lr={"-":"",_:" ",0:"0"},Nr=/^\s*\d+/,Pr=/^%/,Rr=/[\\^$*+?|[\]().{}]/g;function Fr(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(t)+o:o)}function Vr(e){return e.replace(Rr,"\\$&")}function _r(e){return new RegExp("^(?:"+e.map(Vr).join("|")+")","i")}function Hr(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function zr(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ur(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Br(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $r(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Yr(e,t,r){var n=Nr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Kr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Jr(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Zr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Gr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Xr(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Qr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function en(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function tn(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function rn(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function nn(e,t,r){var n=Nr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function on(e,t,r){var n=Pr.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function an(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function sn(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function ln(e,t){return Fr(e.getDate(),t,2)}function un(e,t){return Fr(e.getHours(),t,2)}function cn(e,t){return Fr(e.getHours()%12||12,t,2)}function pn(e,t){return Fr(1+gr.count(qr(e),e),t,3)}function dn(e,t){return Fr(e.getMilliseconds(),t,3)}function fn(e,t){return dn(e,t)+"000"}function mn(e,t){return Fr(e.getMonth()+1,t,2)}function hn(e,t){return Fr(e.getMinutes(),t,2)}function gn(e,t){return Fr(e.getSeconds(),t,2)}function yn(e){var t=e.getDay();return 0===t?7:t}function vn(e,t){return Fr(vr.count(qr(e),e),t,2)}function bn(e,t){var r=e.getDay();return e=r>=4||0===r?xr(e):xr.ceil(e),Fr(xr.count(qr(e),e)+(4===qr(e).getDay()),t,2)}function xn(e){return e.getDay()}function qn(e,t){return Fr(br.count(qr(e),e),t,2)}function Dn(e,t){return Fr(e.getFullYear()%100,t,2)}function Cn(e,t){return Fr(e.getFullYear()%1e4,t,4)}function wn(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fr(t/60|0,"0",2)+Fr(t%60,"0",2)}function Mn(e,t){return Fr(e.getUTCDate(),t,2)}function Sn(e,t){return Fr(e.getUTCHours(),t,2)}function En(e,t){return Fr(e.getUTCHours()%12||12,t,2)}function In(e,t){return Fr(1+Dr.count(Er(e),e),t,3)}function Tn(e,t){return Fr(e.getUTCMilliseconds(),t,3)}function An(e,t){return Tn(e,t)+"000"}function On(e,t){return Fr(e.getUTCMonth()+1,t,2)}function jn(e,t){return Fr(e.getUTCMinutes(),t,2)}function kn(e,t){return Fr(e.getUTCSeconds(),t,2)}function Ln(e){var t=e.getUTCDay();return 0===t?7:t}function Nn(e,t){return Fr(wr.count(Er(e),e),t,2)}function Pn(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Sr(e):Sr.ceil(e),Fr(Sr.count(Er(e),e)+(4===Er(e).getUTCDay()),t,2)}function Rn(e){return e.getUTCDay()}function Fn(e,t){return Fr(Mr.count(Er(e),e),t,2)}function Vn(e,t){return Fr(e.getUTCFullYear()%100,t,2)}function _n(e,t){return Fr(e.getUTCFullYear()%1e4,t,4)}function Hn(){return"+0000"}function zn(){return"%"}function Un(e){return+e}function Bn(e){return Math.floor(+e/1e3)}!function(e){Or=function(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=_r(o),c=Hr(o),p=_r(i),d=Hr(i),f=_r(a),m=Hr(a),h=_r(s),g=Hr(s),y=_r(l),v=Hr(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ln,e:ln,f:fn,H:un,I:cn,j:pn,L:dn,m:mn,M:hn,p:function(e){return o[+(e.getHours()>=12)]},Q:Un,s:Bn,S:gn,u:yn,U:vn,V:bn,w:xn,W:qn,x:null,X:null,y:Dn,Y:Cn,Z:wn,"%":zn},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Mn,e:Mn,f:An,H:Sn,I:En,j:In,L:Tn,m:On,M:jn,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Un,s:Bn,S:kn,u:Ln,U:Nn,V:Pn,w:Rn,W:Fn,x:null,X:null,y:Vn,Y:_n,Z:Hn,"%":zn},q={a:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=m[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=d[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.m=v[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return w(e,t,r,n)},d:Gr,e:Gr,f:nn,H:Qr,I:Qr,j:Xr,L:rn,m:Zr,M:en,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:an,s:sn,S:tn,u:Ur,U:Br,V:Wr,w:zr,W:$r,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:Kr,Y:Yr,Z:Jr,"%":on};function D(e,t){return function(r){var n,o,i,a=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Lr[n=e.charAt(++s)])?n=e.charAt(++s):o="e"===n?" ":"0",(i=t[n])&&(n=i(r,o)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(r){var n,o,i=Ar(1900);if(w(i,e,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(n=Tr(Ar(i.y))).getUTCDay(),n=o>4||0===o?Mr.ceil(n):Mr(n),n=Dr.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(o=(n=t(Ar(i.y))).getDay(),n=o>4||0===o?br.ceil(n):br(n),n=gr.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Tr(Ar(i.y)).getUTCDay():t(Ar(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Tr(i)):t(i)}}function w(e,t,r,n){for(var o,i,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Lr?t.charAt(a++):o])||(n=i(e,r,n))<0)return-1}else if(o!=r.charCodeAt(n++))return-1}return n}return b.x=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Ir);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,Tr);return t.toString=function(){return e},t}}}(e),jr=Or.utcFormat,kr=Or.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||jr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||kr("%Y-%m-%dT%H:%M:%S.%LZ");const Wn=K.bind(null,!0),$n={},{isArray:Yn}=Array;function Kn(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Jn(e){return void 0===e}function Zn(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Gn(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach(((t,o)=>{if(o===r.length)return;n=+t;const i=isNaN(n)?{}:[];e[n||t]=Jn(e[n||t])?i:e[t],e=e[n||t]})),e}function Xn(e,t){let r=!0;if(Kn(e)&&Kn(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((n=>{Xn(e[n],t[n])||(r=!1)})),r);if(Yn(e)&&Yn(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!Xn(e[r],t[r]))return!1;return!0}return e===t}$n.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Wn({},{val:e}).val:e}(t[o]),a=e[o],s=`${r}/${o}`;Xn(i,a)||Zn(t,o)||(Jn(a)?n.push({op:"add",path:s,value:i}):Kn(i)&&Kn(a)?n=n.concat($n.generate(a,i,s)):Yn(i)&&Yn(a)?n=n.concat(function(e,t,r){let n=[];const o=e.slice();let i=-1;function a(e,t,r){if(e[r]&&Jn(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Xn(t,o))return n;if(!Jn(t[0])&&Jn(t[0].qInfo)||0===t.length)return n.push({op:"replace",path:r,value:t}),n;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(n.push({op:"remove",path:`${r}/${e}`}),o.splice(e,1)):n=n.concat($n.generate(o[e],t[i],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:`${r}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Jn(t[o])&&!Zn(e,o)&&n.push({op:"remove",path:`${r}/${o}`})})),n},$n.apply=function(e,t){t.forEach((t=>{let r=Gn(e,t.path),n=t.path.split("/").splice(-1)[0],o=n&&isNaN(+n)?r[n]:r[+n]||r;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(Yn(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(Yn(o)&&Yn(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Kn(o)&&Kn(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Zn(a,e)&&delete a[e]})),Wn(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const o=Gn(e,t.from);Yn(r)?r.splice(+n,0,o.splice(+i,1)[0]):(r[n]=o[i],delete o[i])}else"remove"===t.op&&(Yn(r)?r.splice(+n,1):delete r[n]);var a}))},$n.clone=function(e){return Wn({},e)},$n.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},$n.updateObject=function(e,t){Object.keys(e).length?$n.apply(e,$n.generate(e,t)):Wn(e,t)};const Qn=[[2,4,6],[2,4],[3]],eo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function to(e,t,r){const n=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<n;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==r&&(i=Math.min(i,r/e[n-1])),e.splice(0,0,i)}function ro(e,t,r){let n;const o=e?e.length:0;for(n=0;n<o;n++)to(e[n],t,r)}!function(){let e,t;for(ro(Qn,1,10),e=0;e<eo.length;e++)if(eo[e])for(t=0;t<eo[e].length;t++)Array.isArray(eo[e][t])&&ro(eo[e][t])}();var no={exports:{}};function oo(){}function io(){}io.resetWarningCache=oo;no.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:io,resetWarningCache:oo};return r.PropTypes=r,r}();var ao=no.exports;function so(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function lo({d:e,size:t,style:r={},viewBox:n="0 0 16 16"}){const i={fontSize:so(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...r};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor"},o.createElement("path",{d:e})))}const uo={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},co={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},po="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",fo={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},mo={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function ho(e,t,r){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:r}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");let n=$n.generate(t,r);n&&n.length&&(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(n,!0))}))}function go(e,t,r,n,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[n][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),ho(e,a,s)}))}function yo({dir:e,dock:t,altList:r,model:n,translator:o,app:i,onChange:a}){return 0===r.length?null:{dir:e,dock:t,getAlternatives(){const e=r.map((e=>function(e,t,r){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:r.get("Object.ErrorMessage.MissingDimension")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){go(n,e,t,"qDimensions",a)}}}function vo(e,t,r,n="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){r.drillUp(n,t,e)}};var o}function bo({altList:e,app:t,dir:r,dock:n,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:r,dock:n,getAlternatives(){const r=e.map((e=>function(e,t,r){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:r.get("Object.ErrorMessage.MissingMeasure")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(r)},changeTo(e,t){go(o,e,t,"qMeasures",i,a)}}}function xo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const qo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Do=({children:e,...t})=>o.createElement(i,P({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Co(){function e({title:e,selected:t,onClick:r}){const n=ue.detectTextDirection(e);return o.createElement(l,{button:!0,onClick:r,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(lo,{d:t?po:""})),o.createElement(c,{primaryTypographyProps:{dir:n}},e))}function t({alignTo:t,changeTo:r,current:n,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,n)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>r(n)})));return o.createElement(a,P({anchorEl:t,open:p,onClose:c},qo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,component:"nav"},o.createElement(e,{title:n,selected:!0,onClick:c}),d))}e.propTypes={title:ao.string.isRequired,selected:ao.bool,onClick:ao.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:ao.any,changeTo:ao.func.isRequired,current:ao.string.isRequired,dir:ao.string.isRequired,dock:ao.string.isRequired,list:ao.array,onClose:ao.func.isRequired,show:ao.bool.isRequired},t.defaultProps={list:[],alignTo:null};class r extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:r,translator:n,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,r)=>o.createElement(Do,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:r,onClick:()=>d?void 0:e.drillUp(p-r),title:t},o.createElement("span",{style:c},t),o.createElement(lo,P({},mo,{size:"small",style:{margin:"0 8px"}}))))),m=r&&!this.state.open?this.openPopover:this.closePopover,h=!r||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};s&&(g.padding=s),l&&(g.minWidth=l);const y=ue.detectTextDirection(e.text),v=o.createElement(Do,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:"-1"},e.locked&&o.createElement(lo,P({},co,{size:"small",title:n.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),r&&o.createElement(lo,P({},fo,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(lo,P({},uo,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),r&&o.createElement(t,{dock:r.dock,dir:r.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&re(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:ao.bool.isRequired,padding:ao.string,minWidth:ao.string,titleData:ao.shape({breadcrumbs:ao.arrayOf(ao.string).isRequired,drilldown:ao.bool.isRequired,index:ao.number.isRequired,locked:ao.bool.isRequired,text:ao.string.isRequired,popoverText:ao.string.isRequired,drillUp:ao.func}).isRequired,popover:ao.shape({dir:ao.string.isRequired,dock:ao.string.isRequired,changeTo:ao.func.isRequired,getAlternatives:ao.func.isRequired}),translator:ao.shape({get:ao.func.isRequired}).isRequired,selections:ao.shape({isActive:ao.func,addListener:ao.func,removeListener:ao.func}),style:ao.shape({fontSize:ao.string,color:ao.string,fontFamily:ao.string}).isRequired,isDimension:ao.bool.isRequired,hasAlternative:ao.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left"):"right"===e&&(r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left"),r}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?yo:bo,M=u?vo:xo,S=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:n(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&re(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const T=C.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,a=M(e,i,p),s=n===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(r,{popover:S,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},T)}}}function wo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>r?r:e}function Mo(e){if(e.type)return e;if("#"===e.charAt(0))return Mo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb(".concat(r.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=e.substring(t+1,e.length-1).split(",");return{type:r,values:n=n.map((function(e){return parseFloat(e)}))}}function So(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function Eo(e){var t="hsl"===(e=Mo(e)).type?Mo(function(e){var t=(e=Mo(e)).values,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),So({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Io(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function To(){return(To=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ao(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Oo(){return(Oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function jo(e){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ko(e){return(ko="function"==typeof Symbol&&"symbol"===jo(Symbol.iterator)?function(e){return jo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":jo(e)})(e)}function Lo(e){return e&&"object"===ko(e)&&!Array.isArray(e)}function No(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Oo({},e):e;return Lo(e)&&Lo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Lo(t[o])&&o in e?n[o]=No(e[o],t[o],r):n[o]=t[o])})),n}var Po=["xs","sm","md","lg","xl"];function Ro(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,o=void 0===n?"px":n,i=e.step,a=void 0===i?5:i,s=Ao(e,["values","unit","step"]);function l(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var n=Po.indexOf(t)+1;return n===Po.length?l(e):"@media (min-width:".concat(r[e]).concat(o,") and ")+"(max-width:".concat(r[Po[n]]-a/100).concat(o,")")}return To({keys:Po,values:r,up:l,down:function(e){var t=Po.indexOf(e)+1,n=r[Po[t]];return t===Po.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return r[e]}},s)}function Fo(e,t,r){var n;return To({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return To({paddingLeft:t(2),paddingRight:t(2)},r,Io({},e.up("sm"),To({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},Io(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Io(n,e.up("sm"),{minHeight:64}),n)},r)}var Vo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},_o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ho={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},zo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Uo={black:"#000",white:"#fff"},Bo={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Uo.white,default:Ho[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Wo={text:{primary:Uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ho[800],default:"#303030"},action:{active:Uo.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function $o(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return So(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return So(e)}(e.main,1.5*n)))}function Yo(e){var t=e.primary,r=void 0===t?{light:Vo[300],main:Vo[500],dark:Vo[700]}:t,n=e.secondary,o=void 0===n?{light:_o.A200,main:_o.A400,dark:_o.A700}:n,i=e.error,a=void 0===i?{light:zo[300],main:zo[500],dark:zo[700]}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,p=e.tonalOffset,d=void 0===p?.2:p,f=Ao(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Eo(e),n=Eo(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,Wo.text.primary)>=c?Wo.text.primary:Bo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=To({},e)).main&&e[t]&&(e.main=e[t]),$o(e,"light",r,d),$o(e,"dark",n,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Wo,light:Bo};return No(To({common:Uo,type:l,primary:h(r),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ho,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function Ko(e){return Math.round(1e5*e)/1e5}var Jo={textTransform:"uppercase"};function Zo(e,t){var r="function"==typeof t?t(e):t,n=r.fontFamily,o=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,i=r.fontSize,a=void 0===i?14:i,s=r.fontWeightLight,l=void 0===s?300:s,u=r.fontWeightRegular,c=void 0===u?400:u,p=r.fontWeightMedium,d=void 0===p?500:p,f=r.fontWeightBold,m=void 0===f?700:f,h=r.htmlFontSize,g=void 0===h?16:h,y=r.allVariants,v=r.pxToRem,b=Ao(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,r,n,i){return To({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(Ko(n/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,Jo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Jo)};return No(To({htmlFontSize:g,pxToRem:q,round:Ko,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Go(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Xo=["none",Go(0,2,1,-1,0,1,1,0,0,1,3,0),Go(0,3,1,-2,0,2,2,0,0,1,5,0),Go(0,3,3,-2,0,3,4,0,0,1,8,0),Go(0,2,4,-1,0,4,5,0,0,1,10,0),Go(0,3,5,-1,0,5,8,0,0,1,14,0),Go(0,3,5,-1,0,6,10,0,0,1,18,0),Go(0,4,5,-2,0,7,10,1,0,2,16,1),Go(0,5,5,-3,0,8,10,1,0,3,14,2),Go(0,5,6,-3,0,9,12,1,0,3,16,2),Go(0,6,6,-3,0,10,14,1,0,4,18,3),Go(0,6,7,-4,0,11,15,1,0,4,20,3),Go(0,7,8,-4,0,12,17,2,0,5,22,4),Go(0,7,8,-4,0,13,19,2,0,5,24,4),Go(0,7,9,-4,0,14,21,2,0,5,26,4),Go(0,8,9,-5,0,15,22,2,0,6,28,5),Go(0,8,10,-5,0,16,24,2,0,6,30,5),Go(0,8,11,-5,0,17,26,2,0,6,32,5),Go(0,9,11,-5,0,18,28,2,0,7,34,6),Go(0,9,12,-6,0,19,29,2,0,7,36,6),Go(0,10,13,-6,0,20,31,3,0,8,38,7),Go(0,10,13,-6,0,21,33,3,0,8,40,7),Go(0,10,14,-6,0,22,35,3,0,8,42,7),Go(0,11,14,-7,0,23,36,3,0,9,44,8),Go(0,11,15,-7,0,24,38,3,0,9,46,8)],Qo={borderRadius:4};function ei(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return 0===r.length?e(1):1===r.length?e(r[0]):r.map((function(t){var r=e(t);return"number"==typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var ti={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ri={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ni=function(e){return"".concat(Math.round(e),"ms")},oi={easing:ti,duration:ri,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?ri.standard:r,o=t.easing,i=void 0===o?ti.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Ao(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:ni(n)," ").concat(i," ").concat("string"==typeof s?s:ni(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ii={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,o=void 0===n?{}:n,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Ao(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Yo(a),f=Ro(r),m=ei(l),h=To({breakpoints:f,direction:"ltr",mixins:Fo(f,m,o),overrides:{},palette:d,props:{},shadows:s||Xo,typography:Zo(d,c),spacing:m},No({shape:Qo,transitions:oi,zIndex:ii},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const si=d({productionPrefix:"q8b88",disableGlobal:!0,seed:""});function li(){function e({x:e,y:t,width:r,height:n,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(r)?a.width:r,a.height=Number.isNaN(n)?a.height:n,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:r=document.createElement.bind(document)}=t;let n,i=e();const a={element:()=>n,root:()=>n,appendTo:e=>(n||(n=r("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),render(e){if(!n)return!1;const t=i.scaleRatio.x,r=i.scaleRatio.y;return n.style.left=Math.round(i.margin.left+i.x*t)+"px",n.style.top=Math.round(i.margin.top+i.y*r)+"px",n.style.width=Math.round(i.width)+"px",n.style.height=Math.round(i.height)+"px",n.style.transform=`scale(${t}, ${r})`,n.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:ai},e))}(e,si),n),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(n&&p.unmountComponentAtNode(n),a),destroy(){n&&n.parentElement&&(p.unmountComponentAtNode(n),n.parentElement.removeChild(n)),n=null},size:t=>(t&&(i=e(t)),i)};return a}}function ui(){return function(e){e.renderer("react",li()),e.component("data-title",Co()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:ao.string.isRequired,spanStyle:ao.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",a=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=t.width+"px",r.height=t.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),s="center"===n?t:"* "+t,l="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function ci(e){return tt(e).l<70}function pi(e,t){const r=tt(e).l/100,n=tt(t).l/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}function di(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var fi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const r=e.component(t.component);if(!r)return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];if(r.settings.settings.slice.cornerRadius>0||r.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=n[n.length-1];for(let e=0;e<n.length;e+=1){const t=n[e],r=i.attrs.fill,a=t.attrs.fill;if(pi(a,r)<=1.2){const{start:e,offset:r}=t.desc.slice;let{innerRadius:n,outerRadius:s}=t.desc.slice;if(n=Math.max(n,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>n){const t=di({r:s,a:e},r),i=di({r:n,a:e},r);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:ci(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function mi(e,t=!0){let r="";for(let t=0;t<e.length;t++){const n=e[t];r+=0===t?`M${n.x} ${n.y}`:`L${n.x} ${n.y}`,r+=" "}return t&&(r+="Z"),r}function hi(e){const{size:t,angle:r}=e,n={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,r={x:0,y:0}){const n=Math.cos(t),o=Math.sin(t),i=(s=r,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:n*i.x-o*i.y,y:o*i.x+n*i.y},r)}(e,r,n))),{type:"path",fill:e.fill,d:mi(s)}}var gi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];const n=[];for(let e=0;e<r.length;e+=1){const a=r[e];if(a.data.radius.value<0){const{start:e,end:r,offset:s}=a.desc.slice,l=(e+r)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=hi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},n.push(c)}}var o,i;return n}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function yi(e){return(yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vi(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function bi(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){vi(i,n,o,a,s,"next",e)}function s(e){vi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function xi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qi(Object(r),!0).forEach((function(t){xi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ci(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function wi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||Si(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mi(e){return function(e){if(Array.isArray(e))return Ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Si(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Si(e,t){if(e){if("string"==typeof e)return Ei(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ei(e,t):void 0}}function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ii=Object.prototype.hasOwnProperty,Ti=Object.prototype.toString,Ai=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,ji=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ti.call(e)},ki=function(e){if(!e||"[object Object]"!==Ti.call(e))return!1;var t,r=Ii.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ii.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Ii.call(e,t)},Li=function(e,t){Ai&&"__proto__"===t.name?Ai(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ni=function(e,t){if("__proto__"===t){if(!Ii.call(e,t))return;if(Oi)return Oi(e,t).value}return e[t]},Pi=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Ni(s,r),s!==(o=Ni(t,r))&&(c&&o&&(ki(o)||(i=ji(o)))?(i?(i=!1,a=n&&ji(n)?n:[]):a=n&&ki(n)?n:{},Li(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&Li(s,{name:r,newValue:o}));return s};function Ri(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Fi(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Vi(e,t,r,n,o){var i,a=o.byRow,s=o.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var l=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,l)}return{}}function _i(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var o=r[n.activeDimensionIndex];n=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function Hi(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function zi(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ui(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Bi(){}var Wi=1/.7,$i="\\s*([+-]?\\d+)\\s*",Yi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ji=/^#([0-9a-f]{3,8})$/,Zi=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgb\\("+[Ki,Ki,Ki]+"\\)$"),Xi=new RegExp("^rgba\\("+[$i,$i,$i,Yi]+"\\)$"),Qi=new RegExp("^rgba\\("+[Ki,Ki,Ki,Yi]+"\\)$"),ea=new RegExp("^hsl\\("+[Yi,Ki,Ki]+"\\)$"),ta=new RegExp("^hsla\\("+[Yi,Ki,Ki,Yi]+"\\)$"),ra={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function na(){return this.rgb().formatHex()}function oa(){return this.rgb().formatRgb()}function ia(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ji.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?aa(t):3===r?new ca(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?sa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?sa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Zi.exec(e))?new ca(t[1],t[2],t[3],1):(t=Gi.exec(e))?new ca(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xi.exec(e))?sa(t[1],t[2],t[3],t[4]):(t=Qi.exec(e))?sa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ea.exec(e))?ma(t[1],t[2]/100,t[3]/100,1):(t=ta.exec(e))?ma(t[1],t[2]/100,t[3]/100,t[4]):ra.hasOwnProperty(e)?aa(ra[e]):"transparent"===e?new ca(NaN,NaN,NaN,0):null}function aa(e){return new ca(e>>16&255,e>>8&255,255&e,1)}function sa(e,t,r,n){return n<=0&&(e=t=r=NaN),new ca(e,t,r,n)}function la(e){return e instanceof Bi||(e=ia(e)),e?new ca((e=e.rgb()).r,e.g,e.b,e.opacity):new ca}function ua(e,t,r,n){return 1===arguments.length?la(e):new ca(e,t,r,null==n?1:n)}function ca(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function pa(){return"#"+fa(this.r)+fa(this.g)+fa(this.b)}function da(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function fa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ma(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ga(e,t,r,n)}function ha(e){if(e instanceof ga)return new ga(e.h,e.s,e.l,e.opacity);if(e instanceof Bi||(e=ia(e)),!e)return new ga;if(e instanceof ga)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ga(a,s,l,e.opacity)}function ga(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ya(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function va(e){return function(){return e}}function ba(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):va(isNaN(e)?t:e)}zi(Bi,ia,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:na,formatHex:na,formatHsl:function(){return ha(this).formatHsl()},formatRgb:oa,toString:oa}),zi(ca,ua,Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pa,formatHex:pa,formatRgb:da,toString:da})),zi(ga,(function(e,t,r,n){return 1===arguments.length?ha(e):new ga(e,t,r,null==n?1:n)}),Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ga(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ga(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new ca(ya(e>=240?e-240:e+120,o,n),ya(e,o,n),ya(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var xa=function e(t){var r=function(e){return 1==(e=+e)?ba:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):va(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ua(e)).r,(t=ua(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=ba(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),qa=/^class(-pyramid)?/,Da=function(e,t,r,n){var o=void 0!==r.min?r.min:n.min(),i=void 0!==r.max?r.max:n.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Mi(c))),i=Math.max.apply(Math,[i].concat(Mi(c))),u.min=o,u.max=i,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,r=e.max,n=e.limits,o=e.range,i=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(n[0]>r)a.push(t,r),i.push(o[0],o[0],o[0]);else{if(n[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){i.push(o[s]);break}}for(var l=0;l<n.length;l++)t<n[l]&&n[l]<r&&(a.push(n[l]),i.push(o[l]));if(n[n.length-1]<r)a.push(r),i.push(o[n.length]),i.push(o[n.length]);else{a.push(r);for(var u=0;u<n.length;u++)if(n[u]>r){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:r,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=xa(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&d[f+1]&&(u.range.push(p[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(p[f]),u.range.push(p[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(p[p.length-1]),u.domain.push(i)}else u.domain=c,u.range=p;return u};function Ca(e,t,r,n,o){var i,a,s,l=0,u=[],c=(e-t)/(n+1);if(0===c)return 1;for(i=0;i<r.length;i+=1)a=.99*(r[i]-t),s=r[i]>e?Math.floor(e/c):r[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=n||l>=o?Math.max(l,n):Ca(e,t,r,n+1,o)}var wa=function(e,t,r,n){var o,i,a=t.theme,s=t.hc,l=n.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=r.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=r.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Mi(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===r.input.autoMinMax){if(u.min=r.input.measureMin,u.max=r.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Mi(c)),u.max=Math.max.apply(Math,Mi(c))}if(r.input.measureScheme&&(u.palettes={quant:r.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];u.type=d&&qa.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Mi(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Ca(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),r=Math.max(1,Math.floor(t.length/f)),n=[],o=0;o<f;o+=1)n.push(t[o*r]);return[n[0]].concat(n,[n[n.length-1]])}}return u};function Ma(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function Sa(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ea(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=r.indexOf(i);-1===s?(r.push(i),n.push(a.primary)):n[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=r.indexOf(i);-1!==l&&(r.splice(l,1),n.splice(l,1))}}return{domain:r,range:n,exclude:o}}function Ia(e,t,r,n){var o=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ma:i,s=r.input.byMeasureDef||{activeMeasureIndex:0},l=a(r,s),u=wa(0,{theme:n,hc:o},r,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=r.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Pi(u,Da(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.getCDef,i=void 0===o?_i:o,a=n.getCByField,s=void 0===a?Hi:a,l=n.getPersistence,u=void 0===l?Vi:l,c=i(t,r),p=s(r,c),d=p?p.raw():{},f=r&&r.pic?r.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Pi(m,u(t,r,c,p,{byRow:Fi,byElemNo:Ri})),m}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=wa(0,{hc:o,theme:i},r,{f:s});return l.invalid||(l.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===r.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(n.primary):u.push(o)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(n.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(r,o){return function(e){var t,r=e.cm,n=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),Di(Di({},r),{},{mode:"constant",type:"constant",primary:n})}(r,i,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),i=o;return Di(Di({},r),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(o,a,n):null}({cm:e,input:r,defaults:n,index:o,pic:t.pic})})),function(e,t){var r,n,o,i=t.translator;if(Sa(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Ea(e.measureOverrides,e.explicit),Sa(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=Ea(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,r)):o}function Ta(e){var t=Di({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(n.auto=e,o):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,o):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,o):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,o):n.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Pi(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=n.auto(e.layout);r.input=Pi(!0,{},r.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=r.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(r.input=Pi(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return n.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?n.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var i=r.pic.field(e.field);return Da(o,n.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],l=n[1]?n[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,r,n){var o=n.external,i=n.field,a=Di({},e);Pi(a,Ri(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Pi(a,Ri(i)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Pi(a,Ri(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},o=0;o<e.length;o+=1)n[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;n[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(n[u])))}return a.push(-3,-2),i.push(r.others),i.push(r.nil),a},range:function(){return i}}}(t.colors,r,a)),a}(a,l,o,{external:t,field:r.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=Di(Di({},e),n.getDataColorSpecials())),r.settings=Pi(e,Ia(this,r,t,e))}return r.settings}};return o}var Aa=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var o=t.coloring;o&&(n.measureGradient=o.gradient)}else if("dimension"===r){var i=t[0],a=t[1];i&&(n.legendDataPage=i),a&&(n.dimValsData=a.colorMap)}return n},Oa=function(e){throw e.isHandled=!0,e},ja=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},ka=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},La=function(e,t){var r=t.layout,n=t.model,o=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&o?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Oa):Promise.reject()};function Na(e){var t=e.hc,r=e.source,n=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Pa(e){return function(t){return"object"===yi(t.datum[e])?t.datum[e].value:void 0}}function Ra(e){return"object"===yi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Fa(e){return-3===e.datum.value}var Va=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return r?"left":"right"},_a=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ha(e,t){var r=e.styleReference,n=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Va(i,n,o)},show:"function"==typeof i.show?function(){return _a(i,l,a)}:_a(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function za(e,t,r){var n=[],o=[],i=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=Ha(e,t);if(!n.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return Pi(!0,n,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[r]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Ha(e,t);return!!u.show&&Pi(!0,u,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(n,"legend.label","color"):void 0,fontSize:l?l.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(n,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}(e,t,r&&r.navigationDisabled);return n.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=o&&null!==(n=o.interact)&&void 0!==n&&n.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=r.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,r)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===r||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:(e={},xi(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),xi(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),xi(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:o,components:n}}var Ua=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Ba(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=Ta(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return ja(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ka(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,o=t.app;return La(e,{layout:r,model:n,app:o})}));return r.getSnapshotData=Aa,r}({resources:e}),r={},n={},o=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},i={config:function(o){if(r=Di({},o),n={},!r.key)throw new Error("Missing key");t.set(Di(Di({},e),r))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=Di(Di({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var r=o();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=o().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,o=[];if(r&&r.palettes&&n){var i=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||n.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,l=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Mi(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),colorProps:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(r){var u={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Mi((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Mi((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=Na({hc:t,source:i,coloring:r}).data;if(r.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=Di(Di({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[l]=Pi({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Pi({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===r.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:r.hc,coloring:o(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,o=Pa(n),i=Pa("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Fa(e)||i(e)?u:l}:r[t]?function(e){return Fa(e)?u:Ra(e)||-2===o(e)&&"dimension"===n||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Fa(e)||i(e)?u:Ra(e)?l:c}:"color"===p?function(e){return Fa(e)||i(e)?u:Ra(e)?l:o(e)||u}:null},s=a(t,n);if(t.measureOverrides){var l=Pa("".concat(n,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(r={field:t,reduce:"first"},"color"===o.type&&(r.value=function(e){return"NaN"!==e.qNum?Ua(e.qNum):e.qText&&ia(e.qText)?e.qText:c})):"dimension"===o.mode?r=void 0!==o.field?o.field:n.qDimensionInfo.length-1:"measure"===o.mode&&(r=l);var p=xi({},u,r);return n.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return za({eventName:t,key:n,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:r.legendProps,scaleKey:r.key,coloring:o(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return i}var Wa=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function $a(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,o=r.some(Wa),i=n.some(Wa),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function Ya(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Di(Di(Di({},e),t),{},{colorProps:Di(Di({},e.colorProps),t.colorProps||{})});return r}var Ka=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Ja(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ka),n=e.qHyperCube.qMeasureInfo.some(Ka),o=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Za=function(){};function Ga(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(n,i)};clearTimeout(t),t=setTimeout(s,r)}}function Xa(e){var t=e.originalArray,r=e.newArray,n=e.matchKey;return Array.isArray(t)&&t.length?(r.forEach((function(e){var r=-1;t.some((function(t,o){return t[n]&&t[n]===e[n]&&(r=o),r})),r>-1?t[r]=e:t.push(e)})),t):r}function Qa(e){return(Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ts(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rs(e,t,r){return t&&ts(e.prototype,t),r&&ts(e,r),e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?os(Object(r),!0).forEach((function(t){ns(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function as(e,t){return(as=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ls(e,t,r){return(ls=ss()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&as(o,r.prototype),o}).apply(null,arguments)}function us(e){return function(e){if(Array.isArray(e))return ps(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||cs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cs(e,t){if(e){if("string"==typeof e)return ps(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ps(e,t):void 0}}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ds=Object.prototype.hasOwnProperty,fs=Object.prototype.toString,ms=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,gs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===fs.call(e)},ys=function(e){if(!e||"[object Object]"!==fs.call(e))return!1;var t,r=ds.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ds.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ds.call(e,t)},vs=function(e,t){ms&&"__proto__"===t.name?ms(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},bs=function(e,t){if("__proto__"===t){if(!ds.call(e,t))return;if(hs)return hs(e,t).value}return e[t]},xs=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=bs(s,r),s!==(o=bs(t,r))&&(c&&o&&(ys(o)||(i=gs(o)))?(i?(i=!1,a=n&&gs(n)?n:[]):a=n&&ys(n)?n:{},vs(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&vs(s,{name:r,newValue:o}));return s};function qs(e,t,r){if(!e)return-1;var n=r.cache,o=e.origin?e.origin():null;o&&(e=o);var i=n.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<n.wrappedFields.length;l++)if(s=n.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Ds(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Cs(e){var t=e.cache,r=e.f,n=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=n;if(o.field&&o.field!==r){var d=qs(o.field,i,{cache:t});if(-1===d)return;p=xs({qRow:a},d(s))}u[c]=Ds(o,p,{key:l})}function ws(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=Qa(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=qs(u,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=xs({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Ds(d,C,{key:l});if(!d.filter||d.filter(C)){for(var M=0;M<f.length;M++){var S=p[f[M]],E=S.fields||[S];S.fields&&(w[f[M]]=[]);for(var I=0;I<E.length;I++)Cs({cache:r,f:u,mainCell:C,p:E[I],prop:f[M],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:S.fields?w[f[M]]:w,targetProp:S.fields?I:f[M]});if(S.fields){var T=w[f[M]].map((function(e){return e.value})),A=w[f[M]].map((function(e){return e.label}));w[f[M]]={value:"function"==typeof S.value?S.value(T):void 0!==S.value?S.value:T,label:"function"==typeof S.label?S.label(A):void 0!==S.label?String(S.label):String(w[f[M]].value)}}}m&&n.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,us(n.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Ms(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Ss(e,t){var r,n,o,i,a,s=new As(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Es);r=u.pop();)if(l&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)u.push(n=r.children[i]=new As(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Ts)}function Es(e){return e.children}function Is(e){e.data=e.data.data}function Ts(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function As(e){this.data=e,this.depth=this.height=0,this.parent=null}function Os(e){if("function"!=typeof e)throw new Error;return e}As.prototype=Ss.prototype={constructor:As,count:function(){return this.eachAfter(Ms)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Ss(this).eachBefore(Is)}};var js={depth:-1},ks={};function Ls(e){return e.id}function Ns(e){return e.parentId}function Ps(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),o=t,i=0;i<n.length;i++){if("*"===n[i]&&Array.isArray(o)){var a=[];r=n.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Ps(r,o[s]);Array.isArray(l)?a.push.apply(a,us(l)):a.push(l)}return a}if(!n[i]&&Array.isArray(o)){var u=new Array(o.length);r=n.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Ps(r,o[c]);return u}n[i]in o&&(o=o[n[i]])}return o}function Rs(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var o=r>=0?[e[r]]:e;n.push.apply(n,us(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&n.push.apply(n,us(Rs(e[i].children,t-1,r)));return n}function Fs(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),o=us(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Rs(e.children,i-1,r)}}return!1}function Vs(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var o=0;o<n.length;o++)if(e(n[o]))return n[o];return!1}if("string"==typeof e){for(var i=0;i<n.length;i++)if(n[i].key()===e||n[i].title()===e)return n[i]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var _s=/^qDimensionInfo(?:\/(\d+))?/,Hs=/^\/?qMeasureInfo\/(\d+)/,zs=/\/qAttrExprInfo\/(\d+)/,Us=/\/qAttrDimInfo\/(\d+)/;function Bs(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function Ws(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=n,p=r.qEffectiveInterColumnSortOrder,d=Bs(r);return _s.test(c)&&(o=!0,i=+_s.exec(c)[1],c=n.replace(_s,"")),Hs.test(c)&&("K"===r.qMode?l=+Hs.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+Hs.exec(c)[1],u=0):u=+Hs.exec(c)[1],c=c.replace(Hs,"")),c&&(Us.exec(c)?s=+Us.exec(c)[1]:zs.exec(c)&&(a=+zs.exec(c)[1])),{fieldDepth:(o?"S"===r.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function $s(e,t){var r,n,o=Fs(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:o,attrFn:n,valueFn:r}}function Ys(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Ks(e){for(var t=e.propsArr,r=e.props,n=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=r[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var r=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===r.type?(m=r.value,y=String(r.value)):("function"==typeof r.value&&(d=function(e){return r.value(e,n)}),"function"==typeof r.label&&(f=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=r.reduce?r.reduce(m):m,y=r.reduceLabel?r.reduceLabel(y,m):String(m)):y=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},r.field&&(i[t[s]].source={field:r.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,n):c,label:"function"==typeof l.label?l.label(p,n):p})}}var Js=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Ps(n,e);return i&&i[0]?(t.tree=Ss(i[0],r.children||function(e){return e[o]}),t.tree):null};function Zs(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}(e),n=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=is({__id:f,__parent:u,qValues:[]},d),c=!0),u=f}if(c)for(var m=0;m<i.length;m++){var h=l[i[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Ls,t=Ns;function r(r){var n,o,i,a,s,l,u,c=r.length,p=new Array(c),d={};for(o=0;o<c;++o)n=r[o],s=p[o]=new As(n),null!=(l=e(n,o,r))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?ks:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(r[o],o,r))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===ks)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=js,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ts),i.parent=null,c>0)throw new Error("cycle");return i}return r.id=function(t){return arguments.length?(e=Os(t),r):e},r.parentId=function(e){return arguments.length?(t=Os(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Gs=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=r[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=$s(i,Ws(p.field,{cube:n,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function Xs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?Zs(t):Js(o,r,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=Bs(o),d=p[u-1];c=r.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=r.fields[f]}var m=n.normalizeConfig(is(is({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?Ws(c,{cube:o,cache:r}):{fieldDepth:0};Gs({propsArr:y,props:h,cube:o,cache:r,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,M=l[q[D].depth].main,S=x[D],E=S.data,I=Ys(M,E,{key:i});Ks({propsArr:C,props:w,item:S,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function Qs(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!Js(s,r,e))continue;var u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=Ws(u,{cube:s,cache:r}),h=$s({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;Gs({propsArr:f,props:p,cube:s,cache:r,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=Qa(o[a].trackBy),q={},D=[],C=g(r.tree),w=[],M=0;M<C.length;M++){var S=C[M],E=y?y(v(S)):v(S);if(!d.filter||d.filter(E)){var I=Ys(d,E,{key:l});Ks({propsArr:f,props:p,item:S,itemData:E,ret:I,sourceKey:l}),b&&n.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,us(n.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var el,tl=(function(e){
7
+ import e from"hammerjs";import t from"picasso.js";import r from"picasso-plugin-q";import n from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as d,StylesProvider as f,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as y,useState as v,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as M,usePlugins as S,useEmbed as E,useTheme as I,useConstraints as T,useAppLayout as A,usePromise as O,useRect as j,onTakeSnapshot as k,useImperativeHandle as L}from"@nebula.js/stardust";var N={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}}};function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}const R=(e,t,r,n,o)=>e?e.getStyle(t,r,n):o;var F=Object.freeze({__proto__:null,getThemeStyle:R});function V(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _=Object.prototype.hasOwnProperty,H=Object.prototype.toString,z=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===H.call(e)},W=function(e){if(!e||"[object Object]"!==H.call(e))return!1;var t,r=_.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||_.call(e,t)},$=function(e,t){z&&"__proto__"===t.name?z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Y=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(U)return U(e,t).value}return e[t]},K=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Y(s,r),s!==(o=Y(t,r))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=n&&B(n)?n:[]):a=n&&W(n)?n:{},$(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:r,newValue:o}));return s};const J="center",Z="bottom";var G={NoDataExist:{label:"NoDataExist",alignment:J,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:J,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:J,default:!1},LimitedData:{label:"LimitedData",alignment:Z,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:Z,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:Z,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:Z,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Q={};X.forEach((([e,{width:t,height:r}])=>{Q[e]={width:t,height:r}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let r;for(r=0;r<X.length;++r)if(e>=X[r][1].width&&t>=X[r][1].height)return X[r][0];return"SPARK"}};function te(e,t){return{layoutModes:ee.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const re=(e,t,r)=>{const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(void 0===i[n[o]])return r;i=i[n[o]]}return i};function ne(e,t){const r=e.component(t);return r&&r._DO_NOT_USE_getInfo&&r._DO_NOT_USE_getInfo().offset}function oe(){if(!document.querySelector("#la-vie-tooltip")){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ie({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){oe()},beforeUpdate(){oe()},destroyed(){!function(){const e=document.querySelector("#la-vie-tooltip");e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector("#la-vie-tooltip"),content:({h:e,data:t,style:r})=>t[0].map((t=>e("tr",{},function(e,{h:t,style:r}){return e.map((e=>{const n={style:{...r.cell||{},...e.style||{}},class:e.class};return e.colspan&&(n.colspan=e.colspan),t("td",n,e.content)}))}(t,{h:e,style:r})))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const ae=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),se=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),le=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ue={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ae.test(e),isRtlChar:e=>se.test(e)||le.test(e),detectTextDirection(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],ue.isLtrChar(n))return"ltr";if(ue.isRtlChar(n))return"rtl"}return"ltr"}},ce={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,r){const n=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(r.coloring.label&&(a.label=""+r.coloring.label),"color"!==r.coloring.type&&n.fillTooltip){const e=o("fill"),t="measure"===r.coloring.fieldType;if(a.value=t&&e?e(n.fillTooltip.value):n.fillTooltip.label?n.fillTooltip.label:n.fillTooltip.value,!r.coloring.label){const e=i(n.fillTooltip.source.key).field(n.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===n._fillColor?ce.getNodeFillColor(t):n._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const r=ue.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:r},colspan:2},{}]},getDescriptionRow(e,t){const r=ue.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:r},colspan:2},{}]},getNMoreRow(e,t,r){const n=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:n,style:{"font-weight":"bold","text-align":r?"right":"left",direction:ue.detectTextDirection(n)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,r){const n=ue.detectTextDirection(t.color.label),o=r?[":",t.color.label]:[t.color.label,":"],i=ue.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":r?"right":"left",direction:n}},{content:r?[t.color.value,ce.getColorSymbol(e,t)]:[ce.getColorSymbol(e,t),t.color.value],style:{"text-align":r?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,r,n,o=!1){const i=ue.detectTextDirection(e.label),a=n?[":",e.label]:[e.label,":"],s=ue.detectTextDirection(e.value);let l;return l=o?n?[e.value,ce.getColorSymbol(t,r)]:[ce.getColorSymbol(t,r),e.value]:[e.value],[{content:a,style:{"text-align":n?"right":"left",direction:i}},{content:l,style:{"text-align":n?"left":"right",direction:s,"vertical-align":"middle"}}]}};function pe(e,t,r,n){const o=parseInt(R(e,t,r,n),10);if(!isNaN(o))return o}const de=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function fe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((r=>function(e,t,r){return{position:e.position,justify:e.justify,fill:e.onBackground?R(t,r,"label.value","color"):de(t),overflow:e.overflow,padding:e.padding}}(r,t,e.themeId))),fontSize:pe(t,e.themeId,"label.value","fontSize"),fontFamily:R(t,e.themeId,"label.value","fontFamily"),label:e.label}}function me(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function he(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ge(){}var ye=1/.7,ve="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qe=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),Ce=new RegExp("^rgb\\("+[xe,xe,xe]+"\\)$"),we=new RegExp("^rgba\\("+[ve,ve,ve,be]+"\\)$"),Me=new RegExp("^rgba\\("+[xe,xe,xe,be]+"\\)$"),Se=new RegExp("^hsl\\("+[be,xe,xe]+"\\)$"),Ee=new RegExp("^hsla\\("+[be,xe,xe,be]+"\\)$"),Ie={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Te(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Oe(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?je(t):3===r?new Ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ke(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=De.exec(e))?new Ne(t[1],t[2],t[3],1):(t=Ce.exec(e))?new Ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=we.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=Me.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Se.exec(e))?Ve(t[1],t[2]/100,t[3]/100,1):(t=Ee.exec(e))?Ve(t[1],t[2]/100,t[3]/100,t[4]):Ie.hasOwnProperty(e)?je(Ie[e]):"transparent"===e?new Ne(NaN,NaN,NaN,0):null}function je(e){return new Ne(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ne(e,t,r,n)}function Le(e){return e instanceof ge||(e=Oe(e)),e?new Ne((e=e.rgb()).r,e.g,e.b,e.opacity):new Ne}function Ne(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Pe(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function Re(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Fe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ve(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,r,n)}function _e(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof ge||(e=Oe(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new He(a,s,l,e.opacity)}function He(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ze(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}me(ge,Oe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHsl:function(){return _e(this).formatHsl()},formatRgb:Ae,toString:Ae}),me(Ne,(function(e,t,r,n){return 1===arguments.length?Le(e):new Ne(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pe,formatHex:Pe,formatRgb:Re,toString:Re})),me(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return e=null==e?ye:Math.pow(ye,e),new He(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Ne(ze(e>=240?e-240:e+120,o,n),ze(e,o,n),ze(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ue=Math.PI/180,Be=180/Math.PI,We=4/29,$e=6/29,Ye=3*$e*$e;function Ke(e){if(e instanceof Je)return new Je(e.l,e.a,e.b,e.opacity);if(e instanceof rt)return nt(e);e instanceof Ne||(e=Le(e));var t,r,n=Qe(e.r),o=Qe(e.g),i=Qe(e.b),a=Ze((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=Ze((.4360747*n+.3850649*o+.1430804*i)/.96422),r=Ze((.0139322*n+.0971045*o+.7141733*i)/.82521)),new Je(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Je(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ze(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ye+We}function Ge(e){return e>$e?e*e*e:Ye*(e-We)}function Xe(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Qe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function et(e){if(e instanceof rt)return new rt(e.h,e.c,e.l,e.opacity);if(e instanceof Je||(e=Ke(e)),0===e.a&&0===e.b)return new rt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Be;return new rt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function tt(e,t,r,n){return 1===arguments.length?et(e):new rt(e,t,r,null==n?1:n)}function rt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function nt(e){if(isNaN(e.h))return new Je(e.l,0,0,e.opacity);var t=e.h*Ue;return new Je(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function ot(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}me(Je,(function(e,t,r,n){return 1===arguments.length?Ke(e):new Je(e,t,r,null==n?1:n)}),he(ge,{brighter:function(e){return new Je(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Je(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Ne(Xe(3.1338561*(t=.96422*Ge(t))-1.6168667*(e=1*Ge(e))-.4906146*(r=.82521*Ge(r))),Xe(-.9787684*t+1.9161415*e+.033454*r),Xe(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),me(rt,tt,he(ge,{brighter:function(e){return new rt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new rt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return nt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,r){return ot(e(t),r)}}(e))}(ot);function it(){}function at(e,t){var r=new it;if(e instanceof it)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,o=-1,i=e.length;if(null==t)for(;++o<i;)r.set(o,e[o]);else for(;++o<i;)r.set(t(n=e[o],o,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function st(){}it.prototype=at.prototype={constructor:it,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var lt=at.prototype;function ut(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ct(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function pt(){}st.prototype={constructor:st,has:lt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:lt.remove,clear:lt.clear,values:lt.keys,size:lt.size,empty:lt.empty,each:lt.each};var dt=1/.7,ft="\\s*([+-]?\\d+)\\s*",mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ht="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gt=/^#([0-9a-f]{3})$/,yt=/^#([0-9a-f]{6})$/,vt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),bt=new RegExp("^rgb\\("+[ht,ht,ht]+"\\)$"),xt=new RegExp("^rgba\\("+[ft,ft,ft,mt]+"\\)$"),qt=new RegExp("^rgba\\("+[ht,ht,ht,mt]+"\\)$"),Dt=new RegExp("^hsl\\("+[mt,ht,ht]+"\\)$"),Ct=new RegExp("^hsla\\("+[mt,ht,ht,mt]+"\\)$"),wt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mt(e){var t;return e=(e+"").trim().toLowerCase(),(t=gt.exec(e))?new Tt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=yt.exec(e))?St(parseInt(t[1],16)):(t=vt.exec(e))?new Tt(t[1],t[2],t[3],1):(t=bt.exec(e))?new Tt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xt.exec(e))?Et(t[1],t[2],t[3],t[4]):(t=qt.exec(e))?Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Dt.exec(e))?Ot(t[1],t[2]/100,t[3]/100,1):(t=Ct.exec(e))?Ot(t[1],t[2]/100,t[3]/100,t[4]):wt.hasOwnProperty(e)?St(wt[e]):"transparent"===e?new Tt(NaN,NaN,NaN,0):null}function St(e){return new Tt(e>>16&255,e>>8&255,255&e,1)}function Et(e,t,r,n){return n<=0&&(e=t=r=NaN),new Tt(e,t,r,n)}function It(e){return e instanceof pt||(e=Mt(e)),e?new Tt((e=e.rgb()).r,e.g,e.b,e.opacity):new Tt}function Tt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function At(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ot(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,r,n)}function jt(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof pt||(e=Mt(e)),!e)return new kt;if(e instanceof kt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new kt(a,s,l,e.opacity)}function kt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Lt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ut(pt,Mt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),ut(Tt,(function(e,t,r,n){return 1===arguments.length?It(e):new Tt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+At(this.r)+At(this.g)+At(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),ut(kt,(function(e,t,r,n){return 1===arguments.length?jt(e):new kt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new kt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Tt(Lt(e>=240?e-240:e+120,o,n),Lt(e,o,n),Lt(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Nt=Math.PI/180,Pt=180/Math.PI,Rt=4/29,Ft=6/29,Vt=3*Ft*Ft;function _t(e){if(e instanceof Ht)return new Ht(e.l,e.a,e.b,e.opacity);if(e instanceof Yt){if(isNaN(e.h))return new Ht(e.l,0,0,e.opacity);var t=e.h*Nt;return new Ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Tt||(e=It(e));var r,n,o=Wt(e.r),i=Wt(e.g),a=Wt(e.b),s=zt((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?r=n=s:(r=zt((.4360747*o+.3850649*i+.1430804*a)/.96422),n=zt((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Ht(116*s-16,500*(r-s),200*(s-n),e.opacity)}function Ht(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function zt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Vt+Rt}function Ut(e){return e>Ft?e*e*e:Vt*(e-Rt)}function Bt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function $t(e){if(e instanceof Yt)return new Yt(e.h,e.c,e.l,e.opacity);if(e instanceof Ht||(e=_t(e)),0===e.a&&0===e.b)return new Yt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Pt;return new Yt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Yt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}ut(Ht,(function(e,t,r,n){return 1===arguments.length?_t(e):new Ht(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Ht(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ht(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Tt(Bt(3.1338561*(t=.96422*Ut(t))-1.6168667*(e=1*Ut(e))-.4906146*(r=.82521*Ut(r))),Bt(-.9787684*t+1.9161415*e+.033454*r),Bt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ut(Yt,(function(e,t,r,n){return 1===arguments.length?$t(e):new Yt(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return new Yt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Yt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return _t(this).rgb()}}));var Kt=-.29227,Jt=-.90649,Zt=1.97294,Gt=Zt*Jt,Xt=1.78277*Zt,Qt=-.6557636667999999;function er(e){if(e instanceof tr)return new tr(e.h,e.s,e.l,e.opacity);e instanceof Tt||(e=It(e));var t=e.r/255,r=e.g/255,n=e.b/255,o=(Qt*n+Gt*t-Xt*r)/(Qt+Gt-Xt),i=n-o,a=(Zt*(r-o)-Kt*i)/Jt,s=Math.sqrt(a*a+i*i)/(Zt*o*(1-o)),l=s?Math.atan2(a,i)*Pt-120:NaN;return new tr(l<0?l+360:l,s,o,e.opacity)}function tr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function rr(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}ut(tr,(function(e,t,r,n){return 1===arguments.length?er(e):new tr(e,t,r,null==n?1:n)}),ct(pt,{brighter:function(e){return e=null==e?dt:Math.pow(dt,e),new tr(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new tr(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Nt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),o=Math.sin(e);return new Tt(255*(t+r*(-.14861*n+1.78277*o)),255*(t+r*(Kt*n+Jt*o)),255*(t+r*(Zt*n)),this.opacity)}}));var nr,or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ir(e){return new ar(e)}function ar(e){if(!(t=or.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function sr(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}ir.prototype=ar.prototype,ar.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var lr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return sr(100*e,t)},r:sr,s:function(e,t){var r=rr(e,t);if(!r)return e+"";var n=r[0],o=r[1],i=o-(nr=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+rr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ur(e){return e}var cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pr(e){var t,r,n=e.grouping&&e.thousands?(t=e.grouping,r=e.thousands,function(e,n){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return i.reverse().join(r)}):ur,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):ur,s=e.percent||"%";function l(e){var t=(e=ir(e)).fill,r=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):lr[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===r)&&(c=!0,t="0",r="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=lr[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,r=e.length,n=1,o=-1;n<r;++n)switch(e[n]){case".":o=t=n;break;case"0":0===o&&(o=n),t=n;break;default:if(o>0){if(!+e[n])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?cr[8+nr/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=n(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=n(w+e,w.length?p-q.length:1/0),w=""),r){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var r=l(((e=ir(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=rr(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-n),i=cr[8+n/3];return function(e){return r(o*e)+i}}}}!function(e){pr(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var dr=new Date,fr=new Date;function mr(e,t,r,n){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},o.round=function(e){var t=o(e),r=o.ceil(e);return e-t<r-e?t:r},o.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},o.range=function(r,n,i){var a,s=[];if(r=o.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return s;do{s.push(a=new Date(+r)),t(r,i),e(r)}while(a<r&&r<n);return s},o.filter=function(r){return mr((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(o.count=function(t,n){return dr.setTime(+t),fr.setTime(+n),e(dr),e(fr),Math.floor(r(dr,fr))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(n?function(t){return n(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var hr=mr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));hr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):hr:null};mr((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),mr((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),mr((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var gr=mr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function yr(e){return mr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var vr=yr(0),br=yr(1);yr(2),yr(3);var xr=yr(4);yr(5),yr(6),mr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var qr=mr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));qr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},mr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),mr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}));var Dr=mr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Cr(e){return mr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var wr=Cr(0),Mr=Cr(1);Cr(2),Cr(3);var Sr=Cr(4);Cr(5),Cr(6),mr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));var Er=mr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Ir(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Tr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ar(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var Or,jr,kr,Lr={"-":"",_:" ",0:"0"},Nr=/^\s*\d+/,Pr=/^%/,Rr=/[\\^$*+?|[\]().{}]/g;function Fr(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(t)+o:o)}function Vr(e){return e.replace(Rr,"\\$&")}function _r(e){return new RegExp("^(?:"+e.map(Vr).join("|")+")","i")}function Hr(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function zr(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ur(e,t,r){var n=Nr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Br(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function $r(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Yr(e,t,r){var n=Nr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Kr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Jr(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Zr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Gr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Xr(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Qr(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function en(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function tn(e,t,r){var n=Nr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function rn(e,t,r){var n=Nr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function nn(e,t,r){var n=Nr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function on(e,t,r){var n=Pr.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function an(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function sn(e,t,r){var n=Nr.exec(t.slice(r));return n?(e.Q=1e3*+n[0],r+n[0].length):-1}function ln(e,t){return Fr(e.getDate(),t,2)}function un(e,t){return Fr(e.getHours(),t,2)}function cn(e,t){return Fr(e.getHours()%12||12,t,2)}function pn(e,t){return Fr(1+gr.count(qr(e),e),t,3)}function dn(e,t){return Fr(e.getMilliseconds(),t,3)}function fn(e,t){return dn(e,t)+"000"}function mn(e,t){return Fr(e.getMonth()+1,t,2)}function hn(e,t){return Fr(e.getMinutes(),t,2)}function gn(e,t){return Fr(e.getSeconds(),t,2)}function yn(e){var t=e.getDay();return 0===t?7:t}function vn(e,t){return Fr(vr.count(qr(e),e),t,2)}function bn(e,t){var r=e.getDay();return e=r>=4||0===r?xr(e):xr.ceil(e),Fr(xr.count(qr(e),e)+(4===qr(e).getDay()),t,2)}function xn(e){return e.getDay()}function qn(e,t){return Fr(br.count(qr(e),e),t,2)}function Dn(e,t){return Fr(e.getFullYear()%100,t,2)}function Cn(e,t){return Fr(e.getFullYear()%1e4,t,4)}function wn(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fr(t/60|0,"0",2)+Fr(t%60,"0",2)}function Mn(e,t){return Fr(e.getUTCDate(),t,2)}function Sn(e,t){return Fr(e.getUTCHours(),t,2)}function En(e,t){return Fr(e.getUTCHours()%12||12,t,2)}function In(e,t){return Fr(1+Dr.count(Er(e),e),t,3)}function Tn(e,t){return Fr(e.getUTCMilliseconds(),t,3)}function An(e,t){return Tn(e,t)+"000"}function On(e,t){return Fr(e.getUTCMonth()+1,t,2)}function jn(e,t){return Fr(e.getUTCMinutes(),t,2)}function kn(e,t){return Fr(e.getUTCSeconds(),t,2)}function Ln(e){var t=e.getUTCDay();return 0===t?7:t}function Nn(e,t){return Fr(wr.count(Er(e),e),t,2)}function Pn(e,t){var r=e.getUTCDay();return e=r>=4||0===r?Sr(e):Sr.ceil(e),Fr(Sr.count(Er(e),e)+(4===Er(e).getUTCDay()),t,2)}function Rn(e){return e.getUTCDay()}function Fn(e,t){return Fr(Mr.count(Er(e),e),t,2)}function Vn(e,t){return Fr(e.getUTCFullYear()%100,t,2)}function _n(e,t){return Fr(e.getUTCFullYear()%1e4,t,4)}function Hn(){return"+0000"}function zn(){return"%"}function Un(e){return+e}function Bn(e){return Math.floor(+e/1e3)}!function(e){Or=function(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=_r(o),c=Hr(o),p=_r(i),d=Hr(i),f=_r(a),m=Hr(a),h=_r(s),g=Hr(s),y=_r(l),v=Hr(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ln,e:ln,f:fn,H:un,I:cn,j:pn,L:dn,m:mn,M:hn,p:function(e){return o[+(e.getHours()>=12)]},Q:Un,s:Bn,S:gn,u:yn,U:vn,V:bn,w:xn,W:qn,x:null,X:null,y:Dn,Y:Cn,Z:wn,"%":zn},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Mn,e:Mn,f:An,H:Sn,I:En,j:In,L:Tn,m:On,M:jn,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Un,s:Bn,S:kn,u:Ln,U:Nn,V:Pn,w:Rn,W:Fn,x:null,X:null,y:Vn,Y:_n,Z:Hn,"%":zn},q={a:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=m[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=d[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.m=v[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return w(e,t,r,n)},d:Gr,e:Gr,f:nn,H:Qr,I:Qr,j:Xr,L:rn,m:Zr,M:en,p:function(e,t,r){var n=u.exec(t.slice(r));return n?(e.p=c[n[0].toLowerCase()],r+n[0].length):-1},Q:an,s:sn,S:tn,u:Ur,U:Br,V:Wr,w:zr,W:$r,x:function(e,t,n){return w(e,r,t,n)},X:function(e,t,r){return w(e,n,t,r)},y:Kr,Y:Yr,Z:Jr,"%":on};function D(e,t){return function(r){var n,o,i,a=[],s=-1,l=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Lr[n=e.charAt(++s)])?n=e.charAt(++s):o="e"===n?" ":"0",(i=t[n])&&(n=i(r,o)),a.push(n),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(r){var n,o,i=Ar(1900);if(w(i,e,r+="",0)!=r.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(n=Tr(Ar(i.y))).getUTCDay(),n=o>4||0===o?Mr.ceil(n):Mr(n),n=Dr.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(o=(n=t(Ar(i.y))).getDay(),n=o>4||0===o?br.ceil(n):br(n),n=gr.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Tr(Ar(i.y)).getUTCDay():t(Ar(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Tr(i)):t(i)}}function w(e,t,r,n){for(var o,i,a=0,s=t.length,l=r.length;a<s;){if(n>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Lr?t.charAt(a++):o])||(n=i(e,r,n))<0)return-1}else if(o!=r.charCodeAt(n++))return-1}return n}return b.x=D(r,b),b.X=D(n,b),b.c=D(t,b),x.x=D(r,x),x.X=D(n,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Ir);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,Tr);return t.toString=function(){return e},t}}}(e),jr=Or.utcFormat,kr=Or.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||jr("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||kr("%Y-%m-%dT%H:%M:%S.%LZ");const Wn=K.bind(null,!0),$n={},{isArray:Yn}=Array;function Kn(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Jn(e){return void 0===e}function Zn(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Gn(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach(((t,o)=>{if(o===r.length)return;n=+t;const i=isNaN(n)?{}:[];e[n||t]=Jn(e[n||t])?i:e[t],e=e[n||t]})),e}function Xn(e,t){let r=!0;if(Kn(e)&&Kn(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((n=>{Xn(e[n],t[n])||(r=!1)})),r);if(Yn(e)&&Yn(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!Xn(e[r],t[r]))return!1;return!0}return e===t}$n.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Wn({},{val:e}).val:e}(t[o]),a=e[o],s=`${r}/${o}`;Xn(i,a)||Zn(t,o)||(Jn(a)?n.push({op:"add",path:s,value:i}):Kn(i)&&Kn(a)?n=n.concat($n.generate(a,i,s)):Yn(i)&&Yn(a)?n=n.concat(function(e,t,r){let n=[];const o=e.slice();let i=-1;function a(e,t,r){if(e[r]&&Jn(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Xn(t,o))return n;if(!Jn(t[0])&&Jn(t[0].qInfo)||0===t.length)return n.push({op:"replace",path:r,value:t}),n;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(n.push({op:"remove",path:`${r}/${e}`}),o.splice(e,1)):n=n.concat($n.generate(o[e],t[i],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:`${r}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Jn(t[o])&&!Zn(e,o)&&n.push({op:"remove",path:`${r}/${o}`})})),n},$n.apply=function(e,t){t.forEach((t=>{let r=Gn(e,t.path),n=t.path.split("/").splice(-1)[0],o=n&&isNaN(+n)?r[n]:r[+n]||r;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(Yn(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(Yn(o)&&Yn(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Kn(o)&&Kn(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Zn(a,e)&&delete a[e]})),Wn(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const o=Gn(e,t.from);Yn(r)?r.splice(+n,0,o.splice(+i,1)[0]):(r[n]=o[i],delete o[i])}else"remove"===t.op&&(Yn(r)?r.splice(+n,1):delete r[n]);var a}))},$n.clone=function(e){return Wn({},e)},$n.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},$n.updateObject=function(e,t){Object.keys(e).length?$n.apply(e,$n.generate(e,t)):Wn(e,t)};const Qn=[[2,4,6],[2,4],[3]],eo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function to(e,t,r){const n=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<n;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==r&&(i=Math.min(i,r/e[n-1])),e.splice(0,0,i)}function ro(e,t,r){let n;const o=e?e.length:0;for(n=0;n<o;n++)to(e[n],t,r)}!function(){let e,t;for(ro(Qn,1,10),e=0;e<eo.length;e++)if(eo[e])for(t=0;t<eo[e].length;t++)Array.isArray(eo[e][t])&&ro(eo[e][t])}();var no={exports:{}};function oo(){}function io(){}io.resetWarningCache=oo;no.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:io,resetWarningCache:oo};return r.PropTypes=r,r}();var ao=no.exports;function so(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function lo({d:e,size:t,style:r={},viewBox:n="0 0 16 16"}){const i={fontSize:so(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...r};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor"},o.createElement("path",{d:e})))}const uo={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},co={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},po="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",fo={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},mo={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function ho(e,t,r){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:r}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(r,"qHyperCubeDef.");let n=$n.generate(t,r);n&&n.length&&(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(n,!0))}))}function go(e,t,r,n,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[n][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[n][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[n][r]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),ho(e,a,s)}))}function yo({dir:e,dock:t,altList:r,model:n,translator:o,app:i,onChange:a}){return 0===r.length?null:{dir:e,dock:t,getAlternatives(){const e=r.map((e=>function(e,t,r){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:r.get("Object.ErrorMessage.MissingDimension")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){go(n,e,t,"qDimensions",a)}}}function vo(e,t,r,n="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){r.drillUp(n,t,e)}};var o}function bo({altList:e,app:t,dir:r,dock:n,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:r,dock:n,getAlternatives(){const r=e.map((e=>function(e,t,r){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:r.get("Object.ErrorMessage.MissingMeasure")));const n=e.qDef.qLabelExpression;if(n)return t.evaluate(n);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(r)},changeTo(e,t){go(o,e,t,"qMeasures",i,a)}}}function xo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const qo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Do=({children:e,...t})=>o.createElement(i,P({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Co(){function e({title:e,selected:t,onClick:r}){const n=ue.detectTextDirection(e);return o.createElement(l,{button:!0,onClick:r,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(lo,{d:t?po:""})),o.createElement(c,{primaryTypographyProps:{dir:n}},e))}function t({alignTo:t,changeTo:r,current:n,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,n)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>r(n)})));return o.createElement(a,P({anchorEl:t,open:p,onClose:c},qo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,component:"nav"},o.createElement(e,{title:n,selected:!0,onClick:c}),d))}e.propTypes={title:ao.string.isRequired,selected:ao.bool,onClick:ao.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:ao.any,changeTo:ao.func.isRequired,current:ao.string.isRequired,dir:ao.string.isRequired,dock:ao.string.isRequired,list:ao.array,onClose:ao.func.isRequired,show:ao.bool.isRequired},t.defaultProps={list:[],alignTo:null};class r extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:r,translator:n,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,r)=>o.createElement(Do,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:r,onClick:()=>d?void 0:e.drillUp(p-r),title:t},o.createElement("span",{style:c},t),o.createElement(lo,P({},mo,{size:"small",style:{margin:"0 8px"}}))))),m=r&&!this.state.open?this.openPopover:this.closePopover,h=!r||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=ue.detectTextDirection(e.text),v=o.createElement(Do,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(lo,P({},co,{size:"small",title:n.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),r&&o.createElement(lo,P({},fo,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(lo,P({},uo,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),r&&o.createElement(t,{dock:r.dock,dir:r.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function n(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&re(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:ao.bool.isRequired,padding:ao.string,minWidth:ao.string,titleData:ao.shape({breadcrumbs:ao.arrayOf(ao.string).isRequired,drilldown:ao.bool.isRequired,index:ao.number.isRequired,locked:ao.bool.isRequired,text:ao.string.isRequired,popoverText:ao.string.isRequired,drillUp:ao.func}).isRequired,popover:ao.shape({dir:ao.string.isRequired,dock:ao.string.isRequired,changeTo:ao.func.isRequired,getAlternatives:ao.func.isRequired}),translator:ao.shape({get:ao.func.isRequired}).isRequired,selections:ao.shape({isActive:ao.func,addListener:ao.func,removeListener:ao.func}),style:ao.shape({fontSize:ao.string,color:ao.string,fontFamily:ao.string}).isRequired,isDimension:ao.bool.isRequired,hasAlternative:ao.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left"):"right"===e&&(r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left"),r}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?yo:bo,M=u?vo:xo,S=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:n(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&re(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const T=C.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,a=M(e,i,p),s=n===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(r,{popover:S,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},T)}}}function wo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>r?r:e}function Mo(e){if(e.type)return e;if("#"===e.charAt(0))return Mo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb(".concat(r.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=e.substring(t+1,e.length-1).split(",");return{type:r,values:n=n.map((function(e){return parseFloat(e)}))}}function So(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function Eo(e){var t="hsl"===(e=Mo(e)).type?Mo(function(e){var t=(e=Mo(e)).values,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),So({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Io(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function To(){return(To=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Ao(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Oo(){return(Oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function jo(e){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ko(e){return(ko="function"==typeof Symbol&&"symbol"===jo(Symbol.iterator)?function(e){return jo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":jo(e)})(e)}function Lo(e){return e&&"object"===ko(e)&&!Array.isArray(e)}function No(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=r.clone?Oo({},e):e;return Lo(e)&&Lo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Lo(t[o])&&o in e?n[o]=No(e[o],t[o],r):n[o]=t[o])})),n}var Po=["xs","sm","md","lg","xl"];function Ro(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,n=e.unit,o=void 0===n?"px":n,i=e.step,a=void 0===i?5:i,s=Ao(e,["values","unit","step"]);function l(e){var t="number"==typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var n=Po.indexOf(t)+1;return n===Po.length?l(e):"@media (min-width:".concat(r[e]).concat(o,") and ")+"(max-width:".concat(r[Po[n]]-a/100).concat(o,")")}return To({keys:Po,values:r,up:l,down:function(e){var t=Po.indexOf(e)+1,n=r[Po[t]];return t===Po.length?l("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return r[e]}},s)}function Fo(e,t,r){var n;return To({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return To({paddingLeft:t(2),paddingRight:t(2)},r,Io({},e.up("sm"),To({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},Io(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Io(n,e.up("sm"),{minHeight:64}),n)},r)}var Vo={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},_o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Ho={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},zo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Uo={black:"#000",white:"#fff"},Bo={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Uo.white,default:Ho[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Wo={text:{primary:Uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ho[800],default:"#303030"},action:{active:Uo.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function $o(e,t,r,n){e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return So(e)}(e.main,n):"dark"===t&&(e.dark=function(e,t){if(e=Mo(e),t=wo(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return So(e)}(e.main,1.5*n)))}function Yo(e){var t=e.primary,r=void 0===t?{light:Vo[300],main:Vo[500],dark:Vo[700]}:t,n=e.secondary,o=void 0===n?{light:_o.A200,main:_o.A400,dark:_o.A700}:n,i=e.error,a=void 0===i?{light:zo[300],main:zo[500],dark:zo[700]}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,p=e.tonalOffset,d=void 0===p?.2:p,f=Ao(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var r=Eo(e),n=Eo(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}(e,Wo.text.primary)>=c?Wo.text.primary:Bo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=To({},e)).main&&e[t]&&(e.main=e[t]),$o(e,"light",r,d),$o(e,"dark",n,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Wo,light:Bo};return No(To({common:Uo,type:l,primary:h(r),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ho,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function Ko(e){return Math.round(1e5*e)/1e5}var Jo={textTransform:"uppercase"};function Zo(e,t){var r="function"==typeof t?t(e):t,n=r.fontFamily,o=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,i=r.fontSize,a=void 0===i?14:i,s=r.fontWeightLight,l=void 0===s?300:s,u=r.fontWeightRegular,c=void 0===u?400:u,p=r.fontWeightMedium,d=void 0===p?500:p,f=r.fontWeightBold,m=void 0===f?700:f,h=r.htmlFontSize,g=void 0===h?16:h,y=r.allVariants,v=r.pxToRem,b=Ao(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,r,n,i){return To({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(Ko(n/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,Jo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Jo)};return No(To({htmlFontSize:g,pxToRem:q,round:Ko,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Go(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Xo=["none",Go(0,2,1,-1,0,1,1,0,0,1,3,0),Go(0,3,1,-2,0,2,2,0,0,1,5,0),Go(0,3,3,-2,0,3,4,0,0,1,8,0),Go(0,2,4,-1,0,4,5,0,0,1,10,0),Go(0,3,5,-1,0,5,8,0,0,1,14,0),Go(0,3,5,-1,0,6,10,0,0,1,18,0),Go(0,4,5,-2,0,7,10,1,0,2,16,1),Go(0,5,5,-3,0,8,10,1,0,3,14,2),Go(0,5,6,-3,0,9,12,1,0,3,16,2),Go(0,6,6,-3,0,10,14,1,0,4,18,3),Go(0,6,7,-4,0,11,15,1,0,4,20,3),Go(0,7,8,-4,0,12,17,2,0,5,22,4),Go(0,7,8,-4,0,13,19,2,0,5,24,4),Go(0,7,9,-4,0,14,21,2,0,5,26,4),Go(0,8,9,-5,0,15,22,2,0,6,28,5),Go(0,8,10,-5,0,16,24,2,0,6,30,5),Go(0,8,11,-5,0,17,26,2,0,6,32,5),Go(0,9,11,-5,0,18,28,2,0,7,34,6),Go(0,9,12,-6,0,19,29,2,0,7,36,6),Go(0,10,13,-6,0,20,31,3,0,8,38,7),Go(0,10,13,-6,0,21,33,3,0,8,40,7),Go(0,10,14,-6,0,22,35,3,0,8,42,7),Go(0,11,14,-7,0,23,36,3,0,9,44,8),Go(0,11,15,-7,0,24,38,3,0,9,46,8)],Qo={borderRadius:4};function ei(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var r=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return 0===r.length?e(1):1===r.length?e(r[0]):r.map((function(t){var r=e(t);return"number"==typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var ti={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ri={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ni=function(e){return"".concat(Math.round(e),"ms")},oi={easing:ti,duration:ri,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,n=void 0===r?ri.standard:r,o=t.easing,i=void 0===o?ti.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Ao(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:ni(n)," ").concat(i," ").concat("string"==typeof s?s:ni(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ii={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,n=e.mixins,o=void 0===n?{}:n,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Ao(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Yo(a),f=Ro(r),m=ei(l),h=To({breakpoints:f,direction:"ltr",mixins:Fo(f,m,o),overrides:{},palette:d,props:{},shadows:s||Xo,typography:Zo(d,c),spacing:m},No({shape:Qo,transitions:oi,zIndex:ii},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const si=d({productionPrefix:"qba58",disableGlobal:!0,seed:""});function li(){function e({x:e,y:t,width:r,height:n,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(r)?a.width:r,a.height=Number.isNaN(n)?a.height:n,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:r=document.createElement.bind(document)}=t;let n,i=e();const a={element:()=>n,root:()=>n,appendTo:e=>(n||(n=r("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),render(e){if(!n)return!1;const t=i.scaleRatio.x,r=i.scaleRatio.y;return n.style.left=Math.round(i.margin.left+i.x*t)+"px",n.style.top=Math.round(i.margin.top+i.y*r)+"px",n.style.width=Math.round(i.width)+"px",n.style.height=Math.round(i.height)+"px",n.style.transform=`scale(${t}, ${r})`,n.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:ai},e))}(e,si),n),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(n&&p.unmountComponentAtNode(n),a),destroy(){n&&n.parentElement&&(p.unmountComponentAtNode(n),n.parentElement.removeChild(n)),n=null},size:t=>(t&&(i=e(t)),i)};return a}}function ui(){return function(e){e.renderer("react",li()),e.component("data-title",Co()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:ao.string.isRequired,spanStyle:ao.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",a=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=t.height+"px",r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=t.height+"px",r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=t.width+"px",r.height=t.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),s="center"===n?t:"* "+t,l="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function ci(e){return tt(e).l<70}function pi(e,t){const r=tt(e).l/100,n=tt(t).l/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}function di(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var fi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const r=e.component(t.component);if(!r)return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];if(r.settings.settings.slice.cornerRadius>0||r.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=n[n.length-1];for(let e=0;e<n.length;e+=1){const t=n[e],r=i.attrs.fill,a=t.attrs.fill;if(pi(a,r)<=1.2){const{start:e,offset:r}=t.desc.slice;let{innerRadius:n,outerRadius:s}=t.desc.slice;if(n=Math.max(n,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>n){const t=di({r:s,a:e},r),i=di({r:n,a:e},r);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:ci(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function mi(e,t=!0){let r="";for(let t=0;t<e.length;t++){const n=e[t];r+=0===t?`M${n.x} ${n.y}`:`L${n.x} ${n.y}`,r+=" "}return t&&(r+="Z"),r}function hi(e){const{size:t,angle:r}=e,n={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,r={x:0,y:0}){const n=Math.cos(t),o=Math.sin(t),i=(s=r,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:n*i.x-o*i.y,y:o*i.x+n*i.y},r)}(e,r,n))),{type:"path",fill:e.fill,d:mi(s)}}var gi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];const n=[];for(let e=0;e<r.length;e+=1){const a=r[e];if(a.data.radius.value<0){const{start:e,end:r,offset:s}=a.desc.slice,l=(e+r)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=hi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},n.push(c)}}var o,i;return n}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function yi(e){return(yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vi(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function bi(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){vi(i,n,o,a,s,"next",e)}function s(e){vi(i,n,o,a,s,"throw",e)}a(void 0)}))}}function xi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qi(Object(r),!0).forEach((function(t){xi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ci(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function wi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||Si(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mi(e){return function(e){if(Array.isArray(e))return Ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Si(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Si(e,t){if(e){if("string"==typeof e)return Ei(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ei(e,t):void 0}}function Ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ii=Object.prototype.hasOwnProperty,Ti=Object.prototype.toString,Ai=Object.defineProperty,Oi=Object.getOwnPropertyDescriptor,ji=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ti.call(e)},ki=function(e){if(!e||"[object Object]"!==Ti.call(e))return!1;var t,r=Ii.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ii.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Ii.call(e,t)},Li=function(e,t){Ai&&"__proto__"===t.name?Ai(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ni=function(e,t){if("__proto__"===t){if(!Ii.call(e,t))return;if(Oi)return Oi(e,t).value}return e[t]},Pi=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Ni(s,r),s!==(o=Ni(t,r))&&(c&&o&&(ki(o)||(i=ji(o)))?(i?(i=!1,a=n&&ji(n)?n:[]):a=n&&ki(n)?n:{},Li(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&Li(s,{name:r,newValue:o}));return s};function Ri(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Fi(e,t){return{range:function(e){var r=e.resources,n=e.data,o=r.theme.palette("categorical",t);return n.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Vi(e,t,r,n,o){var i,a=o.byRow,s=o.byElemNo;if(n&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===r.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(n,n.raw().qCardinal);if(n){var l=t.pic.extract({field:n.key(),trackBy:n.value}).length;return a(n,l)}return{}}function _i(e,t){var r=e.hc.qDimensionInfo,n=t.input.byDimDef||{activeDimensionIndex:r.length-1};if(n.activeDimensionIndex>=0){var o=r[n.activeDimensionIndex];n=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:n.activeDimensionIndex}:{activeDimensionIndex:n.activeDimensionIndex}}return n}function Hi(e,t){var r;return t.activeDimensionIndex>=0?r=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(r=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r}function zi(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ui(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Bi(){}var Wi=1/.7,$i="\\s*([+-]?\\d+)\\s*",Yi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ji=/^#([0-9a-f]{3,8})$/,Zi=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgb\\("+[Ki,Ki,Ki]+"\\)$"),Xi=new RegExp("^rgba\\("+[$i,$i,$i,Yi]+"\\)$"),Qi=new RegExp("^rgba\\("+[Ki,Ki,Ki,Yi]+"\\)$"),ea=new RegExp("^hsl\\("+[Yi,Ki,Ki]+"\\)$"),ta=new RegExp("^hsla\\("+[Yi,Ki,Ki,Yi]+"\\)$"),ra={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function na(){return this.rgb().formatHex()}function oa(){return this.rgb().formatRgb()}function ia(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ji.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?aa(t):3===r?new ca(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?sa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?sa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Zi.exec(e))?new ca(t[1],t[2],t[3],1):(t=Gi.exec(e))?new ca(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xi.exec(e))?sa(t[1],t[2],t[3],t[4]):(t=Qi.exec(e))?sa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ea.exec(e))?ma(t[1],t[2]/100,t[3]/100,1):(t=ta.exec(e))?ma(t[1],t[2]/100,t[3]/100,t[4]):ra.hasOwnProperty(e)?aa(ra[e]):"transparent"===e?new ca(NaN,NaN,NaN,0):null}function aa(e){return new ca(e>>16&255,e>>8&255,255&e,1)}function sa(e,t,r,n){return n<=0&&(e=t=r=NaN),new ca(e,t,r,n)}function la(e){return e instanceof Bi||(e=ia(e)),e?new ca((e=e.rgb()).r,e.g,e.b,e.opacity):new ca}function ua(e,t,r,n){return 1===arguments.length?la(e):new ca(e,t,r,null==n?1:n)}function ca(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function pa(){return"#"+fa(this.r)+fa(this.g)+fa(this.b)}function da(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function fa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ma(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ga(e,t,r,n)}function ha(e){if(e instanceof ga)return new ga(e.h,e.s,e.l,e.opacity);if(e instanceof Bi||(e=ia(e)),!e)return new ga;if(e instanceof ga)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ga(a,s,l,e.opacity)}function ga(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ya(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function va(e){return function(){return e}}function ba(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):va(isNaN(e)?t:e)}zi(Bi,ia,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:na,formatHex:na,formatHsl:function(){return ha(this).formatHsl()},formatRgb:oa,toString:oa}),zi(ca,ua,Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pa,formatHex:pa,formatRgb:da,toString:da})),zi(ga,(function(e,t,r,n){return 1===arguments.length?ha(e):new ga(e,t,r,null==n?1:n)}),Ui(Bi,{brighter:function(e){return e=null==e?Wi:Math.pow(Wi,e),new ga(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ga(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new ca(ya(e>=240?e-240:e+120,o,n),ya(e,o,n),ya(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var xa=function e(t){var r=function(e){return 1==(e=+e)?ba:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):va(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ua(e)).r,(t=ua(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=ba(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),qa=/^class(-pyramid)?/,Da=function(e,t,r,n){var o=void 0!==r.min?r.min:n.min(),i=void 0!==r.max?r.max:n.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Mi(c))),i=Math.max.apply(Math,[i].concat(Mi(c))),u.min=o,u.max=i,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,r=e.max,n=e.limits,o=e.range,i=[],a=[];if(n.length)if(n[n.length-1]<t)a.push(t,r),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(n[0]>r)a.push(t,r),i.push(o[0],o[0],o[0]);else{if(n[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<n.length;s++)if(t<n[s]){i.push(o[s]);break}}for(var l=0;l<n.length;l++)t<n[l]&&n[l]<r&&(a.push(n[l]),i.push(o[l]));if(n[n.length-1]<r)a.push(r),i.push(o[n.length]),i.push(o[n.length]);else{a.push(r);for(var u=0;u<n.length;u++)if(n[u]>r){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:r,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=xa(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&d[f+1]&&(u.range.push(p[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(p[f]),u.range.push(p[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(p[p.length-1]),u.domain.push(i)}else u.domain=c,u.range=p;return u};function Ca(e,t,r,n,o){var i,a,s,l=0,u=[],c=(e-t)/(n+1);if(0===c)return 1;for(i=0;i<r.length;i+=1)a=.99*(r[i]-t),s=r[i]>e?Math.floor(e/c):r[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=n||l>=o?Math.max(l,n):Ca(e,t,r,n+1,o)}var wa=function(e,t,r,n){var o,i,a=t.theme,s=t.hc,l=n.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:r.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=r.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=r.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Mi(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===r.input.autoMinMax){if(u.min=r.input.measureMin,u.max=r.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Mi(c)),u.max=Math.max.apply(Math,Mi(c))}if(r.input.measureScheme&&(u.palettes={quant:r.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===r.input.measureScheme}))[0];u.type=d&&qa.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Mi(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Ca(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),r=Math.max(1,Math.floor(t.length/f)),n=[],o=0;o<f;o+=1)n.push(t[o*r]);return[n[0]].concat(n,[n[n.length-1]])}}return u};function Ma(e,t){var r;return t.activeMeasureIndex>=0?r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?r=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(r=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),r||(r=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(r=e.pic.fields().filter((function(e){return"measure"===e.type()}))[r.raw().matchMeasure]),r}function Sa(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ea(e,t){for(var r=(null==t?void 0:t.domain)||[],n=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=r.indexOf(i);-1===s?(r.push(i),n.push(a.primary)):n[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=r.indexOf(i);-1!==l&&(r.splice(l,1),n.splice(l,1))}}return{domain:r,range:n,exclude:o}}function Ia(e,t,r,n){var o=function(e,t,r,n){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,r){var n=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ma:i,s=r.input.byMeasureDef||{activeMeasureIndex:0},l=a(r,s),u=wa(0,{theme:n,hc:o},r,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=r.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=r.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),r.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Pi(u,Da(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,r,t);if("byDimension"===t.input.mode)return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.getCDef,i=void 0===o?_i:o,a=n.getCByField,s=void 0===a?Hi:a,l=n.getPersistence,u=void 0===l?Vi:l,c=i(t,r),p=s(r,c),d=p?p.raw():{},f=r&&r.pic?r.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=r.input.altLabel)),!m.label&&p&&(m.label=p.title()),r.input.dimensionScheme&&(m.palettes={categorical:r.input.dimensionScheme}),r.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Pi(m,u(t,r,c,p,{byRow:Fi,byElemNo:Ri})),m}(e,r,t);if("byExpression"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||r.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:n.nil};if(r.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=wa(0,{hc:o,theme:i},r,{f:s});return l.invalid||(l.label=r.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,r,t,n);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,r,n){var o=t.hc,i=t.theme,a=t.translator,s=r.input.useBaseColors;if(("byMultiple"===r.input.mode||"primary"===r.input.mode&&"measure"===r.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===r.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(n.primary):u.push(o)}}));var c=r.input.dimensionScheme?{categorical:r.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===r.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,r){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(r);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(n.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=n.primary;if(void 0!==r.input.paletteColor)r.input.paletteColor&&(m=e.resolveUIColor(r.input.paletteColor));else{var h=r.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,r,t,n)}return{}}(e,t,r,n);return t.input.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(r,o){return function(e){var t,r=e.cm,n=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,r){var n=r.primary;return void 0!==t.paletteColor&&t.paletteColor&&(n=e.resolveUIColor(t.paletteColor)),Di(Di({},r),{},{mode:"constant",type:"constant",primary:n})}(r,i,n):"byExpression"===s?function(e,t,r){var n="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(n)&&"colorByMeasureExpression"===e.raw().id})),i=o;return Di(Di({},r),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:r.nil})}(o,a,n):null}({cm:e,input:r,defaults:n,index:o,pic:t.pic})})),function(e,t){var r,n,o,i=t.translator;if(Sa(e),1===(null===(r=e.measureOverrides)||void 0===r?void 0:r.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Ea(e.measureOverrides,e.explicit),Sa(e)),null!==(n=e.measureOverrides)&&void 0!==n&&n.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=Ea(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,r)):o}function Ta(e){var t=Di({hc:null,colorProps:null,layout:null,theme:null},e),r={},n={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(n.auto=e,o):n.auto},getDimensionColorMap:function(e){return e?(n.getDimensionColorMap=e,o):n.getDimensionColorMap},getAttributeDimension:function(e){return e?(n.getAttributeDimension=e,o):n.getAttributeDimension},getMeasure:function(e){return e?(n.getMeasure=e,o):n.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Pi(t,e),(r={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=n.auto(e.layout);r.input=Pi(!0,{},r.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(r.input.dimensionScheme=a[0].key);var s=0;r.input.byDimDef&&+r.input.byDimDef.activeDimensionIndex>=0&&(s=+r.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&r.input.byDimDef&&(r.input.byDimDef.type="libraryItem",r.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=r.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(r.input=Pi(!1,{},r.input,{measureOverrides:null}))},palettes:function(){if(!r.palettes){var e=t.theme,n=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){n.push({key:"ui",colors:e.colors})})),r.palettes=n}return r.palettes},getAuxiliaryData:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return n.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(r,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?n.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?n.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,n){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,n).then((function(n){if(!n)return{};if("measure"===e.fieldType){if(n.coloring&&n.coloring.gradient){var i=r.pic.field(e.field);return Da(o,n.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=n[0],l=n[1]?n[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[r.pic.field(e.field).raw(),r.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,r,n){var o=n.external,i=n.field,a=Di({},e);Pi(a,Ri(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=r.resolveUIColor(t.nul)),t.oth&&(a.others=r.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Pi(a,Ri(i)))):!1===t.autoFill&&t.single?a.range=[r.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Pi(a,Ri(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,r){for(var n={},o=0;o<e.length;o+=1)n[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;n[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(n[u])))}return a.push(-3,-2),i.push(r.others),i.push(r.nil),a},range:function(){return i}}}(t.colors,r,a)),a}(a,l,o,{external:t,field:r.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===r.uiPalette&&(r.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!r.uiPalette)return e.color;var t="none"===r.uiPalette.colors[0]?e.index:e.index-1;return void 0===r.uiPalette.colors[t]?e.color:r.uiPalette.colors[t]},settings:function(){if(this.palettes(),!r.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},n=t.theme;n&&(e=Di(Di({},e),n.getDataColorSpecials())),r.settings=Pi(e,Ia(this,r,t,e))}return r.settings}};return o}var Aa=function(e,t){var r=e.fieldType,n={};if(t)if("measure"===r){var o=t.coloring;o&&(n.measureGradient=o.gradient)}else if("dimension"===r){var i=t[0],a=t[1];i&&(n.legendDataPage=i),a&&(n.dimValsData=a.colorMap)}return n},Oa=function(e){throw e.isHandled=!0,e},ja=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:r.snapshotData.content.chartData.dimValsData}):Promise.reject():n&&n.getObject?n.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},ka=function(e,t){var r=t.layout,n=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:r.snapshotData.content.chartData.measureGradient}}):Promise.reject():n&&n.getMeasure?n.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},La=function(e,t){var r=t.layout,n=t.model,o=t.app;return r&&r.snapshotData?r.snapshotData.content&&r.snapshotData.content.chartData&&r.snapshotData.content.chartData.legendDataPage?Promise.resolve(r.snapshotData.content.chartData.legendDataPage):Promise.reject():n&&n.session&&o?n.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Oa):Promise.reject()};function Na(e){var t=e.hc,r=e.source,n=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:r,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Pa(e){return function(t){return"object"===yi(t.datum[e])?t.datum[e].value:void 0}}function Ra(e){return"object"===yi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Fa(e){return-3===e.datum.value}var Va=function(e,t,r){var n=e&&e.dock||void 0;if("auto"!==n)return n||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return r?"left":"right"},_a=function(e,t,r){return!(r.invalid||"color"===r.type||"measure"===r.mode&&t.qMeasureInfo.length<=1||"dimension"===r.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Ha(e,t){var r=e.styleReference,n=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Va(i,n,o)},show:"function"==typeof i.show?function(){return _a(i,l,a)}:_a(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(r,"legend.title","color"):void 0,fontSize:s?s.getStyle(r,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(r,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function za(e,t,r){var n=[],o=[],i=function(e,t,r){return"categorical"===t.coloring.type?function(e,t,r){var n=Ha(e,t);if(!n.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return Pi(!0,n,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(n.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:r,button:{content:function(e,t){var r=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[r]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,r):"continuous"===t.coloring.type&&function(e,t){var r=e.key,n=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Ha(e,t);return!!u.show&&Pi(!0,u,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(n,"legend.label","color"):void 0,fontSize:l?l.getStyle(n,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(n,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}(e,t,r&&r.navigationDisabled);return n.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,r=e.requireFailure,n=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,r){var n;if(!r)return!0;if(null!=o&&null!==(n=o.interact)&&void 0!==n&&n.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=r.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,r)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventName,n=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:r,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===r||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:(e={},xi(e,"".concat(r,"start"),(function(e){e.preventDefault(),this.started!==r&&(this.started=r,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),xi(e,"".concat(r,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),xi(e,"".concat(r,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,r))),{interactions:o,components:n}}var Ua=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Ba(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,r=Ta(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var r=t.layout,n=t.app;return ja(e,{layout:r,app:n})})).getMeasure((function(e,t){var r=t.layout,n=t.app;return ka(e,{layout:r,app:n})})).getAttributeDimension((function(e,t){var r=t.layout,n=t.model,o=t.app;return La(e,{layout:r,model:n,app:o})}));return r.getSnapshotData=Aa,r}({resources:e}),r={},n={},o=function(e){return n.settings||(e||console.warn("settings() called before auxiliarySettings()"),n.settings=t.settings()),n.settings},i={config:function(o){if(r=Di({},o),n={},!r.key)throw new Error("Missing key");t.set(Di(Di({},e),r))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return n.auxiliarySettings?Promise.resolve(n.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return n.auxiliarySettings=e||{},n.settings=Di(Di({},n.settings),n.auxiliarySettings),n.scales=void 0,n.color=void 0,n.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var r=o();return t.getAuxiliaryData(r,e).then((function(e){return t.getSnapshotData(r,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=o().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var r=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||r)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,r=e.coloring,n=e.theme,o=[];if(r&&r.palettes&&n){var i=r.palettes.categorical||t.dimensionScheme,a=n.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||n.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=r.palettes.metric||t.measureScheme,l=n.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Mi(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),colorProps:r.colorProps,theme:r.theme})},scales:function(){return n.scales=n.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,r=e.coloring,n=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(r){var u={override:!0,domain:r.explicit&&"function"==typeof r.explicit.domain?r.explicit.domain:[].concat(Mi((r.explicit||{}).domain||[]),[-3,-2]),range:r.explicit&&"function"==typeof r.explicit.range?r.explicit.range:[].concat(Mi((r.explicit||{}).range||[]),[r.others,r.nil])};if("field"===r.mode){if("dimension"===r.fieldType){var c,p=Na({hc:t,source:i,coloring:r}).data;if(r.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:r.field,trackBy:r.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:r.range,domain:r.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=Di(Di({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===r.fieldType){var h={data:{field:r.field},min:r.min,max:r.max};s[l]=Pi({},h,{type:"categorical"===r.type?"threshold-color":"sequential-color",range:r.range,domain:r.domain,invert:r.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Pi({},h,{invert:!!n}))}else if("color"!==r.type)throw new Error("UNUSED FIELD")}else if("dimension"===r.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===r.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,n;return!(null!==(t=r.explicit)&&void 0!==t&&null!==(n=t.exclude)&&void 0!==n&&n.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:r.hc,coloring:o(),key:r.key,source:r.source,picasso:e.picasso}),n.scales},color:function(){return n.color=n.color||function(e){var t=e.coloring,r=e.scales,n=e.key,o=Pa(n),i=Pa("".concat(n,"IsAnOther")),a=function(e,t){var n=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Fa(e)||i(e)?u:l}:r[t]?function(e){return Fa(e)?u:Ra(e)||-2===o(e)&&"dimension"===n||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Fa(e)||i(e)?u:Ra(e)?l:c}:"color"===p?function(e){return Fa(e)||i(e)?u:Ra(e)?l:o(e)||u}:null},s=a(t,n);if(t.measureOverrides){var l=Pa("".concat(n,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:r.key}),n.color},datumProps:function(e){return function(e){var t,r,n=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(r={field:t,reduce:"first"},"color"===o.type&&(r.value=function(e){return"NaN"!==e.qNum?Ua(e.qNum):e.qText&&ia(e.qText)?e.qText:c})):"dimension"===o.mode?r=void 0!==o.field?o.field:n.qDimensionInfo.length-1:"measure"===o.mode&&(r=l);var p=xi({},u,r);return n.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:n.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:r.key,hc:r.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:r.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return za({eventName:t,key:n,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:r.legendProps,scaleKey:r.key,coloring:o(),theme:r.theme,hc:r.hc,scales:this.scales()},m)}};return i}var Wa=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function $a(e){var t=e.qHyperCube,r=t.qDimensionInfo,n=t.qMeasureInfo,o=r.some(Wa),i=n.some(Wa),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function Ya(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Di(Di(Di({},e),t),{},{colorProps:Di(Di({},e.colorProps),t.colorProps||{})});return r}var Ka=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Ja(e){var t,r=e.qHyperCube.qDimensionInfo.some(Ka),n=e.qHyperCube.qMeasureInfo.some(Ka),o=r?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:n?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Za=function(){};function Ga(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(n,i)};clearTimeout(t),t=setTimeout(s,r)}}function Xa(e){var t=e.originalArray,r=e.newArray,n=e.matchKey;return Array.isArray(t)&&t.length?(r.forEach((function(e){var r=-1;t.some((function(t,o){return t[n]&&t[n]===e[n]&&(r=o),r})),r>-1?t[r]=e:t.push(e)})),t):r}function Qa(e){return(Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ts(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rs(e,t,r){return t&&ts(e.prototype,t),r&&ts(e,r),e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?os(Object(r),!0).forEach((function(t){ns(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):os(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function as(e,t){return(as=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ls(e,t,r){return(ls=ss()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&as(o,r.prototype),o}).apply(null,arguments)}function us(e){return function(e){if(Array.isArray(e))return ps(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||cs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cs(e,t){if(e){if("string"==typeof e)return ps(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ps(e,t):void 0}}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ds=Object.prototype.hasOwnProperty,fs=Object.prototype.toString,ms=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,gs=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===fs.call(e)},ys=function(e){if(!e||"[object Object]"!==fs.call(e))return!1;var t,r=ds.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ds.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||ds.call(e,t)},vs=function(e,t){ms&&"__proto__"===t.name?ms(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},bs=function(e,t){if("__proto__"===t){if(!ds.call(e,t))return;if(hs)return hs(e,t).value}return e[t]},xs=function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=bs(s,r),s!==(o=bs(t,r))&&(c&&o&&(ys(o)||(i=gs(o)))?(i?(i=!1,a=n&&gs(n)?n:[]):a=n&&ys(n)?n:{},vs(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&vs(s,{name:r,newValue:o}));return s};function qs(e,t,r){if(!e)return-1;var n=r.cache,o=e.origin?e.origin():null;o&&(e=o);var i=n.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<n.wrappedFields.length;l++)if(s=n.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=n.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Ds(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Cs(e){var t=e.cache,r=e.f,n=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=n;if(o.field&&o.field!==r){var d=qs(o.field,i,{cache:t});if(-1===d)return;p=xs({qRow:a},d(s))}u[c]=Ds(o,p,{key:l})}function ws(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=Qa(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=qs(u,s.qDataPages[b],{cache:r});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=xs({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Ds(d,C,{key:l});if(!d.filter||d.filter(C)){for(var M=0;M<f.length;M++){var S=p[f[M]],E=S.fields||[S];S.fields&&(w[f[M]]=[]);for(var I=0;I<E.length;I++)Cs({cache:r,f:u,mainCell:C,p:E[I],prop:f[M],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:S.fields?w[f[M]]:w,targetProp:S.fields?I:f[M]});if(S.fields){var T=w[f[M]].map((function(e){return e.value})),A=w[f[M]].map((function(e){return e.label}));w[f[M]]={value:"function"==typeof S.value?S.value(T):void 0!==S.value?S.value:T,label:"function"==typeof S.label?S.label(A):void 0!==S.label?String(S.label):String(w[f[M]].value)}}}m&&n.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,us(n.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Ms(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Ss(e,t){var r,n,o,i,a,s=new As(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Es);r=u.pop();)if(l&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)u.push(n=r.children[i]=new As(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Ts)}function Es(e){return e.children}function Is(e){e.data=e.data.data}function Ts(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function As(e){this.data=e,this.depth=this.height=0,this.parent=null}function Os(e){if("function"!=typeof e)throw new Error;return e}As.prototype=Ss.prototype={constructor:As,count:function(){return this.eachAfter(Ms)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Ss(this).eachBefore(Is)}};var js={depth:-1},ks={};function Ls(e){return e.id}function Ns(e){return e.parentId}function Ps(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),o=t,i=0;i<n.length;i++){if("*"===n[i]&&Array.isArray(o)){var a=[];r=n.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Ps(r,o[s]);Array.isArray(l)?a.push.apply(a,us(l)):a.push(l)}return a}if(!n[i]&&Array.isArray(o)){var u=new Array(o.length);r=n.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Ps(r,o[c]);return u}n[i]in o&&(o=o[n[i]])}return o}function Rs(e,t,r){var n=[];if(!e||!e.length)return n;if(t<=0){var o=r>=0?[e[r]]:e;n.push.apply(n,us(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&n.push.apply(n,us(Rs(e[i].children,t-1,r)));return n}function Fs(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),o=us(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Rs(e.children,i-1,r)}}return!1}function Vs(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var o=0;o<n.length;o++)if(e(n[o]))return n[o];return!1}if("string"==typeof e){for(var i=0;i<n.length;i++)if(n[i].key()===e||n[i].title()===e)return n[i]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var _s=/^qDimensionInfo(?:\/(\d+))?/,Hs=/^\/?qMeasureInfo\/(\d+)/,zs=/\/qAttrExprInfo\/(\d+)/,Us=/\/qAttrDimInfo\/(\d+)/;function Bs(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function Ws(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=n,p=r.qEffectiveInterColumnSortOrder,d=Bs(r);return _s.test(c)&&(o=!0,i=+_s.exec(c)[1],c=n.replace(_s,"")),Hs.test(c)&&("K"===r.qMode?l=+Hs.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+Hs.exec(c)[1],u=0):u=+Hs.exec(c)[1],c=c.replace(Hs,"")),c&&(Us.exec(c)?s=+Us.exec(c)[1]:zs.exec(c)&&(a=+zs.exec(c)[1])),{fieldDepth:(o?"S"===r.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function $s(e,t){var r,n,o=Fs(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:o,attrFn:n,valueFn:r}}function Ys(e,t,r){var n=r.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:n,field:e.field.key()}),o}function Ks(e){for(var t=e.propsArr,r=e.props,n=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=r[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var r=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===r.type?(m=r.value,y=String(r.value)):("function"==typeof r.value&&(d=function(e){return r.value(e,n)}),"function"==typeof r.label&&(f=function(e){return r.label(e,n)}),r.accessor?(h=r.accessor(n),Array.isArray(h)?(g=h.map(r.valueAccessor),r.attrAccessor&&(g=g.map(r.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=r.reduce?r.reduce(m):m,y=r.reduceLabel?r.reduceLabel(y,m):String(m)):y=m=r.attrAccessor?r.attrAccessor(r.valueAccessor(h)):r.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},r.field&&(i[t[s]].source={field:r.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,n):c,label:"function"==typeof l.label?l.label(p,n):p})}}var Js=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Ps(n,e);return i&&i[0]?(t.tree=Ss(i[0],r.children||function(e){return e[o]}),t.tree):null};function Zs(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((function(e,t){return t}))}(e),n=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(n.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=is({__id:f,__parent:u,qValues:[]},d),c=!0),u=f}if(c)for(var m=0;m<i.length;m++){var h=l[i[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Ls,t=Ns;function r(r){var n,o,i,a,s,l,u,c=r.length,p=new Array(c),d={};for(o=0;o<c;++o)n=r[o],s=p[o]=new As(n),null!=(l=e(n,o,r))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?ks:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(r[o],o,r))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===ks)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=js,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Ts),i.parent=null,c>0)throw new Error("cycle");return i}return r.id=function(t){return arguments.length?(e=Os(t),r):e},r.parentId=function(e){return arguments.length?(t=Os(e),r):t},r}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var Gs=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=r[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=$s(i,Ws(p.field,{cube:n,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function Xs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?Zs(t):Js(o,r,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=Bs(o),d=p[u-1];c=r.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=r.fields[f]}var m=n.normalizeConfig(is(is({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?Ws(c,{cube:o,cache:r}):{fieldDepth:0};Gs({propsArr:y,props:h,cube:o,cache:r,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,M=l[q[D].depth].main,S=x[D],E=S.data,I=Ys(M,E,{key:i});Ks({propsArr:C,props:w,item:S,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function Qs(e,t,r,n){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!Js(s,r,e))continue;var u="object"===Qa(o[a].field)?o[a].field:t.field(o[a].field),c=n.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=Ws(u,{cube:s,cache:r}),h=$s({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;Gs({propsArr:f,props:p,cube:s,cache:r,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=Qa(o[a].trackBy),q={},D=[],C=g(r.tree),w=[],M=0;M<C.length;M++){var S=C[M],E=y?y(v(S)):v(S);if(!d.filter||d.filter(E)){var I=Ys(d,E,{key:l});Ks({propsArr:f,props:p,item:S,itemData:E,ret:I,sourceKey:l}),b&&n.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,us(n.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var el,tl=(function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
9
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,d):"";if(r=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}}(el={exports:{}}),el.exports);function rl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var nl={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},ol=/%$/,il=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,al=/^\(oct\)/i,sl=/^\(dec\)/i,ll=/^\(hex\)/i,ul=/^\(bin\)/i,cl=/^\(rom\)/i,pl=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,dl=/#|0/g;function fl(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function ml(e,t,r){var n=rl(e);return r?n:new RegExp(n||"",t)}function hl(e,t,r){var n,o,i,a,s,l,u,c,p,d,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(f=r)&&(f=rl(f)),d&&(d=rl(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(p))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===r&&(o=(n=i.split(r)).pop(),i=n.join("")+r+o,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(ml(l,"g"),t)),u=r,r=".",u&&(i=i.replace(ml(u,"g"),r)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(dl)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=ol.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(ml(t,null,!0),"|").concat(ml(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}var gl=function(){function e(t,r,n,o,i){es(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return nl;var r={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])})),r}(t,this.patternSeparator),this.prepare()}return rs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],pl.test(e[0])&&(n.positive.isFunctional=!0),e[1]?pl.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?pl.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||hl(n.positive,t,r),n.negative&&!n.negative.isFunctional&&hl(n.negative,t,r),n.zero&&!n.zero.isFunctional&&hl(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,o,i,a,s,l,u,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=function(e,t,r){var n;return il.test(t)?e=fl(e,Number(/\d{2}/.exec(t)[0]),t,r):al.test(t)?e=fl(e,8,t,r):sl.test(t)?e=fl(e,10,t,r):ll.test(t)?e=fl(e,16,t,r):ul.test(t)?e=fl(e,2,t,r):cl.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){for(var r,n="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(r=0;r<a.length;r++)if(a[r]<=o){n+=s[r],o-=a[r];break}for(r=0;r<i;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+e.toExponential(0)),e}(e,c.pattern,i);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(y<0&&y-r<=c.maxPrecision?h=y:m<=r&&!(y>0&&-r<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=tl(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=i+D)}else 0===v&&(o=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=tl(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===i?c.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function yl(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size,i=void 0===o?5e3:o,a=n.multipleArguments,s=void 0!==a&&a,l=n.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return r=u.apply(void 0,arguments),t.has(r)?t.get(r):t.set(r,e.apply(void 0,arguments))}:function(n){return r=u(n),t.has(r)?t.get(r):t.set(r,e(n))}).set=function(e,t){return d>=i&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function vl(e,t,r,n,o){var i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ls(gl,t)}(o,e,t,r,n),a=yl(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),i.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var bl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ql=["January","February","March","April","May","June","July","August","September","October","November","December"],Dl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cl(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function wl(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Ml=function(){function e(t,r,n){es(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:bl,qDayNames:xl,qLongMonthNames:ql,qMonthNames:Dl}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),r||(r=(ns(o={},"T",i.qTimeFmt||"hh:mm:ss"),ns(o,"D",i.qDateFmt||"YYYY-MM-DD"),ns(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[n]),this.pattern=r}return rs(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var r,n,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(n=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:i,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*wl(t),n=60*wl(r),o=60*wl(n),i=1e3*wl(o);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(o),f:Math.round(i)}}(e),o=n.d,i=n.h,a=n.m,s=n.s,l=n.f,u=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=r?r.getDay()-1:0)<0&&(u=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Cl("".concat(t.year).slice(-2),2),YYY:Cl("".concat(t.year).slice(-3),3),def:function(e){return Cl("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Cl("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Cl("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Cl("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Cl("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Cl("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Cl("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var o=0;o<n;o++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r.slice(0,e.length)}}}}(this,r),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var p=new RegExp(u.join("|"),"g");return t.replace(p,(function(e){var t,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in l[r])if(o===e||o.toLowerCase()===e){void 0===(n=l[r][o])&&(n=l[r][o.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}))}}]),e}();function Sl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ls(Ml,t)}function El(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Il(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=Sl(r,e,t),o=yl(n.format.bind(n),{toKey:function(e){return"object"===Qa(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?El(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),n.format(t,e)},a.locale=function(r){return n=Sl(r,e,t),o=yl(n.format.bind(n),{toKey:function(e){return"object"===Qa(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Tl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Il(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(r="#".concat(o,"##A"),i="U"),vl(r,n,o,i,t)}function Al(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,o=t.key,i=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},d="dimension"===l?"first":"avg",f=Tl(r,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return n},key:function(){return o},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:c,label:p,reduce:d,reduceLabel:m,formatter:function(){return f},tags:function(){return r.qTags}};return h}function Ol(e,t,r,n,o){return(t[e]||[]).map((function(t,i){var a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(i),s={instance:Al(xs({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=Ol("qAttrDimInfo",t,r,a,xs({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Ol("qAttrExprInfo",t,r,a,xs({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=Ol("qMeasureInfo",t,r,a,xs({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function jl(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.key,i=n.data,a=n.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=i;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=jl.util,p={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return o},raw:function(){return u},field:function(e){return Vs(e,p)},fields:function(){return l.fields.slice()},extract:function(e){return p.extractor(e,d,l,c)},hierarchy:function(e){return p.hierarchy(e,d,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(p.extractor=Qs,p.hierarchy=Xs,p.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(p.extractor=ws,p.pages=u.qDataPages,p.hierarchy=Xs):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},d,l,c)};var f="S"===u.qMode?function(e){return e.qElemNumber}:void 0,m="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,us(Ol("qDimensionInfo",u,o,"",xs({},p,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,us(Ol("qMeasureInfo",u,o,"",xs({},p,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),r=Al(is({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},d,l,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(r)})),(r=l.allFields).push.apply(r,us(l.virtualFields)),d}var kl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ll=/\/qDimensionInfo(?:\/(\d+))?/,Nl=/\/qMeasureInfo\/(\d+)/,Pl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Rl=/\/qAttrExprInfo\/(\d+)/,Fl=/\/?qHyperCube/,Vl=/\/?qTreeData/,_l=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Hl=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function zl(e,t){var r=e,n=-1,o=-1,i="",a=function(e){return e};Fl.test(e)?(i="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=_l):Vl.test(e)&&(i="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=Hl);var s=!0;if(Ll.test(e)&&(n=+Ll.exec(e)[1]),Nl.test(e)&&(o=+Nl.exec(e)[1]),Pl.test(e)){o=-1,n=0;var l=+Pl.exec(r)[2];isNaN(l)||(n=l,r=r.replace(/\/\d+$/,"")),s=!1}if(Rl.test(e)){var u=o;if(t){o=0;var c=Ps(i,t);o+=(c.qMeasureInfo||[]).length,n>-1?(o=c.qDimensionInfo.slice(0,n).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),n=-1):(o=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),o=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o)),o+=+Rl.exec(r)[1]}else n>-1?(n=-1,o=+Rl.exec(r)[1]):o+=+Rl.exec(r)[1]+1}return kl.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||cs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],o=t[1];r=r.replace(n,o)})),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:o,dimensionIdx:n,path:r}}function Ul(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=r.byCells,i=r.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=zl(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var r=e.brush.ranges();r.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(o)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){var p=n.qHyperCube,d=p.qNoOfLeftDims,f=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=r.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function Bl(e){jl.util=e.data("matrix").util,e.data("q",jl),e.formatter("q-number",vl),e.formatter("q-time",Il)}function Wl(e){var t=function(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(void 0===o[a])return r;o=o[a]}return o}(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var r=t.qIsOneAndOnlyOne;return void 0!==r&&r}function $l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===yi(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function Yl(e){var t=e.brush,r=e.colorField,n=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!r||/qAttrDimInfo/.test(r)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),n&&t.removeKeyAlias(n),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(r))):i&&t.addKeyAlias(n,"qHyperCube/".concat(r))}Bl.qBrushHelper=Ul,Bl.selections=Ul;function Kl(e){var t=e.brush,r=e.getConfig;return{interceptor:function(e){var n=t.brushes(),o=r(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;n.forEach((function(r){var n,o,a;("range"===r.type||null!==(n=e[0])&&void 0!==n&&n.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==r.id&&0!==i.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,r=void 0===t?{}:t,n=e.values,o=void 0===n?[]:n;if(null==o||!o.length)return[];var i=Array.from(new Set(o.map((function(e){return e.key})))),a=[];return i.forEach((function(e){var t=Wl({layout:r,path:e}),n=o.filter((function(t){return t.key===e})),i=t?[n.pop()]:n;a.push.apply(a,Mi(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var n=t.brushes(),o=r().allowSimultaneous;return n.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(n.forEach((function(r){var n=r.id===e[0].key||o.includes(r.id)&&o.includes(e[0].key);"range"!==r.type||n||t.clear([])})),e)}}}var Jl=[],Zl=0,Gl=function(e){var t=Jl.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},Xl=function(){document.addEventListener("keyup",Gl)},Ql=function(){document.removeEventListener("keyup",Gl)},eu=function(e,t){Object.keys(t).forEach((function(r){e.on(r,t[r])}))},tu=function(e,t){Object.keys(t).forEach((function(r){e.removeListener(r,t[r])}))};function ru(e,t,r){if(t&&void 0!==r&&"selectHyperCubeContinuousRange"===e.method){var n=e.params;if(n&&n[1]&&n[1][0]){var o=n[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=r&&(a.qMaxInclEq=!0)}}}function nu(e){var t=e.chart,r=e.document,n=e.selectionInfo,o=e.eventName,i=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=n.event===o,p=r.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!p)return!1;var d=t.component(i);return!!d&&(d.emit(u),"string"==typeof s&&t.brush(s).clear(),d)}function ou(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.eventName,i=void 0===o?"discreteRange":o,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function iu(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.eventName,i=void 0===o?"continuousRange":o,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function au(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.componentName,i=void 0===o?"minor-range-brush":o,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,p=nu({selectionInfo:t,chart:r,document:n,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(p){var d=p.settings.settings,f=d.scale,m=d.brush,h=r.scale(f).data().fields.map((function(e){return e.id()})),g=r.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function su(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;nu({selectionInfo:t,chart:r,document:n,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function lu(e){var t=e.chart,r=e.selectionInfo,n=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(r&&i.includes(r.event)){var l=r.currentComponent;r.previousComponent!==l&&(n.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function uu(e){var t=e.selectionInfo,r=e.chart,n=e.document,o=e.selections,i=e.eventName,a=void 0===i?"legendRange":i,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,p=e.brushName;nu({selectionInfo:t,chart:r,document:n,eventName:c?void 0:a,componentName:l,brushName:void 0!==p&&p})&&o.clear()}var cu=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=Ci(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function pu(e){var t,r=e.lasso;null!=r&&null!==(t=r.active)&&void 0!==t&&t.call(r)&&(null==r||r.action(!1))}function du(e){var t,r=e.chart,n=e.selectionInfo,o=e.selectionActions,i=e.actions,a=void 0===i?{}:i,s=e.selections,l=e.selectionEvents;if(!1===o||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,p=o.reset,d=void 0===p?pu:p,f=o.clear,m=!1!==f&&function(e){var t=e.clear,r=void 0===t?cu:t,n=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:n,selectionInfo:o,chart:i,document:document,cleared:e};return r(Di({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ou(Di(Di({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iu(Di(Di({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return au(Di(Di({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return su(Di(Di({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return lu(Di(Di({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return uu(Di(Di({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:n,chart:r}),h=function(e){var t=e.chart,r=e.lasso,n=e.reset,o=e.clear,i=!1,a={deactivated:function(e){n({e:e,lasso:r})},canceled:function(e){n({e:e,lasso:r}),o({e:e,chart:t,document:document})},cleared:function(e){i||(i=!0,o({e:e,chart:t,document:document,cleared:!0}),i=!1)}};return!1===n&&delete a.deactivated,!1===o&&delete a.cleared,!1===n&&!1===o&&delete a.canceled,a}({chart:r,clear:m,reset:d,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];g[r]=function(e,t){return t?function(r){return t({event:r,defaultFunc:e})}:e}(n,l[r])}));var y=function(e){var t=e.selectionEvents,r=e.selections,n=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:r,selectionInfo:n,chart:i,document:a},u=function(e){return Object.assign(n,e||{})},c=function(e){var t=e.event,r=e.components;return function(){return function(e){var t=e.selectionInfo,r=e.clear,n=e.event,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(Di(Di({},void 0===t?{}:t),{},{event:n,components:i.map((function(e){return e.key})).filter(Boolean)})),r()}({event:t,components:r,clear:o,chart:i,selectionInfo:n,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(Di(Di({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:o},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:n,clear:m,chart:r,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];null==s||s.on(r,n)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=wi(e,2),r=t[0],n=t[1];null==s||s.removeListener(r,n)}))}}var fu=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function mu(e){var t=e.chart,r=e.actions,n=e.selections,o=e.picassoQ,i=e.config,a=i.allowSimultaneous,s=void 0!==a&&a,l=i.majorScale,u=void 0===l?void 0:l,c=i.selectionActions,p=(c=void 0===c?{}:c).clear,d=c.reset,f=i.selectionEvents,m=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=i.brushEvents,g=void 0===h?{}:h,y=i.brushName,v=void 0===y?"selection":y,b=i.brushMaxListeners,x=void 0===b?20:b,q=i.brushRanges,D=void 0!==q&&q,C=i.interceptors,w=void 0===C?{}:C,M=i.selectionsFn,S=void 0===M?o.selections:M,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var I=!0===D?fu:D;E.configure({ranges:I})}var T={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},A=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.selections,n=t.brush,o=t.majorScale,i=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!r)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++Zl,c=null,p=[],d={};r.on=r.on.bind(r),r.isActive=r.isActive.bind(r),r.addListener=r.addListener.bind(r),r.removeListener=r.removeListener.bind(r);var f=Kl({brush:n,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=f.rangeInterceptor,h=f.interceptor;n.intercept("set-ranges",m),n.intercept("toggle-ranges",m),n.intercept("toggle-values",h),n.intercept("set-values",h),n.intercept("add-values",h),n.on("start",(function(){return r.begin(l)}));var g={activate:function(){},deactivated:function(){return n.end()},cleared:function(){return n.clear()},canceled:function(){return n.end()}};eu(r,g);var y=null==o||null===(e=o.max)||void 0===e?void 0:e.call(o);return null!=i&&i.select?(i.select.on("start",(function(){var e;n.start(),"function"==typeof i.select.getBrushOptions&&(d=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(n,d,c).forEach((function(e){ru(e,i.select.brushSelectionIncludeMax,y),r.select(e)}))}))):n.on("update",(function(){a(n,d,c).forEach((function(e){return r.select(e)}))})),0===Jl.length&&Xl(),Jl.push({key:u,selections:r}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=Jl.indexOf(Jl.filter((function(e){return e.key===u}))[0]);-1!==e&&Jl.splice(e,1),Jl.length||Ql(),tu(r,g)}}}({brush:E,majorScale:u,actions:r,selections:n,picassoQ:o,selectionsFn:S});!function(e){var t=e.brush,r=e.interceptors,n=void 0===r?{}:r;Object.entries(n).forEach((function(e){var r=wi(e,2),n=r[0],o=r[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(n,e)}))}))}({brush:E,interceptors:w});var O=function(e){var t=e.chart,r=e.selectionActions,n=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,r=e.chart,n=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=wi(e,2),i=o[0],a=o[1],s=function(){return a({chart:r,selectionInfo:n})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var r=wi(e,2),n=r[0],o=r[1];t.removeListener(n,o)}))}}({brush:n,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=du({chart:t,selectionInfo:i,selectionActions:r,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var r=!1,n=function(e){r||"Shift"!==e.key||(t.lasso.action(!0),r=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),r=!1)};return document.addEventListener("keydown",n),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",n),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:r,selections:n,selectionInfo:T.selectionInfo,selectionActions:{clear:p,reset:d},selectionEvents:m,brushEvents:g});if(s){var j=!0===s?Mi(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;A.allowSimultaneous(j)}return{unbindEvents:O,state:T,picassoSelections:A,brush:E}}function hu(e){var t=e.chart,r=e.selections,n=e.actions,o=void 0!==n&&n,i=e.config,a=void 0===i?{}:i,s=mu({chart:t,actions:o,selections:r,picassoQ:Bl,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,p=s.brush,d=a.custom,f=void 0===d?{}:d,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?Yl:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==r||null===(t=r.isLocked)||void 0===t?void 0:t.call(r))&&void 0!==e?e:$l(n)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,r,n,o=e.selections,i=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=o&&null!==(t=o.isModal)&&void 0!==t&&t.call(o)&&o.confirm(),i.layout(a);var l=(null!==(r=null==a?void 0:a.qHyperCube)&&void 0!==r?r:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return Wl({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,r=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,n=void 0===r?[]:r;return null!==(t=n.map((function(e,t){var r;return!(e.qLocked||(null===(r=e.qCardinalities)||void 0===r?void 0:r.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(n.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(n=u[0])||void 0===n||!n.qLocked),s}({selections:r,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,r=e.useLegendCube,n=void 0!==r&&r,o=Ci(e,["colorField","useLegendCube"]),i=Di({useLegendCube:n,colorField:t,brush:p,legendAlias:h},o);y(Di(Di({},i),{},{defaultFunc:function(){return Yl(i)}}))},destroy:function(){l(),c.release()},custom:Di({},f)}}var gu={};function yu(){yu.init.call(this)}gu.isObject=function(e){return"object"==typeof e&&null!==e},gu.isNumber=function(e){return"number"==typeof e},gu.isUndefined=function(e){return void 0===e},gu.isFunction=function(e){return"function"==typeof e};var vu=yu;yu.EventEmitter=yu,yu.prototype._events=void 0,yu.prototype._maxListeners=void 0,yu.defaultMaxListeners=10,yu.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},yu.prototype.setMaxListeners=function(e){if(!gu.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},yu.prototype.emit=function(e){var t,r,n,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(r=this._events[e],gu.isUndefined(r))return!1;if(gu.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];r.apply(this,o)}else if(gu.isObject(r)){for(n=arguments.length,o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];for(n=(a=r.slice()).length,i=0;i<n;i++)a[i].apply(this,o)}return!0},yu.prototype.addListener=function(e,t){var r;if(!gu.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,gu.isFunction(t.listener)?t.listener:t),this._events[e]?gu.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,gu.isObject(this._events[e])&&!this._events[e].warned)&&((r=gu.isUndefined(this._maxListeners)?yu.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,gu.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),gu.isFunction(console.trace)&&console.trace()));return this},yu.prototype.on=yu.prototype.addListener,yu.prototype.once=function(e,t){if(!gu.isFunction(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},yu.prototype.removeListener=function(e,t){var r,n,o,i;if(!gu.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,n=-1,r===t||gu.isFunction(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(gu.isObject(r)){for(i=o;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){n=i;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},yu.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],gu.isFunction(r))this.removeListener(e,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},yu.prototype.listeners=function(e){return this._events&&this._events[e]?gu.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},yu.listenerCount=function(e,t){return e._events&&e._events[t]?gu.isFunction(e._events[t])?1:e._events[t].length:0};function bu(){const e={};var t;return t=e,Object.keys(vu.prototype).forEach((e=>{t[e]=vu.prototype[e]})),vu.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function xu({picasso:e}){var t;const r=h(),n=g(),o=y(),[i,a]=v(),s=bu(),l=b(),u=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[c,p]=v(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:r,setIsLassoActionActive:n}){var o,i,a;return{active:r,hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(i=o.qDimensionInfo)||void 0===i||null===(a=i[0])||void 0===a||!a.qIsOneAndOnlyOne),action(e){n("boolean"==typeof e?e:!r)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:l,isInSelections:u,isLassoActionActive:c,setIsLassoActionActive:p}),x((()=>(i&&(i.interactions.lasso.active=()=>c),{...s.lasso})),[i,c,u]),q((()=>{n.style.overflow="hidden";const t=e({renderer:{prio:[r.renderer||"canvas"]}}),i=t.chart({element:n,data:[],settings:{}}),u=hu({chart:i,actions:s,selections:o,config:{selectionActions:!1}});u.setLayout(l),u.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const c=function(e){var t=Di({},e),r={},n={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&r[e]?t[e]=r[e](i,a):t[e]=i,!o&&n[e]&&n[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){r[e]=t},onChanged:function(e,t){n[e]=t}};return i}({legendScrollOffset:0,rotation:0});return c.intercept("rotation",(e=>(c.get("rotation")+e)%(2*Math.PI))),c.onChanged("rotation",(()=>{i.update({partialData:!0})})),s.on("selections-start",(()=>{i.brush("selection").start()})),a({picasso:t,chart:i,selectionService:u,viewState:c,interactions:s}),()=>{u.destroy(),i.destroy(),s.removeAllListeners(),delete s.select,c.intercept("rotation",void 0),c.onChanged("rotation",void 0)}}),[]),i}function qu(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Du({instance:e}){const t=D(),r=C(),n=w(),o=g(),[i,a]=v(),s=M(),l=S();return q((()=>{if(!e)return;o.style.overflow="hidden";const i=function(e){var t,r,n,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,p=e.createConfig,d=void 0===p?Za:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),M={theme:x,key:v,localeInfo:y,layout:w,hc:null==c||null===(r=c.getHyperCube)||void 0===r?void 0:r.call(c),legendProps:null==c||null===(n=c.getLayoutValue)||void 0===n?void 0:n.call(c,"legend"),colorProps:Di(Di({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?$a(w):void 0})},S=Ba({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&S.auto((function(e){return D?D({layout:e,defaultAuto:Ja}):Ja(e)}));var E=!1;return{getColor:function(){return S.color()},getPaletteColor:function(e){var t=e.index,r=e.color;return S.resolveUIColor({index:t,color:r})},getData:function(){return S.data()},getDatumProps:function(e){return S.datumProps(e)},getSnapshotData:function(){return S.getSnapshotData(C)},getSettingsForMeasure:function(e){return S.settingsForMeasure(e)},getSettings:function(){return S.settings()},getLegend:function(e,t){return S.legend(e,t)},getScales:function(){return S.scales()},getPalettes:function(){return S.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return S.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:Di({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:$a}),r=Ya(M,t);return S.config(r),S.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:e.picasso,model:t,app:r,translator:n,config:{auto:!1,key:"fill"}}),u=function(e){var t=e.picassoInstance,r=e.plugins,n=e.pluginArgs,o=void 0===n?{}:n,i={initialized:!1,definitions:[]};return{initialize:function(){return bi(regeneratorRuntime.mark((function e(){var n,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(r.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=bi(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,r.fn(Di({},o));case 4:if("object"===yi(n=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(r.info.componentName,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(r.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(Di({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(n=i.definitions).push.apply(n,Mi(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var r=wi(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(r){var n=Pi(!0,{},r.brush);Pi(!0,r,t),t.brush&&(r.brush=function(e,t){return"object"===yi(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Xa({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Xa({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(n,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e.picasso,plugins:l,pluginArgs:qu(s)});a({colorService:i,pluginService:u})}),[t,r,e,s,n.language()]),i}const Cu={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function wu(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Mu={getImageSize(e,t){let r;function n(){r&&(clearTimeout(r),r=null)}function o(e){const t=e;t.onload=null,t.onerror=null,n()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:r,width:l}=s,u=i[t]*(r>l?1:r/l),c=i[t]*(l>r?1:l/r);!r||!l||0===r&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,r),width:Math.min(c,l)},n()):(e={height:u,width:c},n()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,r=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Su(e,t,r,n){var o,i,a,s,l,u;const{app:c,flags:p}=t,d=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!d)return[];const[f]=d,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<r.length;e++)if(r[e].cId===f.cId){g=e;break}const y=(null===(a=n.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,r){let n=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,r,n,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,r=a?"https://":"http://",n=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),r+n+o+i):""}(r);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(n,o),n=n.replace(/"/g,'\\"'),n=n.replace(/'/g,"\\'"),n=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(n,o));const{height:i,width:a,imageError:s}=await Mu.getImageSize(n,t);return{src:n,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,r,n,o){let i,a=r.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&wu(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:r,width:o,imageError:s}=await Mu.getImageSize(t,n);i={src:t,size:n,height:r,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:r}=await Mu.getImageSize(a,n);i={src:a,size:n,height:e,width:t,imageError:r}}return i}(c,p,f,m,v);if(p.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,r,n){let o;const i=n.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(wu(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:n,width:i,imageError:a}=await Mu.getImageSize(e,r);o={src:e,size:r,height:n,width:i,imageError:a}}}catch(e){}return o}(c,r[g],m,v)}return[]}const Eu={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(Su(e,n,r,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,r;const n=null===(t=e.layout)||void 0===t||null===(r=t.tooltip)||void 0===r?void 0:r.imageComponents;return!!n&&n.length>0}},Iu={async handlePromises({customTooltipModel:e,nodes:t,attrExps:r,opts:n}){let o=t;return o=await Eu.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:r,opts:n}),o},checkIfPromisesExist:({customTooltipModel:e})=>Eu.checkIfPromisesExist({customTooltipModel:e})};const Tu=(e,t)=>{var r,n,o;const i=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qDimensions,a=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Cu.CHART.CHART_PARENT_TYPE,qId:Cu.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Au=e=>{var t,r,n;const o=null===(t=e.tooltip)||void 0===t||null===(r=t.chart)||void 0===r||null===(n=r.object)||void 0===n?void 0:n.refId;return{qInfo:{qType:Cu.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const Ou={createContainer:({ctx:e,layout:t})=>{var r,n;if(!((null===(r=t.qHyperCube)||void 0===r||null===(n=r.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var r,n,o,i;const a=null!==(r=null===(n=t.tooltip)||void 0===n||null===(o=n.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==r?r:"medium",s=Cu.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Cu.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:r,dimIndex:n,customTooltipModel:o,rtl:i})=>{var a,s,l;const u=o,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ou.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:r}){const n=r,o=Cu.CHART.STATE,i=t.qStateName;n.miniChartToken.alternateState||(n.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),n.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:r}){var n;const o=r;null!==(n=o.miniChartToken.sessionObj)&&void 0!==n&&n.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=Cu.CHART.STATE,a=Tu(t,i),s=await e.createSessionObject(a),l=Au(t);if(s.id!==Cu.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var p,d,f,m;const e=r.length>0&&void 0!==(null===(p=r[0].data)||void 0===p?void 0:p.value)?[null===(d=r[0].data)||void 0===d?void 0:d.value]:[],a=void 0!==n?n:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===n&&r.length>0){var h,g;const e=null!==(h=r[0].data.selectionOuterDimension)&&void 0!==h?h:r[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),r=t[t.length-1],n=void 0!==e.value?[e.value]:[];n.length>0&&void 0!==r&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(r),n,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Cu.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await o.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.id,type:null===(m=u.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await Ou.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const r=t;null!=r&&r.embed&&(Ou.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Cu.CHART.CHART_OBJECT_ID),r.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const r=t,n=Cu.CHART.STATE;await e.removeSessionAlternateState(n),r.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,r;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(r=t.vis)||void 0===r?void 0:r.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function ju(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ku(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:r,IMAGES:n}=Cu.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[r]=!0,o[n]=!0,o}function Lu(e){const t=ku();return e.filter((e=>t[e.id]))}const Nu={getNodes(e,t){const r=function(e,t){let r=0,n=0;e.center?(r+=e.center.x,n+=e.center.y):(r+=e.clientX,n+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:r-o.left,cy:n-o.top}}(e,t);return t.shapesAt({x:r.cx,y:r.cy})},getDataNodes(e,t){let r,n=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const u=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],n.push(e)}}else{r||(r=[],Object.keys(o).forEach((t=>{r=r.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=r.filter((e=>{var t,r;const n=null!==(t=null!==(r=e.data.stack)&&void 0!==r?r:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return n&&n.value===u.value&&n.label===u.label}));t.length>0&&(n=n.concat(t[0]))}})),n},displayTooltip(e,t,{nodes:r,opts:n={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Nu.getAttrExprData(a);i.length||r.length?Iu.handlePromises({customTooltipModel:o,nodes:Nu.getDataNodes(s,i.length>0?i:r),attrExps:l,opts:n}).then((()=>{t.emit("show",e,r.length?{nodes:r}:void 0)})):t.emit("show",e,r.length?{nodes:r}:void 0)}else{var s,l;null!==(s=n.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=o&&null!==(l=o.miniChartToken)&&void 0!==l&&l.alternateState&&Ou.hide({app:n.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Iu.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var r;const n=t,o=null!==(r=e.qHyperCubeDef)&&void 0!==r&&r.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[o]||(n[o]=[]),n[o]},getAttrExprData(e){var t;let r=[],n="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;r=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],n=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:r,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){var r,n;if(!(null===(r=e.qLayoutExclude)||void 0===r||null===(n=r.quarantine)||void 0===n?void 0:n[Cu.CUSTOM.QUARANTINE])){!function(e,t){const r=t;let n=r.qLayoutExclude;n||(r.qLayoutExclude={quarantine:{}},n=r.qLayoutExclude),n.quarantine||(n.quarantine={}),n.quarantine[Cu.CUSTOM.QUARANTINE]=[],e.forEach((e=>{n.quarantine[Cu.CUSTOM.QUARANTINE].push(e)})),r.qLayoutExclude=n}(Lu(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,r;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(r=t.quarantine)||void 0===r?void 0:r[Cu.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Cu.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const r=ju(e);if(!r)return;const n=void 0!==t?t:r.length-1;if(!r[n])return;const o=this.getAttrExps(e,r[n]);if(0===Lu(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],r=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[n].qAttributeExpressions=r:s.qHyperCube.qDimensionInfo[n].qAttrExprInfo=r}},moveCustomTooltipAttrs(e,t={},r){let n=[];const o=ju(e)||[];[...o,t].forEach((e=>{const t=Lu(e.qAttributeExpressions||[]);t.length>0&&(n=t)}));const i=ku(),a=o.map((e=>{const t=e,r=e.qAttributeExpressions||[];return t.qAttributeExpressions=r.filter((e=>!i[e.id])),t})),s=void 0!==r?r:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(n));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:ue.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const r=ue.detectTextDirection(e.src),n=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){n.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const r=e.imageError?`${e.src}?${Math.random()}`:e.src;n.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:r,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,n),""],style:{"text-align":t.rtl?"right":"left",direction:r,"max-width":e.width},colspan:2},{}]}};function Pu(e,t,r,n){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[r])||void 0===i||null===(a=i[n])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[n]?e.qSubNodes[n].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let r;switch(e.id){case Cu.CUSTOM.EXPRESSION:r="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Cu.CUSTOM.TITLE:case Cu.CUSTOM.DESCRIPTION:case Cu.CUSTOM.IMAGES:r=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:r="NaN"}return r}(e,o);l.push({source:{key:"qHyperCube",field:`${r}/${n}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Ru={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const r=t-1,n="qDimensionInfo";return{field:`${n}/${r}`,value:t=>Pu(t,e,n,r)}}};const Fu={getCustomAttrExps(e,t,r){var n,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(n=t.data)||void 0===n||null===(o=n.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,r,n){const o={[Cu.CUSTOM.TITLE]:!0,[Cu.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Nu.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===Cu.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:r("qHyperCube").field(`${a}/${i}`).formatter()(s.value);n.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&n.customTooltipInfoAttrExpsArr.push({...e.id===Cu.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),n}(r,a.map((t=>ce.getMeasure(e,t))),e,i)}};function Vu({nodes:e,layout:t,dataset:r}){return function(e,t,r){const n=[];return e.forEach((e=>{n.push(Fu.getCustomAttrExps(r,e,t))})),n}(e,t,r).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function _u(e){const t=Cu.CUSTOM.EXPRESSION,{qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:r,qLabel:n,qLabelExpression:o,cId:i}}function Hu(e){var t;const r=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return r[r.length-1].qAttributeExpressions||[]}var zu={attrExpr:{migrateProperties(e){var t,r,n,o;const i=K(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[];let s=Hu(i);return s=function(e,t){return t.concat(e.map((e=>_u(e))))}(a,s),function(e,t){var r;const n=null===(r=t.qHyperCubeDef)||void 0===r?void 0:r.qDimensions;n[n.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,r,n,o;const i=(null===(t=e.tooltip)||void 0===t||null===(r=t.data)||void 0===r||null===(n=r.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,r){let n=e.length;const o=[];return t.forEach((e=>{const t=_u(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${r}/qAttributeExpressions/${n}`,qOp:"add",qValue:i}),n++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Hu(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((r=>{var n,o,i,a,s;const l=(null===(n=t.qHyperCube)||void 0===n?void 0:n.qDimensionInfo)||[],u=(null===(o=t.tooltip)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const n=this.migrateProperties(t);e.setProperties(n).then((()=>{e.app.clearUndoBuffer(),r(!0)}))}else{const n=this.getPatches(t);e.applyPatches(n,!0).then((()=>{e.app.clearUndoBuffer(),r(!0)}))}})),r(!1)}))}}};function Uu({scaleKey:e,legend:t,onEdited:r}){const{layout:n}=t,{dock:o}=n||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:r?{bubbleEnd(){r()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const Bu={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Wu=({layout:e},t,r)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{let n=.8,o=0;const i=r?r.style.innerRadius:.55;e.donut.showAsDonut&&(n=.8-i,o=i);return t.scale(Math.max(0,t.datum.radius.value))*n+o}}:.8,$u=({layout:e},t,r)=>{if(!e.donut.showAsDonut)return 0;const n=r?r.style.innerRadius:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-n,r=n;return e.scale(Math.min(0,e.datum.radius.value))*t+r}}:n},Yu=({layout:e},t)=>{const r=t.colorService.getDatumProps(),n=r[Object.keys(r)[0]],o=n&&n.field?n.field:void 0,i="qDimensionInfo/0"===o,a=o?t.ds.field(o).raw():null,s=a&&(a.label||a.title||a.qFallbackTitle)||"",l=t.encodings.slice.outerRadius,{formatter:u}=t.chart,c=re(e,"qHyperCube.qDimensionInfo",[]).length;function p(e,r){const n=t.ds.field(e).raw();return{field:e,label:!n.isCustomFormatted&&(n.qIsAutoFormat||"U"===n.qNumFormat.qType)?e=>u(r)(e.qNum):e=>e.qText}}const d=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...r,num:p(t.encodings.slice.arc,"arc"),fillTooltip:o?{field:o,label:s,value:e=>i?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==c?Ru.getNode(e,{dimensionCount:c}):void 0,radius:l?p(l,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:$u({layout:e},t,d),fill:t.colorService.getColor(),strokeWidth:d?Bu.STROKE.WIDTH[d.style.strokeWidth.toUpperCase()]:Bu.STROKE.WIDTH.NONE,stroke:d?d.style.strokeColor.color:Bu.STROKE.COLOR,outerRadius:Wu({layout:e},t,d),cornerRadius:d?d.style.cornerRadius:0}}}};function Ku({layout:e},t,r){const n=(e.components||[]).filter((e=>"slices"===e.key))[0],o=n?n.style.innerRadius:.55,i=t.encodings.slice.outerRadius;return!(!e.donut.showAsDonut||!i)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:R(r.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-o,r=o;return e.scale(0)*t+r}}}}}}function Ju({layout:e},t,r){return!(e.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:R(r.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}const{getThemeStyle:Zu}=F;function Gu(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Xu(e){return e.node.data.num.label}function Qu(e){return e.node.data.radius.label}function ec(e,t,r){if(e.dataPoint.auto)return r?Xu:Gu;if("share"===e.dataPoint.labelMode)return Gu;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Qu:Xu}return null}function tc({data:e}){return e?e.label:""}function rc(e,t,r){const n=parseInt(Zu(e,"object.pieChart",t,r),10);if(!isNaN(n))return n}function nc(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function oc({node:e,data:t}){return K({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function ic(e,t,r){const n=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Zu(r.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:rc(r.theme,"label.name","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.name","fontFamily"),label:tc,linkData:({node:e,data:t})=>K({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(ec(e,t,!1)){const o=function(e,t,r){return{label:ec(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&nc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&nc(e),padding:4}],theme:r.theme,themeId:"object.pieChart"}}(e,t,r),i=fe(K(t,o),r.theme);i.linkData=oc,n.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:n}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function ac({layout:e,context:t},r){return!1!==e.dataPoint.show&&(1===r.dataRowCount?function(e,t,r){const n=ec(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(r.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:rc(r.theme,"label.name","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.name","fontFamily"),label:tc},{fill:e.donut.showAsDonut?r.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:rc(r.theme,"label.value","fontSize"),fontFamily:Zu(r.theme,"object.pieChart","label.value","fontFamily"),label:n}]}}}]}}}(e,r,t):ic(e,r,t))}function sc(e){return re(e,"customTooltipModel.useCustomTooltip",!1)}function lc(e,t){return sc(t)&&re(e,"tooltip.hideBasic",0)}function uc(e,t){return e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}})}function cc(e){return[{content:e.title,style:{"font-weight":"bold"},colspan:2},{}]}function pc(e,t,r){const n=[uc(e,t)];return n.push(t.color.value),[{content:t.color.label},{content:n,style:{"text-align":r?"left":"right"}}]}function dc(e,t,r,n=!1,o=!1){const i=[e.value];return n&&i.unshift(uc(t,r)),[{content:e.label+":"},{content:i,style:{"text-align":o?"left":"right"}}]}function fc(e,t,r,n){return lc(r,n)||void 0===e.share.value?[]:[{content:e.share.label},{content:e.share.value,style:{"text-align":t?"left":"right"}}]}function mc(e,t={},r={}){let n=[];const o=ie({rtl:r.rtl});return K(!0,o,{scale:"fill",settings:{filter:e=>e.filter((e=>e.data&&("path"===e.type&&("slices"===e.key||"negative-indicators"===e.key)||"text"===e.type&&e.data._showTooltip&&"pie-labels"===e.key))),extract:o=>{var i,a;n=[o.node];const{layout:s}=e,l=function(e,t,r){const n=e.node,o=e.node.data,i=e.resources.formatter,a=e.resources.dataset,s={};if("color"!==t.coloring.type&&o.fillTooltip){const e=i("fill"),r="measure"===t.coloring.fieldType;s.value=r&&e?e(o.fillTooltip.value):o.fillTooltip.value,s.label=o.fillTooltip.label+":"}let l;function u(e){return{label:a(e.source.key).field(e.source.field).title(),value:e.label,field:e.source.field}}t.coloring.label&&(s.label=t.coloring.label+":"),s.fill=void 0===o._fillColor?n.attrs.fill:o._fillColor,n&&n.desc&&void 0!==n.desc.share?l=n.desc.share:n&&o&&void 0!==o._share&&(l=o._share);const c=[u(o.num)];t.encodings.slice.outerRadius&&c.push(u(o.radius));const p={title:o.label,color:s,share:{label:(t.translator&&t.translator.get("properties.dataPoints.labelmode.share")||"Share")+":",value:void 0!==l?i("share")(l):void 0},measures:c};if(sc(t)){var d,f,m,h;const o=Vu({dataset:a,nodes:[n],layout:r});var g,y;if(p.customTitle=o.customTooltipInfoAttrExpsArr.filter((e=>e.id===Cu.CUSTOM.TITLE)),p.customDescription=o.customTooltipInfoAttrExpsArr.filter((e=>e.id===Cu.CUSTOM.DESCRIPTION)),p.customMeasures=o.customTooltipAttrExpsArr,t.flags.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(d=r.tooltip)&&void 0!==d&&null!==(f=d.chart)&&void 0!==f&&null!==(m=f.object)&&void 0!==m&&m.refId&&t.customTooltipModel.embed&&"function"==typeof(null===(h=t.customTooltipModel.model)||void 0===h?void 0:h.getEffectiveProperties))if(null!==(g=(y=t.app).isInModalSelection)&&void 0!==g&&g.call(y)){Ou.destroyVisualization({customTooltipModel:t.customTooltipModel});const e=t.translator.get("properties.tooltip.notselectedmessage");p.customLimitation=e}else{const t=Ou.createContainer({ctx:e,layout:r});p.customChart=t}n.data.customTooltipImages&&(p.customImages=n.data.customTooltipImages)}return p}(o,t,s);let u=[];const c=lc(s,t)?[]:l.measures,p=sc(t)&&(d=l.customTitle[0],f=l.customDescription[0],m=c,h=l.customMeasures,0===m.length&&0===h.length&&(""!==d&&void 0!==d||""!==f&&void 0!==f))?[]:cc(l);var d,f,m,h;if(sc(t)&&l.customTitle.length>0&&u.push(cc(l.customTitle[0])),sc(t)&&l.customDescription.length>0&&u.push(function(e){return[{content:e.value,colspan:2},{}]}(l.customDescription[0])),u=function(e,t,r){return lc(r,e)||t.measures.some((t=>t.field===e.coloring.field))||void 0===t.color.value}(t,l,s)?u.concat([p,...c.map((e=>dc(e,o,l,e.field===t.coloring.field,r.rtl))),fc(l,r.rtl,s,t)]):u.concat([p,pc(o,l,r.rtl),...c.map((e=>dc(e,o,l,!1,r.rtl))),fc(l,r.rtl,s,t)]),sc(t)&&l.customMeasures.length>0&&u.push(...l.customMeasures.map((e=>dc(e,o,l,e.field===t.coloring.field,r.rtl)))),null!==(i=t.flags)&&void 0!==i&&i.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customChart&&u.push(l.customChart),null!==(a=t.flags)&&void 0!==a&&a.isEnabled("CUSTOM_TOOLTIP_CHART")&&l.customLimitation&&u.push(Nu.getFooterRow(l.customLimitation,r)),l.customImages){const e=l.customImages.map((e=>Nu.getImageRow(e,o)));u.push(...e)}return u},placement:({nodes:e})=>"slices"===e[0].key?{type:"slice"}:{type:"bounds"},direction:r.rtl?"rtl":"ltr",afterShow:()=>{var e,o,i;const{app:a,properties:s,customTooltipModel:l}=t;null!==(e=t.flags)&&void 0!==e&&e.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(o=(i=t.app).isInModalSelection)||void 0===o||!o.call(i))&&l.useCustomTooltip&&l.embed&&Ou.show({app:a,properties:s,selectedNodes:n,customTooltipModel:l,rtl:r.rtl})}},style:{content:{fontFamily:r.theme.getStyle("object.pieChart","","fontFamily")}}})}const hc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"legendRange",enable(t,r){if(this.started||!r)return!0;if(e.constraints.select||e.constraints.active)return!1;const n=(this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(r))&&!e.isLocked([this.chart.component("slices")]);return n||this.chart.component("legendRangeBrush").emit("rangeClear"),n}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function gc(e,t){const r=t.element.getBoundingClientRect();let n,o;return e.center?(({x:n}=e.center),({y:o}=e.center)):(n=e.clientX,o=e.clientY),{x:n-r.left,y:o-r.top}}function yc(e,t){const r=t.component("slices");if(!r)return!1;const{x:n,y:o}=gc(e,t),i=r.rect.x+r.rect.margin.left+r.rect.width/2,a=r.rect.y+r.rect.margin.top+r.rect.height/2,s=Math.min(r.rect.width,r.rect.height)/2*.8;return(i-n)**2+(a-o)**2<=s**2}const vc=(e,t,{requireFailure:r,recognizeWith:n}={})=>{const o=e.customTooltipModel.utils,i=e.debouncer(o.displayTooltip,o.DEBOUNCE_THRESHOLD);return{type:"Tap",requireFailure:r,recognizeWith:n,options:{event:"tap",interval:10,pointers:1,enable(t,r){return!r||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(r){r.preventDefault();const{target:n}=r.srcEvent;if(n&&("INPUT"===n.nodeName||n.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",r);if(n&&n.hasAttribute("data-action")&&n.hasAttribute("data-component-key"))return void this.chart.component(n.getAttribute("data-component-key")).emit(n.getAttribute("data-action"));if(n&&n.children&&n.children[0]&&"legend-cat"===n.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let a=gc(r,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(a={cx:a.x,cy:a.y,r:5});const s=this.chart.shapesAt(a,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"}),l=this.chart.component("tooltip"),u="mouse"!==r.pointerType&&l&&l.show;if(s.length){if(this.chart.brushFromShapes(s,{components:[{key:s[0].key,action:r.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect(),u&&this.components.some((e=>"slices"===e.key))){const{customTooltipModel:t}=e;if(t.useCustomTooltip&&o.checkIfPromisesExist({customTooltipModel:t})){const n=o.getNodes(r,this.chart);i(r,l,{nodes:n,opts:e,customTooltipModel:t})}else l.emit("show",r,{nodes:s})}}else u&&l.emit("hide")}}}},bc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"lasso",enable(t,r){if(this.isStarted||!r)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return!e.isLocked(n)&&n.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),xc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Tap",requireFailure:t,recognizeWith:r,options:{event:"areatap",pointers:2,enable(t,r){if(this.started||!r)return!0;if(e.constraints.active||e.constraints.select)return!1;const n=this.chart.componentsFromPoint({x:r.center.x,y:r.center.y});return n.some((e=>"slices"===e.key))&&!e.isLocked(n)}},events:{areatap(t){const r=this.chart.component("area");r&&!this.started&&(e.interactions.emit("selections-start"),r.emit("areaStart",t.pointers[0]),r.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{r.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function qc({chart:e},t,r){const n=e.component("tooltip");n&&n.show&&(n.emit("hide"),r.customTooltipModel.useCustomTooltip&&t&&t({},n,{nodes:[],opts:r,customTooltipModel:r.customTooltipModel,hide:!0}))}function Dc(e){const t=e.customTooltipModel.utils,r=e.debouncer(t.displayTooltip,t.DEBOUNCE_THRESHOLD);return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&yc(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const r=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(r)}(t,e))}n&&t.preventDefault(),qc(this,r,e)},mousemove(n){if(!e.constraints.passive){const o=this.chart.componentsFromPoint({x:n.clientX,y:n.clientY}),i=this.chart.component("tooltip");if(i&&i.show&&o.some((e=>"slices"===e.key))){const{customTooltipModel:o}=e;if(o.useCustomTooltip&&t.checkIfPromisesExist({customTooltipModel:o})){const a=t.getNodes(n,this.chart);r(n,i,{nodes:a,opts:e,customTooltipModel:o})}else i.emit("show",n)}else i&&i.show&&i.emit("hide")}},mouseup(t){2===t.button&&qc(this,r,e)},mouseleave(){qc(this,r,e)}}}}const Cc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"rotate",pointers:1,threshold:10,enable(t,r){return!(!this.started&&r)||!e.constraints.active&&!e.interactions.lasso.active()&&yc(r,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,r=this.chart.element.getBoundingClientRect();this.pieCenter={x:r.left+t.x+t.width/2,y:r.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const r=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",r-this.prevAngle),this.prevAngle=r},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),wc=(e,{requireFailure:t,recognizeWith:r}={})=>({type:"Pan",requireFailure:t,recognizeWith:r,options:{event:"legendPan",pointers:1,threshold:10,enable(t,r){return!(!this.isStarted&&r)||!e.constraints.active&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),Mc=(e,t)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[Cc(e,{}),vc(e,t,{})]:[hc(e,{}),xc(e,{}),Cc(e,{}),bc(e,{}),wc(e,{}),vc(e,t,{})]});function Sc(e,t,r){const n=e.getIsSingleSelect(0),{constraints:o}=r;return o.active&&o.passive?[]:[Mc(t,n),Dc(t)]}function Ec({settings:e},t){const r={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(r.outerRadius={data:{field:t.encodings.slice.outerRadius}}),r}function Ic({layout:e},t,r){if(!e.dimensionTitle)return!1;const n=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:n&&n.qHyperCubeDef,isDimension:!0,disabled:()=>r.constraints.active||!r.model,model:t.model,app:t.app,translator:t.translator,rtl:r.rtl,selections:t.selections},style:{fontFamily:r.theme.getStyle("object","axis.title","fontFamily"),fontSize:r.theme.getStyle("object","axis.title","fontSize"),color:r.theme.getStyle("object","axis.title","color")}}}function Tc({layout:e},t,r){return function(e,t,r){if(!e)return!1;const{translator:n}=t,{rtl:o}=r;return{key:"disclaimer",type:"disclaimer",layout:{dock:G[e].alignment},settings:{label:n.get("Object.Disclaimer."+e),rtl:o}}}(function(e,t){const r={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(r.props.radius={field:t.encodings.slice.outerRadius});let n=t.ds.extract(r);if(0===n.length)return"NoDataExist";const o=re(e,"qHyperCube.qSize.qcy");if(re(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(n=t.encodings.slice.outerRadius?n.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):n.filter((e=>"NaN"!==e.num.value)),0===n.length)return"OnlyNanData";const i=n;return n=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?n.filter((e=>e.num.value>0&&e.radius.value>0)):n.filter((e=>e.num.value>0)),0===n.length?"OnlyNegativeOrZeroValues":i.length!==n.length&&"NegativeOrZeroValues"}(e,t),t,r)}function Ac({layout:e,context:t,selectionService:r},n={}){const o=function({layout:e}={},t={}){const r={};return K(r,t.colorService.getScales()),t.encodings.slice.outerRadius&&K(r,function({layout:e},t){const r={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(r.radius.min=0),r}({layout:e},t)),r}({layout:e},n),i={scales:o};let a=[];const s=Tc({layout:e},n,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=n.colorService.getLegend({eventName:"legend",key:"legend",viewState:n.viewState,chart:n.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[Yu({layout:e,settings:i},n),Ku({layout:e},n,t),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Ju({layout:e},n,t),Ic({layout:e},n,t),...u.components,Uu({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:n.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},ac({layout:{dataPoint:K({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},n),mc({layout:e},{...n,coloring:n.colorService.getSettings()},t),(!1!==e.showDisclaimer||!n.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:Sc(r,n,t),scales:o,components:n.pluginService.extendComponents(a),palettes:n.colorService.getPalettes(),formatters:Ec({settings:i},n),strategy:te(0,n)}}function Oc({instance:e,services:t,picasso:n,flags:o}){const i=h(),a=D(),s=C(),l=w(),u=E(),c=I(),p=M(),d=y(),f=T(),{qLocaleInfo:m}=A(),[g]=O((()=>{if(!t)return Promise.resolve();zu.attrExpr.updateProperties(a,p);return Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:c,legendProps:p.legend,layout:p,localeInfo:m,hc:p.qHyperCube,colorProps:{...p.color,useBaseColors:e(p)}})}),a&&!p.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])}),[t]);q((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(p)}),[p]),q((()=>{if(!e||!g)return;const{chart:h,viewState:y,interactions:v}=e,{colorService:b,pluginService:x}=t,q=i.viewState||{};p.snapshotData||(y.preventSet("legendScrollOffset",q.legendScrollOffset||0),y.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(p,y);const D=n.data("q")({key:"qHyperCube",data:p.qHyperCube,config:{localeInfo:m}}),C=[{type:"q",key:"qHyperCube",data:p.qHyperCube,config:{localeInfo:m}},...b.getData()],w={slice:{arc:"qMeasureInfo/0"}};p.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const M=function({layout:e,app:t,picasso:r,model:n,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:r,model:n,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Nu,miniChartToken:{},embed:s}}({layout:p,app:s,model:a,picasso:n,chart:h,translator:l,localeInfo:m,embed:u}),S=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(n.data("q")({data:p.qHyperCube,config:{localeInfo:m}}),w),E=d?()=>{const e=h.brush("selection");r.selections(e,{},p).forEach((e=>{d.select(e)}))}:()=>{},I=p.snapshotData&&!i.freeResize?{width:(p.snapshotData.content.size||p.snapshotData.object.size).w,height:(p.snapshotData.content.size||p.snapshotData.object.size).h}:void 0,T=t=>e.selectionService.getIsSelectionLocked(t),A=()=>Ac({layout:p,context:{rtl:"rtl"===i.direction,theme:c,translator:l,constraints:f,model:a},selectionService:e.selectionService},{picasso:n,ds:D,model:a,app:s,chart:h,onSelect:E,isLocked:T,interactions:v,constraints:f,translator:l,viewState:y,dataRowCount:S,encodings:w,colorService:b,pluginService:x,customTooltipModel:M,debouncer:Ga,properties:g[1],logicalSize:I,flags:o});e.generateSettings=A,h.update({data:C,settings:A()}),i.effect&&p.effectProperties?i.effect.update(p,h,{encodings:w}):p.effectPath||h.brush("highlight").end()}),[e,g,i.direction,i.effectProperties,f,c.name(),l.language()])}function jc({instance:e,services:t}){const r=g(),n=M();k((o=>{if(!(n.snapshotData&&n.snapshotData.content&&n.snapshotData.content.chartData)&&(function(e,t){const r=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:r.width,h:r.height}}(o,r),e&&t))return function({layout:e,chart:t,viewState:r,colorService:n}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:ne(t,"legend-cat"),rotation:r.get("rotation")},n.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),L((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:ne(e.chart,"legend-cat")})})),[e])}var kc={exports:{}};window;var Lc=V(kc.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s="./index.js")}({"../node_modules/extend/index.js":
10
10
  /*!***************************************!*\
@@ -971,4 +971,4 @@ function(e,t,r){r.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
971
971
  !*** ./utils/wrap-file-name.js ***!
972
972
  \*********************************/
973
973
  /*! exports provided: default */
974
- function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}}));const Nc={setValue(e,t,r){if(!t)return;const n=t.split(".");let o=e;const i=n[n.length-1];let a;for(a=0;a<n.length-1;++a)null==o[n[a]]&&(o[n[a]]=Number.isNaN(+n[a+1])?{}:[]),o=o[n[a]];void 0!==r?o[i]=r:delete o[i]},getValue(e,t,r){const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(null==i[n[o]])return r;i=i[n[o]]}return i}},Pc={getDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qDimensionInfo:[]},getDimensionLayout(e,t,r){return this.getDimensionLayouts(t,r).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qMeasureInfo:[]},getMeasureLayout(e,t,r){return this.getMeasureLayouts(t,r).filter((t=>e===t.cId))[0]}};const Rc={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>Pc.getNumMeasures(e)>=1},showLegend:e=>{const t=Nc.getValue(e,"color.auto"),r=Nc.getValue(e,"color.expressionIsColor"),n=Nc.getValue(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:e=>!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===Nc.getValue(e,"color.useDimColVal")&&Nc.setValue(e,"color.useDimColVal",!1),!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode")&&"libraryItem"===Nc.getValue(e,"color.byDimDef.type"))},Fc=function(e){const{colorModeOptions:t,persistentColorsShow:r,useDimValColShow:n,showLegend:o}=Rc;this.color={colorMode:{options(r){const n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),t.primary(r)&&n.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(r)&&n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(r)&&n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(r)&&n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:e=>n(e)?r(e)&&!Nc.getValue(e,"color.useDimColVal"):r(e)},useDimColVal:{show:n}},this.legend={show:o,showTitle:{show(e){const t=Nc.getValue(e,"color.auto");return Nc.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===Nc.getValue(e,"color.mode")&&!0===Nc.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>Nc.getValue(e,"legend.show")&&o(e)}}};function Vc(e){return new Fc(e)}const _c=Vc("hard");const Hc=e=>({uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,r)=>r.layout.donut.showAsDonut}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:_c.color.colorMode.options},persistentColors:{show:_c.color.persistentColors.show}}},legend:{show:_c.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:_c.legend.showTitle.show},dock:{show:_c.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}),zc={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:r}={})=>r&&(r.dataPoint.auto||"share"!==r.dataPoint.labelMode)}}}}}}},Uc={uses:"sorting"},Bc={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Wc(e){return{type:"items",component:"accordion",items:{data:zc,sorting:Uc,addons:Bc,settings:Hc(e)}}}const $c=Vc("explore"),Yc=Wc();var Kc={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Yc.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Yc.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:$c.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&$c.color.useDimColVal.show(e))}}}}}}};function Jc(e,t){const r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Zc(e){return e.data.num.label}function Gc(e){return e.data.radius.label}function Xc(e,t,r,n){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Zc:Jc;if("share"===e.dataPoint.labelMode)return Jc;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Gc:Zc;return Zc}(r,n)(e,t)}function Qc(e){let t;return t=e.data.label?function(e,t){let r=e;return r.length>t&&(r=r.substr(0,t-3)+"..."),r}(e.data.label,20):"",t}class ep{constructor({element:e,properties:t,effectHelper:r,Flag:n}){this.element=e,this.Flag=n,r.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,r.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const r=this.chart.getAffectedShapes("highlight"),n=this.effectLayer[0].getBoundingClientRect(),o=r.map((r=>{const{start:o,end:i,outerRadius:a,offset:s}=r.desc.slice,{scaleRatio:l}=this.chart.component(r.key).rect,u=r.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-n.left+l.x*(s.x+a*Math.sin(c)),d=u.top-n.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Qc(r),label:Xc(r,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,r,n){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,r){return e.options=K(e.options,{effect:null}),r?t.getProperties().then((e=>K(e,{effectPath:null,effectProperties:null,dataPoint:K(!0,{},e.originalModelSettings.dataPoint),legend:K(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class tp extends ep{init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.max===n.max?Promise.resolve():super.init(e,t,r,n)}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;r&&o<i[0]&&(i=[o,t]),n&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class rp extends ep{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const r=t[0],n=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((r,n)=>{const o=Xc(r,this.chart.formatter,e,t);return{text:`${Qc(r)} (${o})`,value:n}}))}init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.selectedIndex===n.selectedIndex?Promise.resolve():super.init(e,t,r,n)}}var np={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new tp(e):"/effects/highlight-value"===e.effectPath?new rp(e):null};function op(e){const t={},{components:r,tooltip:n}=e,o=r?r.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),n){var i,a;t.chart_tooltip_custom=!n.auto;const e=null===(i=n.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function ip(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function ap(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function sp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){ap(e),ip(t),Nu.addCallbackCustomTooltip(t)},move(e,t){ap(e),ip(t),Nu.moveCallbackCustomTooltip(t,e)},remove(e,t){Nu.removeCallbackCustomTooltip(t,e)},replace(e,t,r,n){ap(e),ip(n),Nu.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:(t,r)=>e.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){ip(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:r}=e.color;"byExpression"===r&&0===t.length&&(e.color.mode="primary")}(t)}}}}const lp=e=>e.qMax<=0,up=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(lp));function cp(e){return{definition:Wc(e.flags),softDefinition:Kc,support:{snapshot:up,export:up,exportData:!0,sharing:up,viewData:!0,effects:!0},effects:np,extendMetrics:op,importProperties:(t,r,n,o)=>{const i={layout:{templateId:r.templateId}};n.mapProperties(i);const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,r)=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}function pp(e){return{properties:{version:"1.11.16",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Bu.STROKE.COLOR},cornerRadius:Bu.CORNER_RADIUS,innerRadius:Bu.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[sp(e)]},importProperties:({exportFormat:t,initialProperties:r,hypercubePath:n})=>{const o=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),hypercubePath:n});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:r})=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}const dp=o=>{!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((t=>{e.add(N[t])}))}}(o.translator);const i=function(){const o=t();return o.use(r),o.use(n(e)),o.use(ui()),o.component("pie-dividers",fi),o.component("negative-indicators",gi),o}();return{qae:pp(o),ext:cp(o),component(){const e=xu({picasso:i}),t=Du({instance:e});Oc({instance:e,services:t,picasso:i,flags:o.flags}),function({instance:e}){const t=M(),r=h(),n=j();q((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),r.effect&&r.effect.update(t,e.chart))}),[n.width,n.height])}({instance:e}),jc({instance:e,services:t})}}};export{dp as default};
974
+ function(e,t,r){function n(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}r.r(t),r.d(t,"default",(function(){return n}))}}));const Nc={setValue(e,t,r){if(!t)return;const n=t.split(".");let o=e;const i=n[n.length-1];let a;for(a=0;a<n.length-1;++a)null==o[n[a]]&&(o[n[a]]=Number.isNaN(+n[a+1])?{}:[]),o=o[n[a]];void 0!==r?o[i]=r:delete o[i]},getValue(e,t,r){const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(null==i[n[o]])return r;i=i[n[o]]}return i}},Pc={getDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>Nc.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>Nc.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qDimensionInfo:[]},getDimensionLayout(e,t,r){return this.getDimensionLayouts(t,r).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const r=Nc.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return r?r.qMeasureInfo:[]},getMeasureLayout(e,t,r){return this.getMeasureLayouts(t,r).filter((t=>e===t.cId))[0]}};const Rc={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>Pc.getNumMeasures(e)>=1},showLegend:e=>{const t=Nc.getValue(e,"color.auto"),r=Nc.getValue(e,"color.expressionIsColor"),n=Nc.getValue(e,"color.mode");return!(!t&&"primary"===n||!t&&"byExpression"===n&&(r||void 0===r))},persistentColorsShow:e=>!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===Nc.getValue(e,"color.useDimColVal")&&Nc.setValue(e,"color.useDimColVal",!1),!Nc.getValue(e,"color.auto")&&"byDimension"===Nc.getValue(e,"color.mode")&&"libraryItem"===Nc.getValue(e,"color.byDimDef.type"))},Fc=function(e){const{colorModeOptions:t,persistentColorsShow:r,useDimValColShow:n,showLegend:o}=Rc;this.color={colorMode:{options(r){const n=[];return"explore"===e&&n.push({value:"auto",translation:"Common.Auto"}),t.primary(r)&&n.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(r)&&n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(r)&&n.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(r)&&n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(r)&&"explore"!==e&&n.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),n}},persistentColors:{show:e=>n(e)?r(e)&&!Nc.getValue(e,"color.useDimColVal"):r(e)},useDimColVal:{show:n}},this.legend={show:o,showTitle:{show(e){const t=Nc.getValue(e,"color.auto");return Nc.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===Nc.getValue(e,"color.mode")&&!0===Nc.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>Nc.getValue(e,"legend.show")&&o(e)}}};function Vc(e){return new Fc(e)}const _c=Vc("hard");const Hc=e=>({uses:"settings",items:{general:{items:{showDisclaimer:null!=e&&e.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slice:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,r)=>r.layout.donut.showAsDonut}}}}},showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:_c.color.colorMode.options},persistentColors:{show:_c.color.persistentColors.show}}},legend:{show:_c.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:_c.legend.showTitle.show},dock:{show:_c.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}),zc={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:r}={})=>r&&(r.dataPoint.auto||"share"!==r.dataPoint.labelMode)}}}}}}},Uc={uses:"sorting"},Bc={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Wc(e){return{type:"items",component:"accordion",items:{data:zc,sorting:Uc,addons:Bc,settings:Hc(e)}}}const $c=Vc("explore"),Yc=Wc();var Kc={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Yc.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Yc.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:$c.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&$c.color.useDimColVal.show(e))}}}}}}};function Jc(e,t){const r=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(r)}function Zc(e){return e.data.num.label}function Gc(e){return e.data.radius.label}function Xc(e,t,r,n){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Zc:Jc;if("share"===e.dataPoint.labelMode)return Jc;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Gc:Zc;return Zc}(r,n)(e,t)}function Qc(e){let t;return t=e.data.label?function(e,t){let r=e;return r.length>t&&(r=r.substr(0,t-3)+"..."),r}(e.data.label,20):"",t}class ep{constructor({element:e,properties:t,effectHelper:r,Flag:n}){this.element=e,this.Flag=n,r.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,r.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const r=this.chart.getAffectedShapes("highlight"),n=this.effectLayer[0].getBoundingClientRect(),o=r.map((r=>{const{start:o,end:i,outerRadius:a,offset:s}=r.desc.slice,{scaleRatio:l}=this.chart.component(r.key).rect,u=r.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-n.left+l.x*(s.x+a*Math.sin(c)),d=u.top-n.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Qc(r),label:Xc(r,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,r,n){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=n,e.effectPath=r,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,r){return e.options=K(e.options,{effect:null}),r?t.getProperties().then((e=>K(e,{effectPath:null,effectProperties:null,dataPoint:K(!0,{},e.originalModelSettings.dataPoint),legend:K(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class tp extends ep{init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.max===n.max?Promise.resolve():super.init(e,t,r,n)}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items,r=e.effectProperties.min,n=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;r&&o<i[0]&&(i=[o,t]),n&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class rp extends ep{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const r=t.element.getBoundingClientRect();return{x:e.clientX-r.left,y:e.clientY-r.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const r=t[0],n=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(r.data.value);-1!==n&&(this.selectedIndex=n,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,r){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,r),this.updateFlags(e,r)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((r,n)=>{const o=Xc(r,this.chart.formatter,e,t);return{text:`${Qc(r)} (${o})`,value:n}}))}init(e,t,r,n){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===r&&t.layout.effectProperties.selectedIndex===n.selectedIndex?Promise.resolve():super.init(e,t,r,n)}}var np={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new tp(e):"/effects/highlight-value"===e.effectPath?new rp(e):null};function op(e){const t={},{components:r,tooltip:n}=e,o=r?r.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),n){var i,a;t.chart_tooltip_custom=!n.auto;const e=null===(i=n.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function ip(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;1===t.length&&1===r.length&&(r[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function ap(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function sp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){ap(e),ip(t),Nu.addCallbackCustomTooltip(t)},move(e,t){ap(e),ip(t),Nu.moveCallbackCustomTooltip(t,e)},remove(e,t){Nu.removeCallbackCustomTooltip(t,e)},replace(e,t,r,n){ap(e),ip(n),Nu.replaceCallbackCustomTooltip(n,t)}},measures:{min:1,max:2,description:(t,r)=>e.get(0===r?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){ip(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:r}=e.color;"byExpression"===r&&0===t.length&&(e.color.mode="primary")}(t)}}}}const lp=e=>e.qMax<=0,up=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(lp));function cp(e){return{definition:Wc(e.flags),softDefinition:Kc,support:{snapshot:up,export:up,exportData:!0,sharing:up,viewData:!0,effects:!0},effects:np,extendMetrics:op,importProperties:(t,r,n,o)=>{const i={layout:{templateId:r.templateId}};n.mapProperties(i);const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()},s=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,r)=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}function pp(e){return{properties:{version:"1.11.17",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Bu.STROKE.COLOR},cornerRadius:Bu.CORNER_RADIUS,innerRadius:Bu.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[sp(e)]},importProperties:({exportFormat:t,initialProperties:r,hypercubePath:n})=>{const o=Lc.colorChart.importProperties({exportFormat:t,initialProperties:r,dataDefinition:sp(e),hypercubePath:n});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:r})=>Lc.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:r})}}const dp=o=>{!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((t=>{e.add(N[t])}))}}(o.translator);const i=function(){const o=t();return o.use(r),o.use(n(e)),o.use(ui()),o.component("pie-dividers",fi),o.component("negative-indicators",gi),o}();return{qae:pp(o),ext:cp(o),component(){const e=xu({picasso:i}),t=Du({instance:e});Oc({instance:e,services:t,picasso:i,flags:o.flags}),function({instance:e}){const t=M(),r=h(),n=j();q((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),r.effect&&r.effect.update(t,e.chart))}),[n.width,n.height])}({instance:e}),jc({instance:e,services:t})}}};export{dp as default};