@nebula.js/sn-pie-chart 1.13.0 → 1.13.1

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.13.0
2
+ * @nebula.js/sn-pie-chart v1.13.1
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q";import r from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{createGenerateClassName as d,StylesProvider as f,ThemeProvider as m}from"@material-ui/styles";import{useOptions as h,useElement as g,useSelections as y,useState as v,useLayout as b,useAction as x,useEffect as q,useModel as D,useApp as C,useTranslator as w,useStaleLayout as S,usePlugins as M,useConstraints as E,useTheme as I,useAppLayout as A,useEmbed as O,usePromise as T,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 n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const R=(e,t,n,r,o)=>e?e.getStyle(t,n,r):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 H=Object.prototype.hasOwnProperty,_=Object.prototype.toString,z=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_.call(e)},W=function(e){if(!e||"[object Object]"!==_.call(e))return!1;var t,n=H.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&H.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||H.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(!H.call(e,t))return;if(U)return U(e,t).value}return e[t]},K=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Y(s,n),s!==(o=Y(t,n))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=r&&B(r)?r:[]):a=r&&W(r)?r:{},$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:n,newValue:o}));return s};const J="center",G="bottom";var Z={NoDataExist:{label:"NoDataExist",alignment:J,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:J,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:J,default:!1},LimitedData:{label:"LimitedData",alignment:G,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:G,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:G,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:G,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Q={};X.forEach((([e,{width:t,height:n}])=>{Q[e]={width:t,height:n}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let n;for(n=0;n<X.length;++n)if(e>=X[n][1].width&&t>=X[n][1].height)return X[n][0];return"SPARK"}};function te(e,t){return{layoutModes:ee.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const ne=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function re(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const oe=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>oe.test(e),isRtlChar:e=>ie.test(e)||ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],se.isLtrChar(r))return"ltr";if(se.isRtlChar(r))return"rtl"}return"ltr"}},le={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?le.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=se.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=se.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:se.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,le.getColorSymbol(e,t)]:[le.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=se.detectTextDirection(e.value);let l;return l=o?r?[e.value,le.getColorSymbol(t,n)]:[le.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ue(e,t,n,r){const o=parseInt(R(e,t,n,r),10);if(!isNaN(o))return o}const ce=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function pe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){return{position:e.position,justify:e.justify,fill:e.onBackground?R(t,n,"label.value","color"):ce(t),overflow:e.overflow,padding:e.padding}}(n,t,e.themeId))),fontSize:ue(t,e.themeId,"label.value","fontSize"),fontFamily:R(t,e.themeId,"label.value","fontFamily"),label:e.label}}function de(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function me(){}var he=1/.7,ge="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",be=/^#([0-9a-f]{3,8})$/,xe=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),De=new RegExp("^rgba\\("+[ge,ge,ge,ye]+"\\)$"),Ce=new RegExp("^rgba\\("+[ve,ve,ve,ye]+"\\)$"),we=new RegExp("^hsl\\("+[ye,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[ye,ve,ve,ye]+"\\)$"),Me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Ie(){return this.rgb().formatRgb()}function Ae(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=be.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Oe(t):3===n?new ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Te(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Te(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=xe.exec(e))?new ke(t[1],t[2],t[3],1):(t=qe.exec(e))?new ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?Te(t[1],t[2],t[3],t[4]):(t=Ce.exec(e))?Te(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Me.hasOwnProperty(e)?Oe(Me[e]):"transparent"===e?new ke(NaN,NaN,NaN,0):null}function Oe(e){return new ke(e>>16&255,e>>8&255,255&e,1)}function Te(e,t,n,r){return r<=0&&(e=t=n=NaN),new ke(e,t,n,r)}function je(e){return e instanceof me||(e=Ae(e)),e?new ke((e=e.rgb()).r,e.g,e.b,e.opacity):new ke}function ke(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Le(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function Ne(){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 Pe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Re(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,r)}function Fe(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof me||(e=Ae(e)),!e)return new Ve;if(e instanceof Ve)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Ve(a,s,l,e.opacity)}function Ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function He(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}de(me,Ae,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return Fe(this).formatHsl()},formatRgb:Ie,toString:Ie}),de(ke,(function(e,t,n,r){return 1===arguments.length?je(e):new ke(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ke(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:Le,formatHex:Le,formatRgb:Ne,toString:Ne})),de(Ve,(function(e,t,n,r){return 1===arguments.length?Fe(e):new Ve(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ke(He(e>=240?e-240:e+120,o,r),He(e,o,r),He(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var _e=Math.PI/180,ze=180/Math.PI,Ue=4/29,Be=6/29,We=3*Be*Be;function $e(e){if(e instanceof Ye)return new Ye(e.l,e.a,e.b,e.opacity);if(e instanceof et)return tt(e);e instanceof ke||(e=je(e));var t,n,r=Ze(e.r),o=Ze(e.g),i=Ze(e.b),a=Ke((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ke((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ke((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Ye(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ye(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ke(e){return e>.008856451679035631?Math.pow(e,1/3):e/We+Ue}function Je(e){return e>Be?e*e*e:We*(e-Ue)}function Ge(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ze(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Xe(e){if(e instanceof et)return new et(e.h,e.c,e.l,e.opacity);if(e instanceof Ye||(e=$e(e)),0===e.a&&0===e.b)return new et(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ze;return new et(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Qe(e,t,n,r){return 1===arguments.length?Xe(e):new et(e,t,n,null==r?1:r)}function et(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tt(e){if(isNaN(e.h))return new Ye(e.l,0,0,e.opacity);var t=e.h*_e;return new Ye(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}de(Ye,(function(e,t,n,r){return 1===arguments.length?$e(e):new Ye(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return new Ye(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ye(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ke(Ge(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(n=.82521*Je(n))),Ge(-.9787684*t+1.9161415*e+.033454*n),Ge(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),de(et,Qe,fe(me,{brighter:function(e){return new et(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new et(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return tt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return nt(e(t),n)}}(e))}(nt);function rt(){}function ot(e,t){var n=new rt;if(e instanceof rt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function it(){}rt.prototype=ot.prototype={constructor:rt,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var at=ot.prototype;function st(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ut(){}it.prototype={constructor:it,has:at.has,add:function(e){return this["$"+(e+="")]=e,this},remove:at.remove,clear:at.clear,values:at.keys,size:at.size,empty:at.empty,each:at.each};var ct=1/.7,pt="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mt=/^#([0-9a-f]{3})$/,ht=/^#([0-9a-f]{6})$/,gt=new RegExp("^rgb\\("+[pt,pt,pt]+"\\)$"),yt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),vt=new RegExp("^rgba\\("+[pt,pt,pt,dt]+"\\)$"),bt=new RegExp("^rgba\\("+[ft,ft,ft,dt]+"\\)$"),xt=new RegExp("^hsl\\("+[dt,ft,ft]+"\\)$"),qt=new RegExp("^hsla\\("+[dt,ft,ft,dt]+"\\)$"),Dt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ct(e){var t;return e=(e+"").trim().toLowerCase(),(t=mt.exec(e))?new Et((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=ht.exec(e))?wt(parseInt(t[1],16)):(t=gt.exec(e))?new Et(t[1],t[2],t[3],1):(t=yt.exec(e))?new Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vt.exec(e))?St(t[1],t[2],t[3],t[4]):(t=bt.exec(e))?St(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=xt.exec(e))?At(t[1],t[2]/100,t[3]/100,1):(t=qt.exec(e))?At(t[1],t[2]/100,t[3]/100,t[4]):Dt.hasOwnProperty(e)?wt(Dt[e]):"transparent"===e?new Et(NaN,NaN,NaN,0):null}function wt(e){return new Et(e>>16&255,e>>8&255,255&e,1)}function St(e,t,n,r){return r<=0&&(e=t=n=NaN),new Et(e,t,n,r)}function Mt(e){return e instanceof ut||(e=Ct(e)),e?new Et((e=e.rgb()).r,e.g,e.b,e.opacity):new Et}function Et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function It(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function At(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tt(e,t,n,r)}function Ot(e){if(e instanceof Tt)return new Tt(e.h,e.s,e.l,e.opacity);if(e instanceof ut||(e=Ct(e)),!e)return new Tt;if(e instanceof Tt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Tt(a,s,l,e.opacity)}function Tt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function jt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}st(ut,Ct,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),st(Et,(function(e,t,n,r){return 1===arguments.length?Mt(e):new Et(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+It(this.r)+It(this.g)+It(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),st(Tt,(function(e,t,n,r){return 1===arguments.length?Ot(e):new Tt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Tt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Tt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Et(jt(e>=240?e-240:e+120,o,r),jt(e,o,r),jt(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var kt=Math.PI/180,Lt=180/Math.PI,Nt=4/29,Pt=6/29,Rt=3*Pt*Pt;function Ft(e){if(e instanceof Vt)return new Vt(e.l,e.a,e.b,e.opacity);if(e instanceof Wt){if(isNaN(e.h))return new Vt(e.l,0,0,e.opacity);var t=e.h*kt;return new Vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Et||(e=Mt(e));var n,r,o=Ut(e.r),i=Ut(e.g),a=Ut(e.b),s=Ht((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Ht((.4360747*o+.3850649*i+.1430804*a)/.96422),r=Ht((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Vt(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Vt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ht(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rt+Nt}function _t(e){return e>Pt?e*e*e:Rt*(e-Nt)}function zt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ut(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bt(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(e instanceof Vt||(e=Ft(e)),0===e.a&&0===e.b)return new Wt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Lt;return new Wt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Wt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}st(Vt,(function(e,t,n,r){return 1===arguments.length?Ft(e):new Vt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Vt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Et(zt(3.1338561*(t=.96422*_t(t))-1.6168667*(e=1*_t(e))-.4906146*(n=.82521*_t(n))),zt(-.9787684*t+1.9161415*e+.033454*n),zt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),st(Wt,(function(e,t,n,r){return 1===arguments.length?Bt(e):new Wt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Wt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Wt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ft(this).rgb()}}));var $t=-.29227,Yt=-.90649,Kt=1.97294,Jt=Kt*Yt,Gt=1.78277*Kt,Zt=-.6557636667999999;function Xt(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);e instanceof Et||(e=Mt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Zt*r+Jt*t-Gt*n)/(Zt+Jt-Gt),i=r-o,a=(Kt*(n-o)-$t*i)/Yt,s=Math.sqrt(a*a+i*i)/(Kt*o*(1-o)),l=s?Math.atan2(a,i)*Lt-120:NaN;return new Qt(l<0?l+360:l,s,o,e.opacity)}function Qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function en(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}st(Qt,(function(e,t,n,r){return 1===arguments.length?Xt(e):new Qt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*kt,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Et(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*($t*r+Yt*o)),255*(t+n*(Kt*r)),this.opacity)}}));var tn,nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){return new on(e)}function on(e){if(!(t=nn.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function an(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}rn.prototype=on.prototype,on.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var sn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return an(100*e,t)},r:an,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(tn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+en(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ln(e){return e}var un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):ln,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):ln,s=e.percent||"%";function l(e){var t=(e=rn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):sn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=sn[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?un[8+tn/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=r(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=r(w+e,w.length?p-q.length:1/0),w=""),n){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=en(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=un[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){cn(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var pn=new Date,dn=new Date;function fn(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return fn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return pn.setTime(+t),dn.setTime(+r),e(pn),e(dn),Math.floor(n(pn,dn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var mn=fn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));mn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?fn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):mn:null};fn((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),fn((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),fn((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var hn=fn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function gn(e){return fn((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var yn=gn(0),vn=gn(1);gn(2),gn(3);var bn=gn(4);gn(5),gn(6),fn((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var xn=fn((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},fn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),fn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}));var qn=fn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Dn(e){return fn((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Cn=Dn(0),wn=Dn(1);Dn(2),Dn(3);var Sn=Dn(4);Dn(5),Dn(6),fn((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));var Mn=fn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function En(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function In(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 An(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var On,Tn,jn,kn={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,Nn=/^%/,Pn=/[\\^$*+?|[\]().{}]/g;function Rn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function Fn(e){return e.replace(Pn,"\\$&")}function Vn(e){return new RegExp("^(?:"+e.map(Fn).join("|")+")","i")}function Hn(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function _n(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=Ln.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Kn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function er(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tr(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=Ln.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rr(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function or(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ir(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ar(e,t){return Rn(e.getDate(),t,2)}function sr(e,t){return Rn(e.getHours(),t,2)}function lr(e,t){return Rn(e.getHours()%12||12,t,2)}function ur(e,t){return Rn(1+hn.count(xn(e),e),t,3)}function cr(e,t){return Rn(e.getMilliseconds(),t,3)}function pr(e,t){return cr(e,t)+"000"}function dr(e,t){return Rn(e.getMonth()+1,t,2)}function fr(e,t){return Rn(e.getMinutes(),t,2)}function mr(e,t){return Rn(e.getSeconds(),t,2)}function hr(e){var t=e.getDay();return 0===t?7:t}function gr(e,t){return Rn(yn.count(xn(e),e),t,2)}function yr(e,t){var n=e.getDay();return e=n>=4||0===n?bn(e):bn.ceil(e),Rn(bn.count(xn(e),e)+(4===xn(e).getDay()),t,2)}function vr(e){return e.getDay()}function br(e,t){return Rn(vn.count(xn(e),e),t,2)}function xr(e,t){return Rn(e.getFullYear()%100,t,2)}function qr(e,t){return Rn(e.getFullYear()%1e4,t,4)}function Dr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Rn(t/60|0,"0",2)+Rn(t%60,"0",2)}function Cr(e,t){return Rn(e.getUTCDate(),t,2)}function wr(e,t){return Rn(e.getUTCHours(),t,2)}function Sr(e,t){return Rn(e.getUTCHours()%12||12,t,2)}function Mr(e,t){return Rn(1+qn.count(Mn(e),e),t,3)}function Er(e,t){return Rn(e.getUTCMilliseconds(),t,3)}function Ir(e,t){return Er(e,t)+"000"}function Ar(e,t){return Rn(e.getUTCMonth()+1,t,2)}function Or(e,t){return Rn(e.getUTCMinutes(),t,2)}function Tr(e,t){return Rn(e.getUTCSeconds(),t,2)}function jr(e){var t=e.getUTCDay();return 0===t?7:t}function kr(e,t){return Rn(Cn.count(Mn(e),e),t,2)}function Lr(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Sn(e):Sn.ceil(e),Rn(Sn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function Nr(e){return e.getUTCDay()}function Pr(e,t){return Rn(wn.count(Mn(e),e),t,2)}function Rr(e,t){return Rn(e.getUTCFullYear()%100,t,2)}function Fr(e,t){return Rn(e.getUTCFullYear()%1e4,t,4)}function Vr(){return"+0000"}function Hr(){return"%"}function _r(e){return+e}function zr(e){return Math.floor(+e/1e3)}!function(e){On=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Vn(o),c=Hn(o),p=Vn(i),d=Hn(i),f=Vn(a),m=Hn(a),h=Vn(s),g=Hn(s),y=Vn(l),v=Hn(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ar,e:ar,f:pr,H:sr,I:lr,j:ur,L:cr,m:dr,M:fr,p:function(e){return o[+(e.getHours()>=12)]},Q:_r,s:zr,S:mr,u:hr,U:gr,V:yr,w:vr,W:br,x:null,X:null,y:xr,Y:qr,Z:Dr,"%":Hr},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Cr,e:Cr,f:Ir,H:wr,I:Sr,j:Mr,L:Er,m:Ar,M:Or,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:_r,s:zr,S:Tr,u:jr,U:kr,V:Lr,w:Nr,W:Pr,x:null,X:null,y:Rr,Y:Fr,Z:Vr,"%":Hr},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:Gn,e:Gn,f:nr,H:Xn,I:Xn,j:Zn,L:tr,m:Jn,M:Qn,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:or,s:ir,S:er,u:zn,U:Un,V:Bn,w:_n,W:Wn,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Yn,Y:$n,Z:Kn,"%":rr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=kn[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=An(1900);if(w(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=In(An(i.y))).getUTCDay(),r=o>4||0===o?wn.ceil(r):wn(r),r=qn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(An(i.y))).getDay(),r=o>4||0===o?vn.ceil(r):vn(r),r=hn.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?In(An(i.y)).getUTCDay():t(An(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,In(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in kn?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=D(n,b),b.X=D(r,b),b.c=D(t,b),x.x=D(n,x),x.X=D(r,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",En);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,In);return t.toString=function(){return e},t}}}(e),Tn=On.utcFormat,jn=On.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||Tn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||jn("%Y-%m-%dT%H:%M:%S.%LZ");const Ur=K.bind(null,!0),Br={},{isArray:Wr}=Array;function $r(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Yr(e){return void 0===e}function Kr(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jr(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Yr(e[r||t])?i:e[t],e=e[r||t]})),e}function Gr(e,t){let n=!0;if($r(e)&&$r(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Gr(e[r],t[r])||(n=!1)})),n);if(Wr(e)&&Wr(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Gr(e[n],t[n]))return!1;return!0}return e===t}Br.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ur({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Gr(i,a)||Kr(t,o)||(Yr(a)?r.push({op:"add",path:s,value:i}):$r(i)&&$r(a)?r=r.concat(Br.generate(a,i,s)):Wr(i)&&Wr(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Yr(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Gr(t,o))return r;if(!Yr(t[0])&&Yr(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Br.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Yr(t[o])&&!Kr(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Br.apply=function(e,t){t.forEach((t=>{let n=Jr(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Wr(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Wr(o)&&Wr(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($r(o)&&$r(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Kr(a,e)&&delete a[e]})),Ur(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Jr(e,t.from);Wr(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Wr(n)?n.splice(+r,1):delete n[r]);var a}))},Br.clone=function(e){return Ur({},e)},Br.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Br.updateObject=function(e,t){Object.keys(e).length?Br.apply(e,Br.generate(e,t)):Ur(e,t)};const Zr=[[2,4,6],[2,4],[3]],Xr=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Qr(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function eo(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Qr(e[r],t,n)}!function(){let e,t;for(eo(Zr,1,10),e=0;e<Xr.length;e++)if(Xr[e])for(t=0;t<Xr[e].length;t++)Array.isArray(Xr[e][t])&&eo(Xr[e][t])}();var to={exports:{}};function no(){}function ro(){}ro.resetWarningCache=no;to.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ro,resetWarningCache:no};return n.PropTypes=n,n}();var oo=to.exports;function io(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ao({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:io(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}const so={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},lo={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},uo="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",co={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},po={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function fo(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Br.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function mo(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),fo(e,a,s)}))}function ho({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){mo(r,e,t,"qDimensions",a)}}}function go(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function yo({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){mo(o,e,t,"qMeasures",i,a)}}}function vo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const bo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},xo=({children:e,...t})=>o.createElement(i,P({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function qo(){function e({title:e,selected:t,onClick:n}){const r=se.detectTextDirection(e);return o.createElement(l,{button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(ao,{d:t?uo:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,P({anchorEl:t,open:p,onClose:c},bo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),d))}e.propTypes={title:oo.string.isRequired,selected:oo.bool,onClick:oo.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:oo.any,changeTo:oo.func.isRequired,current:oo.string.isRequired,dir:oo.string.isRequired,dock:oo.string.isRequired,list:oo.array,onClose:oo.func.isRequired,show:oo.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>o.createElement(xo,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(p-n),title:t},o.createElement("span",{style:c},t),o.createElement(ao,P({},po,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=se.detectTextDirection(e.text),v=o.createElement(xo,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(ao,P({},lo,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(ao,P({},co,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(ao,P({},so,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&ne(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:oo.bool.isRequired,padding:oo.string,minWidth:oo.string,titleData:oo.shape({breadcrumbs:oo.arrayOf(oo.string).isRequired,drilldown:oo.bool.isRequired,index:oo.number.isRequired,locked:oo.bool.isRequired,text:oo.string.isRequired,popoverText:oo.string.isRequired,drillUp:oo.func}).isRequired,popover:oo.shape({dir:oo.string.isRequired,dock:oo.string.isRequired,changeTo:oo.func.isRequired,getAlternatives:oo.func.isRequired}),translator:oo.shape({get:oo.func.isRequired}).isRequired,selections:oo.shape({isActive:oo.func,addListener:oo.func,removeListener:oo.func}),style:oo.shape({fontSize:oo.string,color:oo.string,fontFamily:oo.string}).isRequired,isDimension:oo.bool.isRequired,hasAlternative:oo.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?ho:yo,S=u?go:vo,M=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&ne(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const A=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,p),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},A)}}}function Do(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Co(e){if(e.type)return e;if("#"===e.charAt(0))return Co(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function So(e){var t="hsl"===(e=Co(e)).type?Co(function(e){var t=(e=Co(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),wo({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eo(){return(Eo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Io(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ao(){return(Ao=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oo(e){return(Oo="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 To(e){return(To="function"==typeof Symbol&&"symbol"===Oo(Symbol.iterator)?function(e){return Oo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Oo(e)})(e)}function jo(e){return e&&"object"===To(e)&&!Array.isArray(e)}function ko(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Ao({},e):e;return jo(e)&&jo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(jo(t[o])&&o in e?r[o]=ko(e[o],t[o],n):r[o]=t[o])})),r}var Lo=["xs","sm","md","lg","xl"];function No(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Io(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=Lo.indexOf(t)+1;return r===Lo.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[Lo[r]]-a/100).concat(o,")")}return Eo({keys:Lo,values:n,up:l,down:function(e){var t=Lo.indexOf(e)+1,r=n[Lo[t]];return t===Lo.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Po(e,t,n){var r;return Eo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo({paddingLeft:t(2),paddingRight:t(2)},n,Mo({},e.up("sm"),Eo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Mo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Mo(r,e.up("sm"),{minHeight:64}),r)},n)}var Ro={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"},Fo={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"},Vo={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"},Ho={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"},_o={black:"#000",white:"#fff"},zo={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:_o.white,default:Vo[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Uo={text:{primary:_o.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:Vo[800],default:"#303030"},action:{active:_o.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Bo(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wo(e)}(e.main,1.5*r)))}function Wo(e){var t=e.primary,n=void 0===t?{light:Ro[300],main:Ro[500],dark:Ro[700]}:t,r=e.secondary,o=void 0===r?{light:Fo.A200,main:Fo.A400,dark:Fo.A700}:r,i=e.error,a=void 0===i?{light:Ho[300],main:Ho[500],dark:Ho[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=Io(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=So(e),r=So(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Uo.text.primary)>=c?Uo.text.primary:zo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Eo({},e)).main&&e[t]&&(e.main=e[t]),Bo(e,"light",n,d),Bo(e,"dark",r,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Uo,light:zo};return ko(Eo({common:_o,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Vo,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function $o(e){return Math.round(1e5*e)/1e5}var Yo={textTransform:"uppercase"};function Ko(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,p=n.fontWeightMedium,d=void 0===p?500:p,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Io(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,n,r,i){return Eo({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat($o(r/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,Yo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Yo)};return ko(Eo({htmlFontSize:g,pxToRem:q,round:$o,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Jo(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Go=["none",Jo(0,2,1,-1,0,1,1,0,0,1,3,0),Jo(0,3,1,-2,0,2,2,0,0,1,5,0),Jo(0,3,3,-2,0,3,4,0,0,1,8,0),Jo(0,2,4,-1,0,4,5,0,0,1,10,0),Jo(0,3,5,-1,0,5,8,0,0,1,14,0),Jo(0,3,5,-1,0,6,10,0,0,1,18,0),Jo(0,4,5,-2,0,7,10,1,0,2,16,1),Jo(0,5,5,-3,0,8,10,1,0,3,14,2),Jo(0,5,6,-3,0,9,12,1,0,3,16,2),Jo(0,6,6,-3,0,10,14,1,0,4,18,3),Jo(0,6,7,-4,0,11,15,1,0,4,20,3),Jo(0,7,8,-4,0,12,17,2,0,5,22,4),Jo(0,7,8,-4,0,13,19,2,0,5,24,4),Jo(0,7,9,-4,0,14,21,2,0,5,26,4),Jo(0,8,9,-5,0,15,22,2,0,6,28,5),Jo(0,8,10,-5,0,16,24,2,0,6,30,5),Jo(0,8,11,-5,0,17,26,2,0,6,32,5),Jo(0,9,11,-5,0,18,28,2,0,7,34,6),Jo(0,9,12,-6,0,19,29,2,0,7,36,6),Jo(0,10,13,-6,0,20,31,3,0,8,38,7),Jo(0,10,13,-6,0,21,33,3,0,8,40,7),Jo(0,10,14,-6,0,22,35,3,0,8,42,7),Jo(0,11,14,-7,0,23,36,3,0,9,44,8),Jo(0,11,15,-7,0,24,38,3,0,9,46,8)],Zo={borderRadius:4};function Xo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Qo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ei={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ti=function(e){return"".concat(Math.round(e),"ms")},ni={easing:Qo,duration:ei,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?ei.standard:n,o=t.easing,i=void 0===o?Qo.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Io(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ti(r)," ").concat(i," ").concat("string"==typeof s?s:ti(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ri={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Io(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Wo(a),f=No(n),m=Xo(l),h=Eo({breakpoints:f,direction:"ltr",mixins:Po(f,m,o),overrides:{},palette:d,props:{},shadows:s||Go,typography:Ko(d,c),spacing:m},ko({shape:Zo,transitions:ni,zIndex:ri},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const ii=d({productionPrefix:"q11d9",disableGlobal:!0,seed:""});function ai(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:oi},e))}(e,ii),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&p.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(p.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function si(){return function(e){e.renderer("react",ai()),e.component("data-title",qo()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:oo.string.isRequired,spanStyle:oo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function li(e){return Qe(e).l<70}function ui(e,t){const n=Qe(e).l/100,r=Qe(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ci(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var pi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(ui(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ci({r:s,a:e},n),i=ci({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:li(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function di(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function fi(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:di(s)}}var mi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=fi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function hi(e){return(hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gi(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function yi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gi(i,r,o,a,s,"next",e)}function s(e){gi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){vi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||wi(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(e){return function(e){if(Array.isArray(e))return Si(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wi(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mi=Object.prototype.hasOwnProperty,Ei=Object.prototype.toString,Ii=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,Oi=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ei.call(e)},Ti=function(e){if(!e||"[object Object]"!==Ei.call(e))return!1;var t,n=Mi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mi.call(e,t)},ji=function(e,t){Ii&&"__proto__"===t.name?Ii(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ki=function(e,t){if("__proto__"===t){if(!Mi.call(e,t))return;if(Ai)return Ai(e,t).value}return e[t]},Li=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=ki(s,n),s!==(o=ki(t,n))&&(c&&o&&(Ti(o)||(i=Oi(o)))?(i?(i=!1,a=r&&Oi(r)?r:[]):a=r&&Ti(r)?r:{},ji(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&ji(s,{name:n,newValue:o}));return s};function Ni(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Pi(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Ri(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Fi(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Vi(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Hi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zi(){}var Ui=1/.7,Bi="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yi=/^#([0-9a-f]{3,8})$/,Ki=new RegExp("^rgb\\("+[Bi,Bi,Bi]+"\\)$"),Ji=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgba\\("+[Bi,Bi,Bi,Wi]+"\\)$"),Zi=new RegExp("^rgba\\("+[$i,$i,$i,Wi]+"\\)$"),Xi=new RegExp("^hsl\\("+[Wi,$i,$i]+"\\)$"),Qi=new RegExp("^hsla\\("+[Wi,$i,$i,Wi]+"\\)$"),ea={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ta(){return this.rgb().formatHex()}function na(){return this.rgb().formatRgb()}function ra(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?oa(t):3===n?new la(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ia(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ia(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ki.exec(e))?new la(t[1],t[2],t[3],1):(t=Ji.exec(e))?new la(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Gi.exec(e))?ia(t[1],t[2],t[3],t[4]):(t=Zi.exec(e))?ia(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xi.exec(e))?da(t[1],t[2]/100,t[3]/100,1):(t=Qi.exec(e))?da(t[1],t[2]/100,t[3]/100,t[4]):ea.hasOwnProperty(e)?oa(ea[e]):"transparent"===e?new la(NaN,NaN,NaN,0):null}function oa(e){return new la(e>>16&255,e>>8&255,255&e,1)}function ia(e,t,n,r){return r<=0&&(e=t=n=NaN),new la(e,t,n,r)}function aa(e){return e instanceof zi||(e=ra(e)),e?new la((e=e.rgb()).r,e.g,e.b,e.opacity):new la}function sa(e,t,n,r){return 1===arguments.length?aa(e):new la(e,t,n,null==r?1:r)}function la(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ua(){return"#"+pa(this.r)+pa(this.g)+pa(this.b)}function ca(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function pa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function da(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ma(e,t,n,r)}function fa(e){if(e instanceof ma)return new ma(e.h,e.s,e.l,e.opacity);if(e instanceof zi||(e=ra(e)),!e)return new ma;if(e instanceof ma)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ma(a,s,l,e.opacity)}function ma(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ha(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Hi(zi,ra,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ta,formatHex:ta,formatHsl:function(){return fa(this).formatHsl()},formatRgb:na,toString:na}),Hi(la,sa,_i(zi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ua,formatHex:ua,formatRgb:ca,toString:ca})),Hi(ma,(function(e,t,n,r){return 1===arguments.length?fa(e):new ma(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new ma(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ma(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new la(ha(e>=240?e-240:e+120,o,r),ha(e,o,r),ha(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ga=Math.PI/180,ya=180/Math.PI,va=4/29,ba=6/29,xa=3*ba*ba;function qa(e){if(e instanceof Da)return new Da(e.l,e.a,e.b,e.opacity);if(e instanceof Ia)return Aa(e);e instanceof la||(e=aa(e));var t,n,r=Ma(e.r),o=Ma(e.g),i=Ma(e.b),a=Ca((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ca((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ca((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Da(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Da(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ca(e){return e>.008856451679035631?Math.pow(e,1/3):e/xa+va}function wa(e){return e>ba?e*e*e:xa*(e-va)}function Sa(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ma(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ea(e){if(e instanceof Ia)return new Ia(e.h,e.c,e.l,e.opacity);if(e instanceof Da||(e=qa(e)),0===e.a&&0===e.b)return new Ia(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ya;return new Ia(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ia(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Aa(e){if(isNaN(e.h))return new Da(e.l,0,0,e.opacity);var t=e.h*ga;return new Da(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Oa(e){return function(){return e}}function Ta(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Oa(isNaN(e)?t:e)}Hi(Da,(function(e,t,n,r){return 1===arguments.length?qa(e):new Da(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return new Da(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Da(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new la(Sa(3.1338561*(t=.96422*wa(t))-1.6168667*(e=1*wa(e))-.4906146*(n=.82521*wa(n))),Sa(-.9787684*t+1.9161415*e+.033454*n),Sa(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Hi(Ia,(function(e,t,n,r){return 1===arguments.length?Ea(e):new Ia(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return new Ia(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Ia(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Aa(this).rgb()}}));var ja=function e(t){var n=function(e){return 1==(e=+e)?Ta:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Oa(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=sa(e)).r,(t=sa(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Ta(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),ka=/^class(-pyramid)?/,La=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Ci(c))),i=Math.max.apply(Math,[i].concat(Ci(c))),u.min=o,u.max=i,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=ja(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 Na(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=r||l>=o?Math.max(l,r):Na(e,t,n,r+1,o)}var Pa=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=n.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ci(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Ci(c)),u.max=Math.max.apply(Math,Ci(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=d&&ka.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ci(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Na(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Ra(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function Fa(e){var t,n=e.cm,r=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),xi(xi({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return xi(xi({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Va(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ha(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function _a(e,t,n,r){var o,i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ra:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Pa(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Li(u,La(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.getCDef,i=void 0===o?Fi:o,a=r.getCByField,s=void 0===a?Vi:a,l=r.getPersistence,u=void 0===l?Ri:l,c=i(t,n),p=s(n,c),d=p?p.raw():{},f=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&p&&(m.label=p.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Li(m,u(t,n,c,p,{byRow:Pi,byElemNo:Ni})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Pa(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return Fa({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Va(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Ha(e.measureOverrides,e.explicit),Va(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=Ha(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function za(e){var t=xi({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Li(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Li(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Li(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var i=n.pic.field(e.field);return La(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=xi({},e);Li(a,Ni(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Li(a,Ni(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Li(a,Ni(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=xi(xi({},e),r.getDataColorSpecials())),n.settings=Li(e,_a(this,n,t,e))}return n.settings}};return o}var Ua=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Ba=function(e){throw e.isHandled=!0,e},Wa=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},$a=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Ya=function(e,t){var n=t.layout,r=t.model,o=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ba):Promise.reject()};function Ka(e){var t=e.hc,n=e.source,r=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Ja(e){return function(t){return"object"===hi(t.datum[e])?t.datum[e].value:void 0}}function Ga(e){return"object"===hi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Za(e){return-3===e.datum.value}var Xa=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},Qa=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function es(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Xa(i,r,o)},show:"function"==typeof i.show?function(){return Qa(i,l,a)}:Qa(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ts(e,t,n){var r=[],o=[],i=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=es(e,t);if(!r.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return Li(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=es(e,t);return!!u.show&&Li(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=n.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},vi(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),vi(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),vi(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var ns=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function rs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=za(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return Wa(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return $a(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return Ya(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=Ua,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=xi({},o),r={},!n.key)throw new Error("Missing key");t.set(xi(xi({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=xi(xi({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=o().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Ci(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ci((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ci((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,p=Ka({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=xi(xi({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Li({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Li({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,o=Ja(r),i=Ja("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Za(e)||i(e)?u:l}:n[t]?function(e){return Za(e)?u:Ga(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Za(e)||i(e)?u:Ga(e)?l:c}:"color"===p?function(e){return Za(e)||i(e)?u:Ga(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Ja("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?ns(e.qNum):e.qText&&ra(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var p=vi({},u,n);return r.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return ts({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var os=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function is(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(os),i=r.some(os),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function as(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=xi(xi(xi({},e),t),{},{colorProps:xi(xi({},e.colorProps),t.colorProps||{})});return n}var ss=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ls(e){var t,n=e.qHyperCube.qDimensionInfo.some(ss),r=e.qHyperCube.qMeasureInfo.some(ss),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var us=function(){};function cs(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function ps(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function ds(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function fs(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function ms(e){return(ms="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 hs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ys(e,t,n){return t&&gs(e.prototype,t),n&&gs(e,n),e}function vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(n),!0).forEach((function(t){vs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qs(e,t){return(qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ds(){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 Cs(e,t,n){return(Cs=Ds()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&qs(o,n.prototype),o}).apply(null,arguments)}function ws(e){return function(e){if(Array.isArray(e))return Ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ss(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 Ss(e,t){if(e){if("string"==typeof e)return Ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ms(e,t):void 0}}function Ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Es=Object.prototype.hasOwnProperty,Is=Object.prototype.toString,As=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,Ts=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Is.call(e)},js=function(e){if(!e||"[object Object]"!==Is.call(e))return!1;var t,n=Es.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Es.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Es.call(e,t)},ks=function(e,t){As&&"__proto__"===t.name?As(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ls=function(e,t){if("__proto__"===t){if(!Es.call(e,t))return;if(Os)return Os(e,t).value}return e[t]},Ns=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Ls(s,n),s!==(o=Ls(t,n))&&(c&&o&&(js(o)||(i=Ts(o)))?(i?(i=!1,a=r&&Ts(r)?r:[]):a=r&&js(r)?r:{},ks(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&ks(s,{name:n,newValue:o}));return s};function Ps(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Rs(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function Fs(e){var t=e.cache,n=e.f,r=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=r;if(o.field&&o.field!==n){var d=Ps(o.field,i,{cache:t});if(-1===d)return;p=Ns({qRow:a},d(s))}u[c]=Rs(o,p,{key:l})}function Vs(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===ms(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=ms(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Ps(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=Ns({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Rs(d,C,{key:l});if(!d.filter||d.filter(C)){for(var S=0;S<f.length;S++){var M=p[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var I=0;I<E.length;I++)Fs({cache:n,f:u,mainCell:C,p:E[I],prop:f[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?I:f[S]});if(M.fields){var A=w[f[S]].map((function(e){return e.value})),O=w[f[S]].map((function(e){return e.label}));w[f[S]]={value:"function"==typeof M.value?M.value(A):void 0!==M.value?M.value:A,label:"function"==typeof M.label?M.label(O):void 0!==M.label?String(M.label):String(w[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,ws(r.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Hs(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function _s(e,t){var n,r,o,i,a,s=new Ws(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=zs);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new Ws(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bs)}function zs(e){return e.children}function Us(e){e.data=e.data.data}function Bs(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ws(e){this.data=e,this.depth=this.height=0,this.parent=null}function $s(e){if("function"!=typeof e)throw new Error;return e}Ws.prototype=_s.prototype={constructor:Ws,count:function(){return this.eachAfter(Hs)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return _s(this).eachBefore(Us)}};var Ys={depth:-1},Ks={};function Js(e){return e.id}function Gs(e){return e.parentId}function Zs(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Zs(n,o[s]);Array.isArray(l)?a.push.apply(a,ws(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Zs(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Xs(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,ws(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,ws(Xs(e[i].children,t-1,n)));return r}function Qs(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=ws(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Xs(e.children,i-1,n)}}return!1}function el(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var tl=/^qDimensionInfo(?:\/(\d+))?/,nl=/^\/?qMeasureInfo\/(\d+)/,rl=/\/qAttrExprInfo\/(\d+)/,ol=/\/qAttrDimInfo\/(\d+)/;function il(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 al(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,p=n.qEffectiveInterColumnSortOrder,d=il(n);return tl.test(c)&&(o=!0,i=+tl.exec(c)[1],c=r.replace(tl,"")),nl.test(c)&&("K"===n.qMode?l=+nl.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+nl.exec(c)[1],u=0):u=+nl.exec(c)[1],c=c.replace(nl,"")),c&&(ol.exec(c)?s=+ol.exec(c)[1]:rl.exec(c)&&(a=+rl.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function sl(e,t){var n,r,o=Qs(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function ll(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function ul(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var n=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(p,r):p})}}var cl=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Zs(r,e);return i&&i[0]?(t.tree=_s(i[0],n.children||function(e){return e[o]}),t.tree):null};function pl(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=xs({__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=Js,t=Gs;function n(n){var r,o,i,a,s,l,u,c=n.length,p=new Array(c),d={};for(o=0;o<c;++o)r=n[o],s=p[o]=new Ws(r),null!=(l=e(r,o,n))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?Ks:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===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=Ys,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Bs),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=$s(t),n):e},n.parentId=function(e){return arguments.length?(t=$s(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var dl=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=sl(i,al(p.field,{cube:r,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function fl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?pl(t):cl(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=il(o),d=p[u-1];c=n.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(xs(xs({},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?al(c,{cube:o,cache:n}):{fieldDepth:0};dl({propsArr:y,props:h,cube:o,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,S=l[q[D].depth].main,M=x[D],E=M.data,I=ll(S,E,{key:i});ul({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function ml(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!cl(s,n,e))continue;var u="object"===ms(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=al(u,{cube:s,cache:n}),h=sl({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;dl({propsArr:f,props:p,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=ms(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!d.filter||d.filter(E)){var I=ll(d,E,{key:l});ul({propsArr:f,props:p,item:M,itemData:E,ret:I,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,ws(r.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var hl,gl=(function(e){
7
+ import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q";import r from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import 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 S,usePlugins as M,useConstraints as E,useTheme as I,useAppLayout as A,useEmbed as O,usePromise as T,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 n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const R=(e,t,n,r,o)=>e?e.getStyle(t,n,r):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 H=Object.prototype.hasOwnProperty,_=Object.prototype.toString,z=Object.defineProperty,U=Object.getOwnPropertyDescriptor,B=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_.call(e)},W=function(e){if(!e||"[object Object]"!==_.call(e))return!1;var t,n=H.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&H.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||H.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(!H.call(e,t))return;if(U)return U(e,t).value}return e[t]},K=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Y(s,n),s!==(o=Y(t,n))&&(c&&o&&(W(o)||(i=B(o)))?(i?(i=!1,a=r&&B(r)?r:[]):a=r&&W(r)?r:{},$(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&$(s,{name:n,newValue:o}));return s};const J="center",G="bottom";var Z={NoDataExist:{label:"NoDataExist",alignment:J,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:J,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:J,default:!1},LimitedData:{label:"LimitedData",alignment:G,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:G,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:G,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:G,default:!1}};const X=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],Q={};X.forEach((([e,{width:t,height:n}])=>{Q[e]={width:t,height:n}}));const ee={getLayoutModes:()=>Q,getLayoutMode(e,t){let n;for(n=0;n<X.length;++n)if(e>=X[n][1].width&&t>=X[n][1].height)return X[n][0];return"SPARK"}};function te(e,t){return{layoutModes:ee.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const ne=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function re(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const oe=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ie=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>oe.test(e),isRtlChar:e=>ie.test(e)||ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],se.isLtrChar(r))return"ltr";if(se.isRtlChar(r))return"rtl"}return"ltr"}},le={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?le.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=se.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=se.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:se.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,le.getColorSymbol(e,t)]:[le.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=se.detectTextDirection(e.value);let l;return l=o?r?[e.value,le.getColorSymbol(t,n)]:[le.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ue(e,t,n,r){const o=parseInt(R(e,t,n,r),10);if(!isNaN(o))return o}const ce=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function pe(e,t){return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){return{position:e.position,justify:e.justify,fill:e.onBackground?R(t,n,"label.value","color"):ce(t),overflow:e.overflow,padding:e.padding}}(n,t,e.themeId))),fontSize:ue(t,e.themeId,"label.value","fontSize"),fontFamily:R(t,e.themeId,"label.value","fontFamily"),label:e.label}}function de(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function me(){}var he=1/.7,ge="\\s*([+-]?\\d+)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",be=/^#([0-9a-f]{3,8})$/,xe=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),qe=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),De=new RegExp("^rgba\\("+[ge,ge,ge,ye]+"\\)$"),Ce=new RegExp("^rgba\\("+[ve,ve,ve,ye]+"\\)$"),we=new RegExp("^hsl\\("+[ye,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[ye,ve,ve,ye]+"\\)$"),Me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Ie(){return this.rgb().formatRgb()}function Ae(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=be.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Oe(t):3===n?new ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Te(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Te(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=xe.exec(e))?new ke(t[1],t[2],t[3],1):(t=qe.exec(e))?new ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?Te(t[1],t[2],t[3],t[4]):(t=Ce.exec(e))?Te(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=Se.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Me.hasOwnProperty(e)?Oe(Me[e]):"transparent"===e?new ke(NaN,NaN,NaN,0):null}function Oe(e){return new ke(e>>16&255,e>>8&255,255&e,1)}function Te(e,t,n,r){return r<=0&&(e=t=n=NaN),new ke(e,t,n,r)}function je(e){return e instanceof me||(e=Ae(e)),e?new ke((e=e.rgb()).r,e.g,e.b,e.opacity):new ke}function ke(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Le(){return"#"+Pe(this.r)+Pe(this.g)+Pe(this.b)}function Ne(){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 Pe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Re(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,r)}function Fe(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof me||(e=Ae(e)),!e)return new Ve;if(e instanceof Ve)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Ve(a,s,l,e.opacity)}function Ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function He(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}de(me,Ae,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHsl:function(){return Fe(this).formatHsl()},formatRgb:Ie,toString:Ie}),de(ke,(function(e,t,n,r){return 1===arguments.length?je(e):new ke(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ke(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:Le,formatHex:Le,formatRgb:Ne,toString:Ne})),de(Ve,(function(e,t,n,r){return 1===arguments.length?Fe(e):new Ve(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return e=null==e?he:Math.pow(he,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ke(He(e>=240?e-240:e+120,o,r),He(e,o,r),He(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var _e=Math.PI/180,ze=180/Math.PI,Ue=4/29,Be=6/29,We=3*Be*Be;function $e(e){if(e instanceof Ye)return new Ye(e.l,e.a,e.b,e.opacity);if(e instanceof et)return tt(e);e instanceof ke||(e=je(e));var t,n,r=Ze(e.r),o=Ze(e.g),i=Ze(e.b),a=Ke((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ke((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ke((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Ye(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ye(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ke(e){return e>.008856451679035631?Math.pow(e,1/3):e/We+Ue}function Je(e){return e>Be?e*e*e:We*(e-Ue)}function Ge(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ze(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Xe(e){if(e instanceof et)return new et(e.h,e.c,e.l,e.opacity);if(e instanceof Ye||(e=$e(e)),0===e.a&&0===e.b)return new et(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ze;return new et(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Qe(e,t,n,r){return 1===arguments.length?Xe(e):new et(e,t,n,null==r?1:r)}function et(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tt(e){if(isNaN(e.h))return new Ye(e.l,0,0,e.opacity);var t=e.h*_e;return new Ye(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}de(Ye,(function(e,t,n,r){return 1===arguments.length?$e(e):new Ye(e,t,n,null==r?1:r)}),fe(me,{brighter:function(e){return new Ye(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ye(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ke(Ge(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(n=.82521*Je(n))),Ge(-.9787684*t+1.9161415*e+.033454*n),Ge(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),de(et,Qe,fe(me,{brighter:function(e){return new et(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new et(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return tt(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return nt(e(t),n)}}(e))}(nt);function rt(){}function ot(e,t){var n=new rt;if(e instanceof rt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function it(){}rt.prototype=ot.prototype={constructor:rt,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var at=ot.prototype;function st(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ut(){}it.prototype={constructor:it,has:at.has,add:function(e){return this["$"+(e+="")]=e,this},remove:at.remove,clear:at.clear,values:at.keys,size:at.size,empty:at.empty,each:at.each};var ct=1/.7,pt="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mt=/^#([0-9a-f]{3})$/,ht=/^#([0-9a-f]{6})$/,gt=new RegExp("^rgb\\("+[pt,pt,pt]+"\\)$"),yt=new RegExp("^rgb\\("+[ft,ft,ft]+"\\)$"),vt=new RegExp("^rgba\\("+[pt,pt,pt,dt]+"\\)$"),bt=new RegExp("^rgba\\("+[ft,ft,ft,dt]+"\\)$"),xt=new RegExp("^hsl\\("+[dt,ft,ft]+"\\)$"),qt=new RegExp("^hsla\\("+[dt,ft,ft,dt]+"\\)$"),Dt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ct(e){var t;return e=(e+"").trim().toLowerCase(),(t=mt.exec(e))?new Et((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=ht.exec(e))?wt(parseInt(t[1],16)):(t=gt.exec(e))?new Et(t[1],t[2],t[3],1):(t=yt.exec(e))?new Et(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vt.exec(e))?St(t[1],t[2],t[3],t[4]):(t=bt.exec(e))?St(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=xt.exec(e))?At(t[1],t[2]/100,t[3]/100,1):(t=qt.exec(e))?At(t[1],t[2]/100,t[3]/100,t[4]):Dt.hasOwnProperty(e)?wt(Dt[e]):"transparent"===e?new Et(NaN,NaN,NaN,0):null}function wt(e){return new Et(e>>16&255,e>>8&255,255&e,1)}function St(e,t,n,r){return r<=0&&(e=t=n=NaN),new Et(e,t,n,r)}function Mt(e){return e instanceof ut||(e=Ct(e)),e?new Et((e=e.rgb()).r,e.g,e.b,e.opacity):new Et}function Et(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function It(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function At(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tt(e,t,n,r)}function Ot(e){if(e instanceof Tt)return new Tt(e.h,e.s,e.l,e.opacity);if(e instanceof ut||(e=Ct(e)),!e)return new Tt;if(e instanceof Tt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Tt(a,s,l,e.opacity)}function Tt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function jt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}st(ut,Ct,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),st(Et,(function(e,t,n,r){return 1===arguments.length?Mt(e):new Et(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+It(this.r)+It(this.g)+It(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),st(Tt,(function(e,t,n,r){return 1===arguments.length?Ot(e):new Tt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Tt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Tt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Et(jt(e>=240?e-240:e+120,o,r),jt(e,o,r),jt(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var kt=Math.PI/180,Lt=180/Math.PI,Nt=4/29,Pt=6/29,Rt=3*Pt*Pt;function Ft(e){if(e instanceof Vt)return new Vt(e.l,e.a,e.b,e.opacity);if(e instanceof Wt){if(isNaN(e.h))return new Vt(e.l,0,0,e.opacity);var t=e.h*kt;return new Vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Et||(e=Mt(e));var n,r,o=Ut(e.r),i=Ut(e.g),a=Ut(e.b),s=Ht((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Ht((.4360747*o+.3850649*i+.1430804*a)/.96422),r=Ht((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Vt(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Vt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ht(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rt+Nt}function _t(e){return e>Pt?e*e*e:Rt*(e-Nt)}function zt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ut(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bt(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(e instanceof Vt||(e=Ft(e)),0===e.a&&0===e.b)return new Wt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Lt;return new Wt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Wt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}st(Vt,(function(e,t,n,r){return 1===arguments.length?Ft(e):new Vt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Vt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Et(zt(3.1338561*(t=.96422*_t(t))-1.6168667*(e=1*_t(e))-.4906146*(n=.82521*_t(n))),zt(-.9787684*t+1.9161415*e+.033454*n),zt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),st(Wt,(function(e,t,n,r){return 1===arguments.length?Bt(e):new Wt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return new Wt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Wt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ft(this).rgb()}}));var $t=-.29227,Yt=-.90649,Kt=1.97294,Jt=Kt*Yt,Gt=1.78277*Kt,Zt=-.6557636667999999;function Xt(e){if(e instanceof Qt)return new Qt(e.h,e.s,e.l,e.opacity);e instanceof Et||(e=Mt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Zt*r+Jt*t-Gt*n)/(Zt+Jt-Gt),i=r-o,a=(Kt*(n-o)-$t*i)/Yt,s=Math.sqrt(a*a+i*i)/(Kt*o*(1-o)),l=s?Math.atan2(a,i)*Lt-120:NaN;return new Qt(l<0?l+360:l,s,o,e.opacity)}function Qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function en(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}st(Qt,(function(e,t,n,r){return 1===arguments.length?Xt(e):new Qt(e,t,n,null==r?1:r)}),lt(ut,{brighter:function(e){return e=null==e?ct:Math.pow(ct,e),new Qt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Qt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*kt,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Et(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*($t*r+Yt*o)),255*(t+n*(Kt*r)),this.opacity)}}));var tn,nn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rn(e){return new on(e)}function on(e){if(!(t=nn.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function an(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}rn.prototype=on.prototype,on.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var sn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return an(100*e,t)},r:an,s:function(e,t){var n=en(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(tn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+en(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ln(e){return e}var un=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):ln,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):ln,s=e.percent||"%";function l(e){var t=(e=rn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):sn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=sn[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?un[8+tn/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=r(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=r(w+e,w.length?p-q.length:1/0),w=""),n){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=rn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=en(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=un[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){cn(e)}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var pn=new Date,dn=new Date;function fn(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return fn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return pn.setTime(+t),dn.setTime(+r),e(pn),e(dn),Math.floor(n(pn,dn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var mn=fn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));mn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?fn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):mn:null};fn((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),fn((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),fn((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}));var hn=fn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function gn(e){return fn((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var yn=gn(0),vn=gn(1);gn(2),gn(3);var bn=gn(4);gn(5),gn(6),fn((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var xn=fn((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},fn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),fn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}));var qn=fn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Dn(e){return fn((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Cn=Dn(0),wn=Dn(1);Dn(2),Dn(3);var Sn=Dn(4);Dn(5),Dn(6),fn((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));var Mn=fn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function En(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function In(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 An(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?fn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var On,Tn,jn,kn={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,Nn=/^%/,Pn=/[\\^$*+?|[\]().{}]/g;function Rn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function Fn(e){return e.replace(Pn,"\\$&")}function Vn(e){return new RegExp("^(?:"+e.map(Fn).join("|")+")","i")}function Hn(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function _n(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Un(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=Ln.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Kn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zn(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qn(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function er(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tr(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nr(e,t,n){var r=Ln.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rr(e,t,n){var r=Nn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function or(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ir(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function ar(e,t){return Rn(e.getDate(),t,2)}function sr(e,t){return Rn(e.getHours(),t,2)}function lr(e,t){return Rn(e.getHours()%12||12,t,2)}function ur(e,t){return Rn(1+hn.count(xn(e),e),t,3)}function cr(e,t){return Rn(e.getMilliseconds(),t,3)}function pr(e,t){return cr(e,t)+"000"}function dr(e,t){return Rn(e.getMonth()+1,t,2)}function fr(e,t){return Rn(e.getMinutes(),t,2)}function mr(e,t){return Rn(e.getSeconds(),t,2)}function hr(e){var t=e.getDay();return 0===t?7:t}function gr(e,t){return Rn(yn.count(xn(e),e),t,2)}function yr(e,t){var n=e.getDay();return e=n>=4||0===n?bn(e):bn.ceil(e),Rn(bn.count(xn(e),e)+(4===xn(e).getDay()),t,2)}function vr(e){return e.getDay()}function br(e,t){return Rn(vn.count(xn(e),e),t,2)}function xr(e,t){return Rn(e.getFullYear()%100,t,2)}function qr(e,t){return Rn(e.getFullYear()%1e4,t,4)}function Dr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Rn(t/60|0,"0",2)+Rn(t%60,"0",2)}function Cr(e,t){return Rn(e.getUTCDate(),t,2)}function wr(e,t){return Rn(e.getUTCHours(),t,2)}function Sr(e,t){return Rn(e.getUTCHours()%12||12,t,2)}function Mr(e,t){return Rn(1+qn.count(Mn(e),e),t,3)}function Er(e,t){return Rn(e.getUTCMilliseconds(),t,3)}function Ir(e,t){return Er(e,t)+"000"}function Ar(e,t){return Rn(e.getUTCMonth()+1,t,2)}function Or(e,t){return Rn(e.getUTCMinutes(),t,2)}function Tr(e,t){return Rn(e.getUTCSeconds(),t,2)}function jr(e){var t=e.getUTCDay();return 0===t?7:t}function kr(e,t){return Rn(Cn.count(Mn(e),e),t,2)}function Lr(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Sn(e):Sn.ceil(e),Rn(Sn.count(Mn(e),e)+(4===Mn(e).getUTCDay()),t,2)}function Nr(e){return e.getUTCDay()}function Pr(e,t){return Rn(wn.count(Mn(e),e),t,2)}function Rr(e,t){return Rn(e.getUTCFullYear()%100,t,2)}function Fr(e,t){return Rn(e.getUTCFullYear()%1e4,t,4)}function Vr(){return"+0000"}function Hr(){return"%"}function _r(e){return+e}function zr(e){return Math.floor(+e/1e3)}!function(e){On=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Vn(o),c=Hn(o),p=Vn(i),d=Hn(i),f=Vn(a),m=Hn(a),h=Vn(s),g=Hn(s),y=Vn(l),v=Hn(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:ar,e:ar,f:pr,H:sr,I:lr,j:ur,L:cr,m:dr,M:fr,p:function(e){return o[+(e.getHours()>=12)]},Q:_r,s:zr,S:mr,u:hr,U:gr,V:yr,w:vr,W:br,x:null,X:null,y:xr,Y:qr,Z:Dr,"%":Hr},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Cr,e:Cr,f:Ir,H:wr,I:Sr,j:Mr,L:Er,m:Ar,M:Or,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:_r,s:zr,S:Tr,u:jr,U:kr,V:Lr,w:Nr,W:Pr,x:null,X:null,y:Rr,Y:Fr,Z:Vr,"%":Hr},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:Gn,e:Gn,f:nr,H:Xn,I:Xn,j:Zn,L:tr,m:Jn,M:Qn,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:or,s:ir,S:er,u:zn,U:Un,V:Bn,w:_n,W:Wn,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Yn,Y:$n,Z:Kn,"%":rr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=kn[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=An(1900);if(w(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=In(An(i.y))).getUTCDay(),r=o>4||0===o?wn.ceil(r):wn(r),r=qn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(An(i.y))).getDay(),r=o>4||0===o?vn.ceil(r):vn(r),r=hn.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?In(An(i.y)).getUTCDay():t(An(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,In(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in kn?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=D(n,b),b.X=D(r,b),b.c=D(t,b),x.x=D(n,x),x.X=D(r,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",En);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,In);return t.toString=function(){return e},t}}}(e),Tn=On.utcFormat,jn=On.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||Tn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||jn("%Y-%m-%dT%H:%M:%S.%LZ");const Ur=K.bind(null,!0),Br={},{isArray:Wr}=Array;function $r(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Yr(e){return void 0===e}function Kr(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jr(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Yr(e[r||t])?i:e[t],e=e[r||t]})),e}function Gr(e,t){let n=!0;if($r(e)&&$r(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Gr(e[r],t[r])||(n=!1)})),n);if(Wr(e)&&Wr(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Gr(e[n],t[n]))return!1;return!0}return e===t}Br.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ur({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;Gr(i,a)||Kr(t,o)||(Yr(a)?r.push({op:"add",path:s,value:i}):$r(i)&&$r(a)?r=r.concat(Br.generate(a,i,s)):Wr(i)&&Wr(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Yr(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Gr(t,o))return r;if(!Yr(t[0])&&Yr(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Br.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{Yr(t[o])&&!Kr(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Br.apply=function(e,t){t.forEach((t=>{let n=Jr(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Wr(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Wr(o)&&Wr(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($r(o)&&$r(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Kr(a,e)&&delete a[e]})),Ur(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Jr(e,t.from);Wr(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Wr(n)?n.splice(+r,1):delete n[r]);var a}))},Br.clone=function(e){return Ur({},e)},Br.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Br.updateObject=function(e,t){Object.keys(e).length?Br.apply(e,Br.generate(e,t)):Ur(e,t)};const Zr=[[2,4,6],[2,4],[3]],Xr=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Qr(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function eo(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Qr(e[r],t,n)}!function(){let e,t;for(eo(Zr,1,10),e=0;e<Xr.length;e++)if(Xr[e])for(t=0;t<Xr[e].length;t++)Array.isArray(Xr[e][t])&&eo(Xr[e][t])}();var to={exports:{}};function no(){}function ro(){}ro.resetWarningCache=no;to.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ro,resetWarningCache:no};return n.PropTypes=n,n}();var oo=to.exports;function io(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ao({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:io(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}const so={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},lo={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},uo="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",co={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},po={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function fo(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Br.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function mo(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=K(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),fo(e,a,s)}))}function ho({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){mo(r,e,t,"qDimensions",a)}}}function go(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function yo({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){mo(o,e,t,"qMeasures",i,a)}}}function vo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const bo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},xo=({children:e,...t})=>o.createElement(i,P({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function qo(){function e({title:e,selected:t,onClick:n}){const r=se.detectTextDirection(e);return o.createElement(l,{button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(ao,{d:t?uo:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:p}){const d=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,P({anchorEl:t,open:p,onClose:c},bo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),d))}e.propTypes={title:oo.string.isRequired,selected:oo.bool,onClick:oo.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:oo.any,changeTo:oo.func.isRequired,current:oo.string.isRequired,dir:oo.string.isRequired,dock:oo.string.isRequired,list:oo.array,onClose:oo.func.isRequired,show:oo.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>o.createElement(xo,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(p-n),title:t},o.createElement("span",{style:c},t),o.createElement(ao,P({},po,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=se.detectTextDirection(e.text),v=o.createElement(xo,{style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(ao,P({},lo,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(ao,P({},co,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(ao,P({},so,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&ne(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:oo.bool.isRequired,padding:oo.string,minWidth:oo.string,titleData:oo.shape({breadcrumbs:oo.arrayOf(oo.string).isRequired,drilldown:oo.bool.isRequired,index:oo.number.isRequired,locked:oo.bool.isRequired,text:oo.string.isRequired,popoverText:oo.string.isRequired,drillUp:oo.func}).isRequired,popover:oo.shape({dir:oo.string.isRequired,dock:oo.string.isRequired,changeTo:oo.func.isRequired,getAlternatives:oo.func.isRequired}),translator:oo.shape({get:oo.func.isRequired}).isRequired,selections:oo.shape({isActive:oo.func,addListener:oo.func,removeListener:oo.func}),style:oo.shape({fontSize:oo.string,color:oo.string,fontFamily:oo.string}).isRequired,isDimension:oo.bool.isRequired,hasAlternative:oo.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?ho:yo,S=u?go:vo,M=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&ne(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const A=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,p),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},A)}}}function Do(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Co(e){if(e.type)return e;if("#"===e.charAt(0))return Co(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function wo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function So(e){var t="hsl"===(e=Co(e)).type?Co(function(e){var t=(e=Co(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),wo({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eo(){return(Eo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Io(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ao(){return(Ao=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oo(e){return(Oo="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 To(e){return(To="function"==typeof Symbol&&"symbol"===Oo(Symbol.iterator)?function(e){return Oo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Oo(e)})(e)}function jo(e){return e&&"object"===To(e)&&!Array.isArray(e)}function ko(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Ao({},e):e;return jo(e)&&jo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(jo(t[o])&&o in e?r[o]=ko(e[o],t[o],n):r[o]=t[o])})),r}var Lo=["xs","sm","md","lg","xl"];function No(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Io(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=Lo.indexOf(t)+1;return r===Lo.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[Lo[r]]-a/100).concat(o,")")}return Eo({keys:Lo,values:n,up:l,down:function(e){var t=Lo.indexOf(e)+1,r=n[Lo[t]];return t===Lo.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Po(e,t,n){var r;return Eo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo({paddingLeft:t(2),paddingRight:t(2)},n,Mo({},e.up("sm"),Eo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Mo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Mo(r,e.up("sm"),{minHeight:64}),r)},n)}var Ro={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"},Fo={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"},Vo={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"},Ho={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"},_o={black:"#000",white:"#fff"},zo={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:_o.white,default:Vo[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Uo={text:{primary:_o.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:Vo[800],default:"#303030"},action:{active:_o.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Bo(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return wo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Co(e),t=Do(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return wo(e)}(e.main,1.5*r)))}function Wo(e){var t=e.primary,n=void 0===t?{light:Ro[300],main:Ro[500],dark:Ro[700]}:t,r=e.secondary,o=void 0===r?{light:Fo.A200,main:Fo.A400,dark:Fo.A700}:r,i=e.error,a=void 0===i?{light:Ho[300],main:Ho[500],dark:Ho[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=Io(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=So(e),r=So(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Uo.text.primary)>=c?Uo.text.primary:zo.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Eo({},e)).main&&e[t]&&(e.main=e[t]),Bo(e,"light",n,d),Bo(e,"dark",r,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Uo,light:zo};return ko(Eo({common:_o,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Vo,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function $o(e){return Math.round(1e5*e)/1e5}var Yo={textTransform:"uppercase"};function Ko(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,p=n.fontWeightMedium,d=void 0===p?500:p,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Io(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,n,r,i){return Eo({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat($o(r/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,Yo),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Yo)};return ko(Eo({htmlFontSize:g,pxToRem:q,round:$o,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Jo(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Go=["none",Jo(0,2,1,-1,0,1,1,0,0,1,3,0),Jo(0,3,1,-2,0,2,2,0,0,1,5,0),Jo(0,3,3,-2,0,3,4,0,0,1,8,0),Jo(0,2,4,-1,0,4,5,0,0,1,10,0),Jo(0,3,5,-1,0,5,8,0,0,1,14,0),Jo(0,3,5,-1,0,6,10,0,0,1,18,0),Jo(0,4,5,-2,0,7,10,1,0,2,16,1),Jo(0,5,5,-3,0,8,10,1,0,3,14,2),Jo(0,5,6,-3,0,9,12,1,0,3,16,2),Jo(0,6,6,-3,0,10,14,1,0,4,18,3),Jo(0,6,7,-4,0,11,15,1,0,4,20,3),Jo(0,7,8,-4,0,12,17,2,0,5,22,4),Jo(0,7,8,-4,0,13,19,2,0,5,24,4),Jo(0,7,9,-4,0,14,21,2,0,5,26,4),Jo(0,8,9,-5,0,15,22,2,0,6,28,5),Jo(0,8,10,-5,0,16,24,2,0,6,30,5),Jo(0,8,11,-5,0,17,26,2,0,6,32,5),Jo(0,9,11,-5,0,18,28,2,0,7,34,6),Jo(0,9,12,-6,0,19,29,2,0,7,36,6),Jo(0,10,13,-6,0,20,31,3,0,8,38,7),Jo(0,10,13,-6,0,21,33,3,0,8,40,7),Jo(0,10,14,-6,0,22,35,3,0,8,42,7),Jo(0,11,14,-7,0,23,36,3,0,9,44,8),Jo(0,11,15,-7,0,24,38,3,0,9,46,8)],Zo={borderRadius:4};function Xo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Qo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ei={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},ti=function(e){return"".concat(Math.round(e),"ms")},ni={easing:Qo,duration:ei,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?ei.standard:n,o=t.easing,i=void 0===o?Qo.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Io(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ti(r)," ").concat(i," ").concat("string"==typeof s?s:ti(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ri={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Io(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Wo(a),f=No(n),m=Xo(l),h=Eo({breakpoints:f,direction:"ltr",mixins:Po(f,m,o),overrides:{},palette:d,props:{},shadows:s||Go,typography:Ko(d,c),spacing:m},ko({shape:Zo,transitions:ni,zIndex:ri},p));return h}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const ii=d({productionPrefix:"q1277",disableGlobal:!0,seed:""});function ai(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(f,{generateClassName:t},o.createElement(m,{theme:oi},e))}(e,ii),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&p.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(p.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function si(){return function(e){e.renderer("react",ai()),e.component("data-title",qo()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:oo.string.isRequired,spanStyle:oo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:a,dir:i},o.createElement(o.Fragment,null,o.createElement(e,{label:s,spanStyle:l})))}}}())}}function li(e){return Qe(e).l<70}function ui(e,t){const n=Qe(e).l/100,r=Qe(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ci(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var pi={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(ui(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ci({r:s,a:e},n),i=ci({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:li(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function di(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function fi(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:di(s)}}var mi={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=fi({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function hi(e){return(hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gi(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function yi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){gi(i,r,o,a,s,"next",e)}function s(e){gi(i,r,o,a,s,"throw",e)}a(void 0)}))}}function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(n),!0).forEach((function(t){vi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qi(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Di(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||wi(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(e){return function(e){if(Array.isArray(e))return Si(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wi(e,t){if(e){if("string"==typeof e)return Si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Si(e,t):void 0}}function Si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mi=Object.prototype.hasOwnProperty,Ei=Object.prototype.toString,Ii=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,Oi=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ei.call(e)},Ti=function(e){if(!e||"[object Object]"!==Ei.call(e))return!1;var t,n=Mi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mi.call(e,t)},ji=function(e,t){Ii&&"__proto__"===t.name?Ii(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ki=function(e,t){if("__proto__"===t){if(!Mi.call(e,t))return;if(Ai)return Ai(e,t).value}return e[t]},Li=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=ki(s,n),s!==(o=ki(t,n))&&(c&&o&&(Ti(o)||(i=Oi(o)))?(i?(i=!1,a=r&&Oi(r)?r:[]):a=r&&Ti(r)?r:{},ji(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&ji(s,{name:n,newValue:o}));return s};function Ni(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Pi(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function Ri(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Fi(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Vi(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Hi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zi(){}var Ui=1/.7,Bi="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",$i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yi=/^#([0-9a-f]{3,8})$/,Ki=new RegExp("^rgb\\("+[Bi,Bi,Bi]+"\\)$"),Ji=new RegExp("^rgb\\("+[$i,$i,$i]+"\\)$"),Gi=new RegExp("^rgba\\("+[Bi,Bi,Bi,Wi]+"\\)$"),Zi=new RegExp("^rgba\\("+[$i,$i,$i,Wi]+"\\)$"),Xi=new RegExp("^hsl\\("+[Wi,$i,$i]+"\\)$"),Qi=new RegExp("^hsla\\("+[Wi,$i,$i,Wi]+"\\)$"),ea={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ta(){return this.rgb().formatHex()}function na(){return this.rgb().formatRgb()}function ra(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?oa(t):3===n?new la(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ia(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ia(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ki.exec(e))?new la(t[1],t[2],t[3],1):(t=Ji.exec(e))?new la(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Gi.exec(e))?ia(t[1],t[2],t[3],t[4]):(t=Zi.exec(e))?ia(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xi.exec(e))?da(t[1],t[2]/100,t[3]/100,1):(t=Qi.exec(e))?da(t[1],t[2]/100,t[3]/100,t[4]):ea.hasOwnProperty(e)?oa(ea[e]):"transparent"===e?new la(NaN,NaN,NaN,0):null}function oa(e){return new la(e>>16&255,e>>8&255,255&e,1)}function ia(e,t,n,r){return r<=0&&(e=t=n=NaN),new la(e,t,n,r)}function aa(e){return e instanceof zi||(e=ra(e)),e?new la((e=e.rgb()).r,e.g,e.b,e.opacity):new la}function sa(e,t,n,r){return 1===arguments.length?aa(e):new la(e,t,n,null==r?1:r)}function la(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ua(){return"#"+pa(this.r)+pa(this.g)+pa(this.b)}function ca(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function pa(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function da(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ma(e,t,n,r)}function fa(e){if(e instanceof ma)return new ma(e.h,e.s,e.l,e.opacity);if(e instanceof zi||(e=ra(e)),!e)return new ma;if(e instanceof ma)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ma(a,s,l,e.opacity)}function ma(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ha(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Hi(zi,ra,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ta,formatHex:ta,formatHsl:function(){return fa(this).formatHsl()},formatRgb:na,toString:na}),Hi(la,sa,_i(zi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ua,formatHex:ua,formatRgb:ca,toString:ca})),Hi(ma,(function(e,t,n,r){return 1===arguments.length?fa(e):new ma(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return e=null==e?Ui:Math.pow(Ui,e),new ma(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ma(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new la(ha(e>=240?e-240:e+120,o,r),ha(e,o,r),ha(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ga=Math.PI/180,ya=180/Math.PI,va=4/29,ba=6/29,xa=3*ba*ba;function qa(e){if(e instanceof Da)return new Da(e.l,e.a,e.b,e.opacity);if(e instanceof Ia)return Aa(e);e instanceof la||(e=aa(e));var t,n,r=Ma(e.r),o=Ma(e.g),i=Ma(e.b),a=Ca((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ca((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ca((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Da(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Da(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ca(e){return e>.008856451679035631?Math.pow(e,1/3):e/xa+va}function wa(e){return e>ba?e*e*e:xa*(e-va)}function Sa(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ma(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ea(e){if(e instanceof Ia)return new Ia(e.h,e.c,e.l,e.opacity);if(e instanceof Da||(e=qa(e)),0===e.a&&0===e.b)return new Ia(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ya;return new Ia(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ia(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Aa(e){if(isNaN(e.h))return new Da(e.l,0,0,e.opacity);var t=e.h*ga;return new Da(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Oa(e){return function(){return e}}function Ta(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Oa(isNaN(e)?t:e)}Hi(Da,(function(e,t,n,r){return 1===arguments.length?qa(e):new Da(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return new Da(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Da(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new la(Sa(3.1338561*(t=.96422*wa(t))-1.6168667*(e=1*wa(e))-.4906146*(n=.82521*wa(n))),Sa(-.9787684*t+1.9161415*e+.033454*n),Sa(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Hi(Ia,(function(e,t,n,r){return 1===arguments.length?Ea(e):new Ia(e,t,n,null==r?1:r)}),_i(zi,{brighter:function(e){return new Ia(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Ia(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Aa(this).rgb()}}));var ja=function e(t){var n=function(e){return 1==(e=+e)?Ta:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Oa(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=sa(e)).r,(t=sa(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Ta(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),ka=/^class(-pyramid)?/,La=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(Ci(c))),i=Math.max.apply(Math,[i].concat(Ci(c))),u.min=o,u.max=i,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=ja(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 Na(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=r||l>=o?Math.max(l,r):Na(e,t,n,r+1,o)}var Pa=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=n.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,Ci(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,Ci(c)),u.max=Math.max.apply(Math,Ci(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=d&&ka.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,Ci(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?Na(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Ra(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function Fa(e){var t,n=e.cm,r=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),xi(xi({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return xi(xi({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Va(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ha(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function _a(e,t,n,r){var o,i=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ra:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Pa(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Li(u,La(e,p.gradient,u,c))}else u.auxiliary=s;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.getCDef,i=void 0===o?Fi:o,a=r.getCByField,s=void 0===a?Vi:a,l=r.getPersistence,u=void 0===l?Ri:l,c=i(t,n),p=s(n,c),d=p?p.raw():{},f=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&p&&(m.label=p.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Li(m,u(t,n,c,p,{byRow:Pi,byElemNo:Ni})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Pa(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return Fa({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Va(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Ha(e.measureOverrides,e.explicit),Va(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==i?void 0:i.get("Common.Measures")};return a.explicit=Ha(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function za(e){var t=xi({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Li(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Li(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Li(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var i=n.pic.field(e.field);return La(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=xi({},e);Li(a,Ni(i,i.raw().qCardinal));var s=o.theme?o.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Li(a,Ni(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Li(a,Ni(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=xi(xi({},e),r.getDataColorSpecials())),n.settings=Li(e,_a(this,n,t,e))}return n.settings}};return o}var Ua=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Ba=function(e){throw e.isHandled=!0,e},Wa=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},$a=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},Ya=function(e,t){var n=t.layout,r=t.model,o=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ba):Promise.reject()};function Ka(e){var t=e.hc,n=e.source,r=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Ja(e){return function(t){return"object"===hi(t.datum[e])?t.datum[e].value:void 0}}function Ga(e){return"object"===hi(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Za(e){return-3===e.datum.value}var Xa=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},Qa=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function es(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Xa(i,r,o)},show:"function"==typeof i.show?function(){return Qa(i,l,a)}:Qa(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function ts(e,t,n){var r=[],o=[],i=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=es(e,t);if(!r.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},m="".concat(c,"Legend");return Li(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:m in d?m:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:f[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=es(e,t);return!!u.show&&Li(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var i=n.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},vi(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),vi(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),vi(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var ns=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function rs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=za(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return Wa(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return $a(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return Ya(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=Ua,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=xi({},o),r={},!n.key)throw new Error("Missing key");t.set(xi(xi({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=xi(xi({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=o().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(o(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(Ci(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(Ci((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(Ci((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,p=Ka({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,c&&(s["".concat(l,"Legend")]=xi(xi({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Li({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Li({},h,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,o=Ja(r),i=Ja("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return Za(e)||i(e)?u:l}:n[t]?function(e){return Za(e)?u:Ga(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Za(e)||i(e)?u:Ga(e)?l:c}:"color"===p?function(e){return Za(e)||i(e)?u:Ga(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Ja("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?ns(e.qNum):e.qText&&ra(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var p=vi({},u,n);return r.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return ts({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var os=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function is(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(os),i=r.some(os),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function as(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=xi(xi(xi({},e),t),{},{colorProps:xi(xi({},e.colorProps),t.colorProps||{})});return n}var ss=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ls(e){var t,n=e.qHyperCube.qDimensionInfo.some(ss),r=e.qHyperCube.qMeasureInfo.some(ss),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var us=function(){};function cs(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function ps(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function ds(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function fs(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function ms(e){return(ms="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 hs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ys(e,t,n){return t&&gs(e.prototype,t),n&&gs(e,n),e}function vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(n),!0).forEach((function(t){vs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qs(e,t){return(qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ds(){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 Cs(e,t,n){return(Cs=Ds()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&qs(o,n.prototype),o}).apply(null,arguments)}function ws(e){return function(e){if(Array.isArray(e))return Ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ss(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 Ss(e,t){if(e){if("string"==typeof e)return Ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ms(e,t):void 0}}function Ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Es=Object.prototype.hasOwnProperty,Is=Object.prototype.toString,As=Object.defineProperty,Os=Object.getOwnPropertyDescriptor,Ts=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Is.call(e)},js=function(e){if(!e||"[object Object]"!==Is.call(e))return!1;var t,n=Es.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Es.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Es.call(e,t)},ks=function(e,t){As&&"__proto__"===t.name?As(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ls=function(e,t){if("__proto__"===t){if(!Es.call(e,t))return;if(Os)return Os(e,t).value}return e[t]},Ns=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Ls(s,n),s!==(o=Ls(t,n))&&(c&&o&&(js(o)||(i=Ts(o)))?(i?(i=!1,a=r&&Ts(r)?r:[]):a=r&&js(r)?r:{},ks(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&ks(s,{name:n,newValue:o}));return s};function Ps(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Rs(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function Fs(e){var t=e.cache,n=e.f,r=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=r;if(o.field&&o.field!==n){var d=Ps(o.field,i,{cache:t});if(-1===d)return;p=Ns({qRow:a},d(s))}u[c]=Rs(o,p,{key:l})}function Vs(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===ms(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=ms(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Ps(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=Ns({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Rs(d,C,{key:l});if(!d.filter||d.filter(C)){for(var S=0;S<f.length;S++){var M=p[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var I=0;I<E.length;I++)Fs({cache:n,f:u,mainCell:C,p:E[I],prop:f[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?I:f[S]});if(M.fields){var A=w[f[S]].map((function(e){return e.value})),O=w[f[S]].map((function(e){return e.label}));w[f[S]]={value:"function"==typeof M.value?M.value(A):void 0!==M.value?M.value:A,label:"function"==typeof M.label?M.label(O):void 0!==M.label?String(M.label):String(w[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,ws(r.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Hs(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function _s(e,t){var n,r,o,i,a,s=new Ws(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=zs);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new Ws(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bs)}function zs(e){return e.children}function Us(e){e.data=e.data.data}function Bs(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ws(e){this.data=e,this.depth=this.height=0,this.parent=null}function $s(e){if("function"!=typeof e)throw new Error;return e}Ws.prototype=_s.prototype={constructor:Ws,count:function(){return this.eachAfter(Hs)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return _s(this).eachBefore(Us)}};var Ys={depth:-1},Ks={};function Js(e){return e.id}function Gs(e){return e.parentId}function Zs(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Zs(n,o[s]);Array.isArray(l)?a.push.apply(a,ws(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Zs(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Xs(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,ws(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,ws(Xs(e[i].children,t-1,n)));return r}function Qs(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=ws(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Xs(e.children,i-1,n)}}return!1}function el(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var tl=/^qDimensionInfo(?:\/(\d+))?/,nl=/^\/?qMeasureInfo\/(\d+)/,rl=/\/qAttrExprInfo\/(\d+)/,ol=/\/qAttrDimInfo\/(\d+)/;function il(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 al(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,p=n.qEffectiveInterColumnSortOrder,d=il(n);return tl.test(c)&&(o=!0,i=+tl.exec(c)[1],c=r.replace(tl,"")),nl.test(c)&&("K"===n.qMode?l=+nl.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+nl.exec(c)[1],u=0):u=+nl.exec(c)[1],c=c.replace(nl,"")),c&&(ol.exec(c)?s=+ol.exec(c)[1]:rl.exec(c)&&(a=+rl.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function sl(e,t){var n,r,o=Qs(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function ll(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function ul(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var n=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(p,r):p})}}var cl=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Zs(r,e);return i&&i[0]?(t.tree=_s(i[0],n.children||function(e){return e[o]}),t.tree):null};function pl(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=xs({__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=Js,t=Gs;function n(n){var r,o,i,a,s,l,u,c=n.length,p=new Array(c),d={};for(o=0;o<c;++o)r=n[o],s=p[o]=new Ws(r),null!=(l=e(r,o,n))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?Ks:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===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=Ys,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Bs),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=$s(t),n):e},n.parentId=function(e){return arguments.length?(t=$s(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var dl=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=sl(i,al(p.field,{cube:r,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function fl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t.raw(),i=t.key(),a="S"===o.qMode?pl(t):cl(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=il(o),d=p[u-1];c=n.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(xs(xs({},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?al(c,{cube:o,cache:n}):{fieldDepth:0};dl({propsArr:y,props:h,cube:o,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,S=l[q[D].depth].main,M=x[D],E=M.data,I=ll(S,E,{key:i});ul({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function ml(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!cl(s,n,e))continue;var u="object"===ms(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=al(u,{cube:s,cache:n}),h=sl({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;dl({propsArr:f,props:p,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=ms(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!d.filter||d.filter(E)){var I=ll(d,E,{key:l});ul({propsArr:f,props:p,item:M,itemData:E,ret:I,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,ws(r.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var hl,gl=(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 n,r,o,i,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(hl={exports:{}}),hl.exports);function yl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var vl={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"},bl=/%$/,xl=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,ql=/^\(oct\)/i,Dl=/^\(dec\)/i,Cl=/^\(hex\)/i,wl=/^\(bin\)/i,Sl=/^\(rom\)/i,Ml=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,El=/#|0/g;function Il(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Al(e,t,n){var r=yl(e);return n?r:new RegExp(r||"",t)}function Ol(e,t,n){var r,o,i,a,s,l,u,c,p,d,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(f=n)&&(f=yl(f)),d&&(d=yl(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(p))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===n&&(o=(r=i.split(n)).pop(),i=r.join("")+n+o,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(i=i.replace(Al(l,"g"),t)),u=n,n=".",u&&(i=i.replace(Al(u,"g"),n)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(El)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=bl.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Al(t,null,!0),"|").concat(Al(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Tl=function(){function e(t,n,r,o,i){hs(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return vl;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return ys(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Ml.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Ml.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Ml.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Ol(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Ol(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Ol(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,o,i,a,s,l,u,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return xl.test(t)?e=Il(e,Number(/\d{2}/.exec(t)[0]),t,n):ql.test(t)?e=Il(e,8,t,n):Dl.test(t)?e=Il(e,10,t,n):Cl.test(t)?e=Il(e,16,t,n):wl.test(t)?e=Il(e,2,t,n):Sl.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,i);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=gl(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=i+D)}else 0===v&&(o=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=gl(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 jl(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?5e3:o,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=i&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function kl(e,t,n,r,o){var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Cs(Tl,t)}(o,e,t,n,r),a=jl(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var Ll=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Nl=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pl=["January","February","March","April","May","June","July","August","September","October","November","December"],Rl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fl(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Vl(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Hl=function(){function e(t,n,r){hs(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Ll,qDayNames:Nl,qLongMonthNames:Pl,qMonthNames:Rl}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),n||(n=(vs(o={},"T",i.qTimeFmt||"hh:mm:ss"),vs(o,"D",i.qDateFmt||"YYYY-MM-DD"),vs(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return ys(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(r=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:i,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Vl(t),r=60*Vl(n),o=60*Vl(r),i=1e3*Vl(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Fl("".concat(t.year).slice(-2),2),YYY:Fl("".concat(t.year).slice(-3),3),def:function(e){return Fl("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Fl("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Fl("".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 Fl("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Fl("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Fl("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Fl("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var o=0;o<r;o++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var p=new RegExp(u.join("|"),"g");return t.replace(p,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in l[n])if(o===e||o.toLowerCase()===e){void 0===(r=l[n][o])&&(r=l[n][o.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function _l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Cs(Hl,t)}function zl(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Ul(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=_l(n,e,t),o=jl(r.format.bind(r),{toKey:function(e){return"object"===ms(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?zl(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),r.format(t,e)},a.locale=function(n){return r=_l(n,e,t),o=jl(r.format.bind(r),{toKey:function(e){return"object"===ms(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Bl(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ul(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##A"),i="U"),kl(n,r,o,i,t)}function Wl(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,o=t.key,i=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},d="dimension"===l?"first":"avg",f=Bl(n,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return r},key:function(){return o},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:p,reduce:d,reduceLabel:m,formatter:function(){return f},tags:function(){return n.qTags}};return h}function $l(e,t,n,r,o){return(t[e]||[]).map((function(t,i){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:Wl(Ns({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=$l("qAttrDimInfo",t,n,a,Ns({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=$l("qAttrExprInfo",t,n,a,Ns({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=$l("qMeasureInfo",t,n,a,Ns({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function Yl(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.key,i=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=i;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=Yl.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 el(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=ml,p.hierarchy=fl,p.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(p.extractor=Vs,p.pages=u.qDataPages,p.hierarchy=fl):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,ws($l("qDimensionInfo",u,o,"",Ns({},p,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,ws($l("qMeasureInfo",u,o,"",Ns({},p,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=Wl(xs({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},d,l,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,ws(l.virtualFields)),d}var Kl=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Jl=/\/qDimensionInfo(?:\/(\d+))?/,Gl=/\/qMeasureInfo\/(\d+)/,Zl=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Xl=/\/qAttrExprInfo\/(\d+)/,Ql=/\/?qHyperCube/,eu=/\/?qTreeData/,tu=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},nu=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function ru(e,t){var n=e,r=-1,o=-1,i="",a=function(e){return e};Ql.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=tu):eu.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=nu);var s=!0;if(Jl.test(e)&&(r=+Jl.exec(e)[1]),Gl.test(e)&&(o=+Gl.exec(e)[1]),Zl.test(e)){o=-1,r=0;var l=+Zl.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(Xl.test(e)){var u=o;if(t){o=0;var c=Zs(i,t);o+=(c.qMeasureInfo||[]).length,r>-1?(o=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),r=-1):(o=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),o=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o)),o+=+Xl.exec(n)[1]}else r>-1?(r=-1,o=+Xl.exec(n)[1]):o+=+Xl.exec(n)[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 n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Ss(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],o=t[1];n=n.replace(r,o)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}function ou(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=n.byCells,i=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=ru(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(o)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var p=r.qHyperCube,d=p.qNoOfLeftDims,f=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function iu(e){Yl.util=e.data("matrix").util,e.data("q",Yl),e.formatter("q-number",kl),e.formatter("q-time",Ul)}function au(e){var t=cs(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function su(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===hi(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function lu(e){var t=e.brush,n=e.colorField,r=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):i&&t.addKeyAlias(r,"qHyperCube/".concat(n))}iu.qBrushHelper=ou,iu.selections=ou;function uu(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),o=n(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,o,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==n.id&&0!==i.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,o=void 0===r?[]:r;if(null==o||!o.length)return[];var i=Array.from(new Set(o.map((function(e){return e.key})))),a=[];return i.forEach((function(e){var t=au({layout:n,path:e}),r=o.filter((function(t){return t.key===e})),i=t?[r.pop()]:r;a.push.apply(a,Ci(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),o=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||o.includes(n.id)&&o.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var cu=[],pu=0,du=function(e){var t=cu.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()})))},fu=function(){document.addEventListener("keyup",du)},mu=function(){document.removeEventListener("keyup",du)},hu=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},gu=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function yu(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var o=r[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function vu(e){var t=e.chart,n=e.document,r=e.selectionInfo,o=e.eventName,i=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=r.event===o,p=n.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!p)return!1;var d=t.component(i);return!!d&&(d.emit(u),"string"==typeof s&&t.brush(s).clear(),d)}function bu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"discreteRange":o,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return vu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function xu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"continuousRange":o,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return vu({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function qu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.componentName,i=void 0===o?"minor-range-brush":o,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,p=vu({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(p){var d=p.settings.settings,f=d.scale,m=d.brush,h=n.scale(f).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Du(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;vu({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function Cu(e){var t=e.chart,n=e.selectionInfo,r=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(n&&i.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function wu(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"legendRange":i,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,p=e.brushName;vu({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==p&&p})&&o.clear()}var Su=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=qi(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Mu(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Eu(e){var t,n=e.chart,r=e.selectionInfo,o=e.selectionActions,i=e.actions,a=void 0===i?{}:i,s=e.selections,l=e.selectionEvents;if(!1===o||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,p=o.reset,d=void 0===p?Mu:p,f=o.clear,m=!1!==f&&function(e){var t=e.clear,n=void 0===t?Su:t,r=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:o,chart:i,document:document,cleared:e};return n(xi({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bu(xi(xi({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xu(xi(xi({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qu(xi(xi({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Du(xi(xi({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cu(xi(xi({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return wu(xi(xi({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,o=e.clear,i=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),o({e:e,chart:t,document:document})},cleared:function(e){i||(i=!0,o({e:e,chart:t,document:document,cleared:!0}),i=!1)}};return!1===r&&delete a.deactivated,!1===o&&delete a.cleared,!1===r&&!1===o&&delete a.canceled,a}({chart:n,clear:m,reset:d,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:i,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(xi(xi({},void 0===t?{}:t),{},{event:r,components:i.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:o,chart:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(xi(xi({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:o},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=Di(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Iu=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Au(e){var t=e.chart,n=e.actions,r=e.selections,o=e.picassoQ,i=e.config,a=i.allowSimultaneous,s=void 0!==a&&a,l=i.majorScale,u=void 0===l?void 0:l,c=i.selectionActions,p=(c=void 0===c?{}:c).clear,d=c.reset,f=i.selectionEvents,m=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=i.brushEvents,g=void 0===h?{}:h,y=i.brushName,v=void 0===y?"selection":y,b=i.brushMaxListeners,x=void 0===b?20:b,q=i.brushRanges,D=void 0!==q&&q,C=i.interceptors,w=void 0===C?{}:C,S=i.selectionsFn,M=void 0===S?o.selections:S,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var I=!0===D?Iu:D;E.configure({ranges:I})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,o=t.majorScale,i=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++pu,c=null,p=[],d={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var f=uu({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=f.rangeInterceptor,h=f.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(l)}));var g={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};hu(n,g);var y=null==o||null===(e=o.max)||void 0===e?void 0:e.call(o);return null!=i&&i.select?(i.select.on("start",(function(){var e;r.start(),"function"==typeof i.select.getBrushOptions&&(d=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(r,d,c).forEach((function(e){yu(e,i.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,d,c).forEach((function(e){return n.select(e)}))})),0===cu.length&&fu(),cu.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=cu.indexOf(cu.filter((function(e){return e.key===u}))[0]);-1!==e&&cu.splice(e,1),cu.length||mu(),gu(n,g)}}}({brush:E,majorScale:u,actions:n,selections:r,picassoQ:o,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(r,e)}))}))}({brush:E,interceptors:w});var T=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=Di(e,2),i=o[0],a=o[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var n=Di(e,2),r=n[0],o=n[1];t.removeListener(r,o)}))}}({brush:r,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=Eu({chart:t,selectionInfo:i,selectionActions:n,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:p,reset:d},selectionEvents:m,brushEvents:g});if(s){var j=!0===s?Ci(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;O.allowSimultaneous(j)}return{unbindEvents:T,state:A,picassoSelections:O,brush:E}}function Ou(e){var t=e.chart,n=e.selections,r=e.actions,o=void 0!==r&&r,i=e.config,a=void 0===i?{}:i,s=Au({chart:t,actions:o,selections:n,picassoQ:iu,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?lu:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:su(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,o=e.selections,i=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=o&&null!==(t=o.isModal)&&void 0!==t&&t.call(o)&&o.confirm(),i.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return au({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,o=qi(e,["colorField","useLegendCube"]),i=xi({useLegendCube:r,colorField:t,brush:p,legendAlias:h},o);y(xi(xi({},i),{},{defaultFunc:function(){return lu(i)}}))},destroy:function(){l(),c.release()},custom:xi({},f)}}var Tu={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},ju="chart-modules-tooltip",ku="#".concat(ju);function Lu(){if(!document.querySelector(ku)){var e=document.createElement("div");e.id=ju,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 Nu(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Lu()},beforeUpdate:function(){Lu()},destroyed:function(){var e;null!=(e=document.querySelector(ku))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(ku)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Pu="position",Ru={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Fu=function(e){return e.data.value},Vu=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function Hu(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.collectConfig,i=e.collectibles,a=e.meta,s=o.from,l={chart:t,expando:n,nodes:r,collectConfig:o,collectibles:i,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=Di(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){return e.nodes}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0],i=n.filter,a="function"==typeof i?i:function(){return!0},s=n.by,l=void 0===s?Fu:s;return r.reduce((function(e,n){var r=n.major,i=void 0===r?Vu:r,a=Ru[n.type]||n.type;return e.push.apply(e,Ci(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&i({data:e.data})===l({data:o.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=Di(e.nodes,1)[0].localBounds,i=n.distance,a=n.filter,s="function"==typeof a?a:function(){return!0},l=r.map((function(e){return e.key})),u=Di(l,1)[0],c=t.component(u).rect,p=c.scaleRatio,d=c.computedInner,f=o.width*p.x,m=o.height*p.y,h=o.x*p.x+f/2+d.x,g=o.y*p.y+m/2+d.y,y=i||Math.max(f,m);return t.shapesAt({cx:h,cy:g,r:y},{components:l.map((function(e){return{key:e}}))}).filter(s)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:o})}(l);default:return[]}}var _u=Number.MAX_VALUE;function zu(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:_u,xMax:-_u,yMin:_u,yMax:-_u}),n=t.xMin,r=t.xMax,o=t.yMin;return{x:n,y:o,width:r-n,height:t.yMax-o}}function Uu(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.nodes;if(!i.length)return[];var a=Di(i,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},u=l.collect,c=l.placement;if(!u||!u.from||!c)return[];var p={triggerer:a,position:o.get(Pu)},d=(Hu({chart:t,expando:r,nodes:i,collectConfig:u,collectibles:s,meta:p})||[]).map((function(e){return e.children.length?e.children[0]:e}));return d.length?function(e){var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=Di(i,1)[0],u=Array.isArray(o)?o:[o],c={bounds:l.bounds,key:l.key},p=zu({nodes:a}),d=0;d<u.length;d++){var f=u[d];if("function"==typeof f){var m=f({chart:t,expando:r,hovered:i,collected:a,meta:s,collectedBounds:p,combineBounds:zu});if(m)return m}if("trigger"===f)return c;if("collectible"===f){var h=n.main.placements.collectible;return{bounds:"function"==typeof h?h({collected:a}):p,key:a[0].key}}}return c}({chart:t,config:n,expando:r,placementConfig:o,hovered:i,collected:a,meta:s}),u=l.bounds,c=l.key,p=Di(a,1)[0].desc;return[{bounds:u,nodes:a,data:a.map((function(e){return e.data})),key:c,meta:s,desc:p}]}({chart:t,config:n,expando:r,placementConfig:c,hovered:i,collected:d,meta:p}):[]}var Bu=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Wu=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),$u=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Yu=function(e){return Bu.test(e)},Ku=function(e){return Wu.test(e)||$u.test(e)};function Ju(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Yu(r))return"ltr";if(Ku(r))return"rtl"}return"ltr"}function Gu(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:xi(xi({},{count:!1}),t)}}function Zu(e){var t=e.config,n=e.h,r=e.context,o=e.nodes,i=e.property,a=e.filter,s=e.visibility,l=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:xi(xi({},{count:!0}),s)},c=t.getColorSettings();if("color"===c.type||!c.fieldType)return u;var p=Di(o,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,o=e.node,i=o.data[r];if(i){if(-3===o.data.value)return o.data.label;var a=n.resources.dataset(i.source.key).field(i.source.field).formatter(),s=i.value,l=i.label,u=t.getColorSettings();if(a&&"measure"===u.fieldType)return Number.isNaN(+s)?"-":a(i.value);var c=l||s;return void 0===c||Number.isNaN(c)||"NaN"===c?"-":c}}({config:t,context:r,property:i,node:p}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,o=e.config.getColorSettings();if(o.label)return o.label;var i=r.data[n];if(i&&"color"!==o.type){var a=t.resources.dataset,s=i.source,l=s.key,u=s.field;return a(l).field(u).title()}}({config:t,context:r,property:i,node:p});var d=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:p}),margin:"0 8px"}});return u.content.push({content:l?[":",u.label]:[u.label,":"],style:{"text-align":l?"right":"left",direction:Ju(u.label)}},{content:l?[u.value,d]:[d,u.value],style:{"text-align":l?"left":"right","vertical-align":"middle",direction:Ju(u.value)}}),u}function Xu(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,o=(r=void 0===r?{}:r).bold,i=void 0!==o&&o,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":i?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:Ju(n)},colspan:2}],visibility:xi(xi({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:o})},measure:function(e){var r=e.label,o=e.value,i=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,o,i=e.h,a=e.label,s=e.value,l=e.color,u=e.style,c=e.survive,p=e.visibility,d=e.config.rtl,f=i("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:d?[":",a]:[a,":"],style:{"text-align":d?"right":"left","font-weight":null!=u&&null!==(t=u.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=u&&null!==(n=u.label)&&void 0!==n&&n.italic?"italic":"normal",direction:Ju(a)}},{content:l?d?[s,f]:[f,s]:s,style:{"text-align":d?"left":"right","vertical-align":"middle","font-weight":null!=u&&null!==(r=u.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=u&&null!==(o=u.value)&&void 0!==o&&o.italic?"italic":"normal",direction:Ju(s)}}],survive:xi(xi({},{color:!1,duplicate:!1}),c),visibility:xi(xi({},{count:!0}),p)}}({config:t,h:n,label:r,value:o,color:i,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return Gu({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:xi(xi({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:xi(xi({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var o=e.nodes,i=e.property,a=e.filter,s=void 0===a||a,l=e.visibility;return Zu({config:t,h:n,context:r,nodes:o,property:i,filter:s,visibility:l})}}}function Qu(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.h,a=e.data,s=e.style,l=Di(a,1)[0],u=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]=[]),e[r].push(n),e}),{});return Object.keys(n).map((function(e){return n[e]}))}({config:r,nodes:l.node.nodes}),c=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.h,i=e.context,a=e.groups,s=i.node.meta,l=i.resources,u=l.dataset,c=l.formatter,p=Xu({config:n,h:o,context:i}),d=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:u}),f=a.map((function(e){var t=p.section({content:Ci((n.main.section({expando:r,h:o,nodes:e,dataset:u,formatter:c,meta:s,create:p,util:d})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),o=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?o:o.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var o="".concat(t.label,"-").concat(t.value);return e.memory[o]||(e.memory[o]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:o,nodes:i.node.nodes,dataset:u,formatter:c,meta:s,create:p,util:d,sections:f}),f.filter(Boolean)}({chart:t,config:r,expando:o,h:i,context:l,groups:u}),p=function(e){var t=e.translator,n=e.config,r=e.context,o=e.templates,i=n.main.layout,a=i.rows,s=i.grouping,l=i.single,u=function(e){var t=e.limit,n=e.grouping,r=e.single,o={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var i=e.visibility,a=e.index;if(r&&0!==a)return n?(o.index.started!==a&&o.index.group!==a&&(o.overflow++,o.index.group=a),!1):(o.overflow++,!1);if(o.count>=t){if(!n)return o.overflow++,!1;if(o.index.started!==a)return o.index.group!==a&&(o.overflow++,o.index.group=a),!1}return i.count&&o.count++,n&&(o.index.started=a),!0},overflow:function(){return o.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:o}):l}),c=o.reduce((function(e,t,n){var r=t.type,i=t.content;"section"===r&&(void 0===i?[]:i).forEach((function(t){u.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===o.length-1;return"divider"!==r||a||u.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),p=u.overflow();return p&&c.push(function(e){var t=e.translator,n=e.config,r=e.count,o=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),i=Ju(o);return[{content:o,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:i},colspan:2}]}({translator:t,config:n,count:p})),c}({translator:n,config:r,h:i,context:l,templates:c});return p.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:xi(xi({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:i,style:s,rows:p}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:i})}function ec(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.internal;if(!r.main.key)return!1;var a=ps(),s=Nu({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,u=l.afterShow,c=l.afterHide,p=function(){var e=a.get("collected");return{expando:o,nodes:e.nodes,meta:e.meta}};return Li(!0,s,{settings:{filter:function(e){return Uu({chart:t,config:r,expando:o,internal:i,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var i=e.h,a=e.data,s=e.style;return Qu({chart:t,translator:n,config:r,expando:o,h:i,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return u(p())},afterHide:function(){return c(p())}},style:{arrow:{color:r.style.background},content:r.style}})}function tc(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Nu({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Li(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:xi(xi({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function nc(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}function rc(e){var t=e.chart,n=e.event,r=e.component,o={absolute:{x:0,y:0},relative:{x:0,y:0}},i=t.element.getBoundingClientRect(),a=i.left,s=i.top;o.absolute.x=(n.center?n.center.x:n.clientX)-a,o.absolute.y=(n.center?n.center.y:n.clientY)-s;var l=t.component(r);if(l){var u=l.rect.computedInner;o.relative.x=o.absolute.x-u.x,o.relative.y=o.absolute.y-u.y}return o}function oc(e){var t=e.chart,n=e.hits,r=e.position,o=[];if(n.position.length&&o.push.apply(o,Ci(t.shapesAt(r.absolute,{components:n.position.map((function(e){return{key:e}}))}))),!o.length&&n.distances.length){var i=[];n.distances.forEach((function(e){i.push.apply(i,Ci(t.shapesAt({cx:r.absolute.x,cy:r.absolute.y,r:e},{components:n.distanceKeys[e].map((function(e){return{key:e}}))})))})),i.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var o=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=o(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:o(t[0])}).node}({nodes:i,origin:r.relative}))}return o}function ic(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=n.delay.tap,s=nc({config:n}),l=n.main.triggers.reduce((function(e,t){return e.push.apply(e,Ci(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==l.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:vi({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var l=t.component(n.main.key);if(l&&l.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),c=s({components:u});if(c.any){var p=Di(c.components,1)[0],d=rc({chart:t,event:e,component:p});o.set(Pu,d);var f=oc({chart:t,hits:c,position:d});if(f.length){var m=f[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return i.collectNodes({nodes:f})},meta:{triggerer:m,position:d}}).then((function(){l.emit("show",e,{nodes:f,delay:a})}))}else l.emit("hide")}else l.emit("hide")}}}))}}function ac(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=nc({config:n}),s=function(e){var t=e.config,n=e.expando,r=e.internal,o=e.facade,i=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,u=e.nodes,c=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){return{key:e.key,bounds:e.bounds,value:e.data.value}})))}({nodes:u});if(!s.ongoing[c]){s.ongoing[c]=!0,s.latest=c;var p=u[0].key;i({expando:n,event:t,collectNodes:function(){return o.collectNodes({nodes:u})},meta:{triggerer:p,position:r.get(Pu)}}).then((function(){c===s.latest&&l.emit("show",t,{nodes:u,delay:a})})).finally((function(){delete s.ongoing[c],c===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:o,facade:i}),l=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){l.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),i=t.component(n.main.key);if(i&&i.show){var l=a({components:r});if(l.any){var u=Di(l.components,1)[0],c=rc({chart:t,event:e,component:u});o.set(Pu,c);var p=oc({chart:t,hits:l,position:c});if(!p.length)return void i.emit("hide");s({event:e,tooltip:i,nodes:p})}else i.emit("hide")}var d=n.legend;if(d.keys.tooltip&&d.keys.component){var f=t.component(d.keys.tooltip);f&&f.show&&(r.some((function(e){return e.key===d.keys.component}))?f.emit("show",e):f.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function sc(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Li(!0,{},{rtl:!1,enable:Tu.FALSE,getColorSettings:Tu.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Tu.FALSE,getGroupByValue:Tu.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Tu.ARRAY,sections:Tu.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Tu.NOOP,afterHide:Tu.NOOP},interaction:{mouseleave:Tu.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),o=ps(),i=ps(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[ec({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),tc({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:o,internal:i})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal;return{collectNodes:function(e){var i=e.nodes,a=Di(Uu({chart:t,config:n,expando:r,internal:o,nodes:i}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:o});return{gestures:[ic({chart:t,config:n,expando:r,internal:o,facade:i})],native:ac({chart:t,config:n,expando:r,internal:o,facade:i})}}({chart:t,config:r,expando:o,internal:i})),a.interactions},expando:o}}var lc={};function uc(){uc.init.call(this)}lc.isObject=function(e){return"object"==typeof e&&null!==e},lc.isNumber=function(e){return"number"==typeof e},lc.isUndefined=function(e){return void 0===e},lc.isFunction=function(e){return"function"==typeof e};var cc=uc;uc.EventEmitter=uc,uc.prototype._events=void 0,uc.prototype._maxListeners=void 0,uc.defaultMaxListeners=10,uc.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},uc.prototype.setMaxListeners=function(e){if(!lc.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},uc.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],lc.isUndefined(n))return!1;if(lc.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(lc.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},uc.prototype.addListener=function(e,t){var n;if(!lc.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,lc.isFunction(t.listener)?t.listener:t),this._events[e]?lc.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,lc.isObject(this._events[e])&&!this._events[e].warned)&&((n=lc.isUndefined(this._maxListeners)?uc.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,lc.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),lc.isFunction(console.trace)&&console.trace()));return this},uc.prototype.on=uc.prototype.addListener,uc.prototype.once=function(e,t){if(!lc.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},uc.prototype.removeListener=function(e,t){var n,r,o,i;if(!lc.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||lc.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(lc.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},uc.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],lc.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},uc.prototype.listeners=function(e){return this._events&&this._events[e]?lc.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},uc.listenerCount=function(e,t){return e._events&&e._events[t]?lc.isFunction(e._events[t])?1:e._events[t].length:0};function pc(){const e={};var t;return t=e,Object.keys(cc.prototype).forEach((e=>{t[e]=cc.prototype[e]})),cc.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function dc({picasso:e}){var t;const n=h(),r=g(),o=y(),[i,a]=v(),s=pc(),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:n,setIsLassoActionActive:r}){var o,i,a;return{active:n,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){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:l,isInSelections:u,isLassoActionActive:c,setIsLassoActionActive:p}),x((()=>(i&&(i.interactions.lasso.active=()=>c),{...s.lasso})),[i,c,u]),q((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),i=t.chart({element:r,data:[],settings:{}}),u=Ou({chart:i,actions:s,selections:o,config:{selectionActions:!1}});u.setLayout(l),u.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const c=function(e){var t=xi({},e),n={},r={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&n[e]?t[e]=n[e](i,a):t[e]=i,!o&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return i}({legendScrollOffset:0,rotation:0});return c.intercept("rotation",(e=>(c.get("rotation")+e)%(2*Math.PI))),c.onChanged("rotation",(()=>{i.update({partialData:!0})})),s.on("selections-start",(()=>{i.brush("selection").start()})),a({picasso:t,chart:i,selectionService:u,viewState:c,interactions:s}),()=>{u.destroy(),i.destroy(),s.removeAllListeners(),delete s.select,c.intercept("rotation",void 0),c.onChanged("rotation",void 0)}}),[]),i}const fc={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 mc(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const hc={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,u=i[t]*(n>l?1:n/l),c=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function gc(e,t,n,r){var o,i,a,s,l,u;const{app:c,flags:p}=t,d=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!d)return[];const[f]=d,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===f.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await hc.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&mc(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await hc.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await hc.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(c,p,f,m,v);if(p.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(mc(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await hc.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(c,n[g],m,v)}return[]}const yc={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(gc(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},vc={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await yc.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>yc.checkIfPromisesExist({customTooltipModel:e})};const bc=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:fc.CHART.CHART_PARENT_TYPE,qId:fc.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},xc=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:fc.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const qc={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=fc.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:fc.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const u=o,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await qc.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=fc.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=fc.CHART.STATE,a=bc(t,i),s=await e.createSessionObject(a),l=xc(t);if(s.id!==fc.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var p,d,f,m;const e=n.length>0&&void 0!==(null===(p=n[0].data)||void 0===p?void 0:p.value)?[null===(d=n[0].data)||void 0===d?void 0:d.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(fc.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 qc.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(qc.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(fc.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=fc.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Dc(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function Cc(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=fc.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function wc(e){const t=Cc();return e.filter((e=>t[e.id]))}const Sc={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const u=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Sc.getAttrExprData(a);i.length||n.length?vc.handlePromises({customTooltipModel:o,nodes:Sc.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s,l;null!==(s=r.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=o&&null!==(l=o.miniChartToken)&&void 0!==l&&l.alternateState&&qc.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>vc.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[fc.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[fc.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[fc.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(wc(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[fc.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[fc.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Dc(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===wc(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=Dc(e)||[];[...o,t].forEach((e=>{const t=wc(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=Cc(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=se.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Mc(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case fc.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case fc.CUSTOM.TITLE:case fc.CUSTOM.DESCRIPTION:case fc.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Ec={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Mc(t,e,r,n)}}};const Ic={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[fc.CUSTOM.TITLE]:!0,[fc.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Sc.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===fc.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===fc.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>le.getMeasure(e,t))),e,i)}};function Ac({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Ic.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Oc(e){const t=fc.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function Tc(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var jc={attrExpr:{migrateProperties(e){var t,n,r,o;const i=K(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=Tc(i);return s=function(e,t){return t.concat(e.map((e=>Oc(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,n,r,o;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=Oc(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Tc(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,o,i,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],u=(null===(o=t.tooltip)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:kc}=fc;function Lc({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:u}){var c,p,d;const f=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Sc,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&cs(t,"tooltip.hideBasic",!1),y=!!(h&&e.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!==(c=t.tooltip)&&void 0!==c&&null!==(p=c.chart)&&void 0!==p&&null!==(d=p.object)&&void 0!==d&&d.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=Ac({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===kc.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===kc.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>Sc.checkIfPromisesExist({customTooltipModel:f}),createImageRow:({value:e,h:t})=>Sc.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const o=Sc.getDataNodes(i,r),a=Sc.getAttrExprData(t);return vc.handlePromises({customTooltipModel:f,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>qc.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Sc.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>qc.show({app:n,properties:t,selectedNodes:e,customTooltipModel:f,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=f.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>qc.hide({app:n,customTooltipModel:f}),destroy:()=>qc.destroyVisualization({customTooltipModel:f})}}}function Nc(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Pc({flags:e,picasso:t,instance:n}){const r=D(),o=C(),i=w(),a=g(),[s,l]=v(),u=S(),c=M(),p=E(),d=h(),f=I(),{qLocaleInfo:m}=A(),y=O();return q((()=>{if(!n)return;a.style.overflow="hidden";const s=function(e){var t,n,r,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,p=e.createConfig,d=void 0===p?us:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),S={theme:x,key:v,localeInfo:y,layout:w,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:xi(xi({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?is(w):void 0})},M=rs({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:ls}):ls(e)}));var E=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(C)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:xi({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:is}),n=as(S,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:n.picasso,model:r,app:o,translator:i,config:{auto:!1,key:"fill"}}),h=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,o=void 0===r?{}:r,i={initialized:!1,definitions:[]};return{initialize:function(){return yi(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=yi(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(xi({},o));case 4:if("object"===hi(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(xi({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(r=i.definitions).push.apply(r,Ci(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var n=Di(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Li(!0,{},n.brush);Li(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===hi(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=fs({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=fs({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n.picasso,plugins:c,pluginArgs:Nc(u)}),g=Lc({flags:e,layout:u,app:o,model:r,picasso:t,chart:n.chart,translator:i,localeInfo:m,embed:y,options:d}),v=function({chart:e,translator:t,layout:n,constraints:r,options:o,theme:i,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,u="rtl"===o.direction;return sc({chart:e,translator:t,config:{rtl:u,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:i.getStyle("object.pieChart","","fontFamily")},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:o,create:i,util:a})=>{const[u]=n,{title:c,description:p,measures:d}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},f=[];c&&f.push(i.text({value:c,style:{bold:!0}})),p&&f.push(i.text({value:p}));const m=s.hideBasic();if(m&&!d.length&&(c||p)||f.push(i.text({value:u.data.label,style:{bold:!0}})),!m){f.push(i.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}f.push(i.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(u.desc.share)}))}d&&f.push(...d.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),f.push(i.raw({value:s.chart.createLimitationRow()}))):f.push(i.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:h}=u.data;return s.isEnabled()&&h&&f.push(...h.map((t=>i.raw({value:s.createImageRow({value:t,h:e})})))),f},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:n.chart,translator:i,layout:u,constraints:p,options:d,theme:f,colorService:s,custom:g});l({colorService:s,pluginService:h,tooltipService:v})}),[r,o,n,u,i.language(),p,d.direction,f.name()]),s}function Rc({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:o}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const Fc={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Vc=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{let r=.8,o=0;const i=n?n.style.innerRadius:.55;e.donut.showAsDonut&&(r=.8-i,o=i);return t.scale(Math.max(0,t.datum.radius.value))*r+o}}:.8,Hc=({layout:e},t,n)=>{if(!e.donut.showAsDonut)return 0;const r=n?n.style.innerRadius:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-r,n=r;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:r},_c=({layout:e},t)=>{const n=t.colorService.getDatumProps(),r=n[Object.keys(n)[0]],o=r&&r.field?r.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=ne(e,"qHyperCube.qDimensionInfo",[]).length;function p(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>u(n)(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:{...n,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?Ec.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:Hc({layout:e},t,d),fill:t.colorService.getColor(),strokeWidth:d?Fc.STROKE.WIDTH[d.style.strokeWidth.toUpperCase()]:Fc.STROKE.WIDTH.NONE,stroke:d?d.style.strokeColor.color:Fc.STROKE.COLOR,outerRadius:Vc({layout:e},t,d),cornerRadius:d?d.style.cornerRadius:0}}}};function zc({layout:e},t,n){const r=(e.components||[]).filter((e=>"slices"===e.key))[0],o=r?r.style.innerRadius:.55,i=t.encodings.slice.outerRadius;return!(!e.donut.showAsDonut||!i)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:R(n.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-o,n=o;return e.scale(0)*t+n}}}}}}function Uc({layout:e},t,n){return!(e.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:R(n.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}}}const{getThemeStyle:Bc}=F;function Wc(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function $c(e){return e.node.data.num.label}function Yc(e){return e.node.data.radius.label}function Kc(e,t,n){if(e.dataPoint.auto)return n?$c:Wc;if("share"===e.dataPoint.labelMode)return Wc;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Yc:$c}return null}function Jc({data:e}){return e?e.label:""}function Gc(e,t,n){const r=parseInt(Bc(e,"object.pieChart",t,n),10);if(!isNaN(r))return r}function Zc(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function Xc({node:e,data:t}){return K({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Qc(e,t,n){const r=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Bc(n.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Gc(n.theme,"label.name","fontSize"),fontFamily:Bc(n.theme,"object.pieChart","label.name","fontFamily"),label:Jc,linkData:({node:e,data:t})=>K({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(Kc(e,t,!1)){const o=function(e,t,n){return{label:Kc(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Zc(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Zc(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),i=pe(K(t,o),n.theme);i.linkData=Xc,r.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:r}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]}}}function ep({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=Kc(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:Gc(n.theme,"label.name","fontSize"),fontFamily:Bc(n.theme,"object.pieChart","label.name","fontFamily"),label:Jc},{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:Gc(n.theme,"label.value","fontSize"),fontFamily:Bc(n.theme,"object.pieChart","label.value","fontFamily"),label:r}]}}}]}}}(e,n,t):Qc(e,n,t))}const tp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function np(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}function rp(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:o}=np(e,t),i=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*.8;return(i-r)**2+(a-o)**2<=s**2}const op=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=np(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const i=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});i.length&&(this.chart.brushFromShapes(i,{components:[{key:i[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),ip=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),ap=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function sp(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&rp(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const lp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&rp(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),up=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),cp=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[lp(e,{}),op(e,t,{}),...n]:[tp(e,{}),ap(e,{}),lp(e,{}),ip(e,{}),up(e,{}),op(e,t,{}),...n]});function pp(e,t,n){const r=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const i=t.tooltipService.getInteractions();return[cp(t,r,i.gestures),sp(t),i.native]}function dp({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function fp({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:n.theme.getStyle("object","axis.title","fontFamily"),fontSize:n.theme.getStyle("object","axis.title","fontSize"),color:n.theme.getStyle("object","axis.title","color")}}}function mp({layout:e},t,n){return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:Z[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:o}}}(function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const o=ne(e,"qHyperCube.qSize.qcy");if(ne(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const i=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":i.length!==r.length&&"NegativeOrZeroValues"}(e,t),t,n)}function hp({layout:e,context:t,selectionService:n},r={}){const o=function({layout:e}={},t={}){const n={};return K(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&K(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),i={scales:o};let a=[];const s=mp({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[_c({layout:e,settings:i},r),zc({layout:e},r,t),{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]}},Uc({layout:e},r,t),fp({layout:e},r,t),...u.components,Rc({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},ep({layout:{dataPoint:K({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:pp(n,r,t),scales:o,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:dp({settings:i},r),strategy:te(0,r)}}function gp({instance:e,services:t}){const n=g(),r=S();k((o=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:re(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),L((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:re(e.chart,"legend-cat")})})),[e])}var yp={exports:{}};window;var vp=V(yp.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
10
10
  /*!***************************************!*\
@@ -984,4 +984,4 @@ function(e,t,n){n.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
984
984
  !*** ./utils/wrap-file-name.js ***!
985
985
  \*********************************/
986
986
  /*! exports provided: default */
987
- function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}}));const bp={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},xp={getDimensions:e=>bp.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>bp.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>bp.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>bp.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=bp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=bp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const qp={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>xp.getNumMeasures(e)>=1},showLegend:e=>{const t=bp.getValue(e,"color.auto"),n=bp.getValue(e,"color.expressionIsColor"),r=bp.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!bp.getValue(e,"color.auto")&&"byDimension"===bp.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===bp.getValue(e,"color.useDimColVal")&&bp.setValue(e,"color.useDimColVal",!1),!bp.getValue(e,"color.auto")&&"byDimension"===bp.getValue(e,"color.mode")&&"libraryItem"===bp.getValue(e,"color.byDimDef.type"))},Dp=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=qp;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!bp.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=bp.getValue(e,"color.auto");return bp.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===bp.getValue(e,"color.mode")&&!0===bp.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>bp.getValue(e,"legend.show")&&o(e)}}};function Cp(e){return new Dp(e)}const wp=Cp("hard");const Sp=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,n)=>n.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:wp.color.colorMode.options},persistentColors:{show:wp.color.persistentColors.show}}},legend:{show:wp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:wp.legend.showTitle.show},dock:{show:wp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}),Mp={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Ep={uses:"sorting"},Ip={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Ap(e){return{type:"items",component:"accordion",items:{data:Mp,sorting:Ep,addons:Ip,settings:Sp(e)}}}const Op=Cp("explore"),Tp=Ap();var jp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Tp.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:Tp.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:Op.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Op.color.useDimColVal.show(e))}}}}}}};function kp(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Lp(e){return e.data.num.label}function Np(e){return e.data.radius.label}function Pp(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Lp:kp;if("share"===e.dataPoint.labelMode)return kp;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Np:Lp;return Lp}(n,r)(e,t)}function Rp(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Fp{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-r.left+l.x*(s.x+a*Math.sin(c)),d=u.top-r.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Rp(n),label:Pp(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=K(e.options,{effect:null}),n?t.getProperties().then((e=>K(e,{effectPath:null,effectProperties:null,dataPoint:K(!0,{},e.originalModelSettings.dataPoint),legend:K(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class Vp extends Fp{init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class Hp extends Fp{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((n,r)=>{const o=Pp(n,this.chart.formatter,e,t);return{text:`${Rp(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var _p={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new Vp(e):"/effects/highlight-value"===e.effectPath?new Hp(e):null};function zp(e){const t={},{components:n,tooltip:r}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Up(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Bp(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Wp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Bp(e),Up(t),Sc.addCallbackCustomTooltip(t)},move(e,t){Bp(e),Up(t),Sc.moveCallbackCustomTooltip(t,e)},remove(e,t){Sc.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Bp(e),Up(r),Sc.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Up(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const $p=e=>e.qMax<=0,Yp=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every($p));function Kp(e){return{definition:Ap(e.flags),softDefinition:jp,support:{snapshot:Yp,export:Yp,exportData:!0,sharing:Yp,viewData:!0,effects:!0},effects:_p,extendMetrics:zp,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=vp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Wp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>vp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function Jp(e){return{properties:{version:"1.13.0",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:Fc.STROKE.COLOR},cornerRadius:Fc.CORNER_RADIUS,innerRadius:Fc.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:[Wp(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=vp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Wp(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>vp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const Gp=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((t=>{e.add(N[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(si()),o.component("pie-dividers",pi),o.component("negative-indicators",mi),o}();return{qae:Jp(o),ext:Kp(o),component(){const e=dc({picasso:a}),t=Pc({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=h(),a=D(),s=C(),l=w(),u=I(),c=S(),p=y(),d=E(),{qLocaleInfo:f}=A(),[m]=T((()=>t?(jc.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);q((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),q((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,tooltipService:x}=t,q=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",q.legendScrollOffset||0),g.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,g),x.expando.set("properties",m[1]);const D=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),C=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],w={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const S=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),w),M=p?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{p.select(e)}))}:()=>{},E=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,I=t=>e.selectionService.getIsSelectionLocked(t),A=()=>hp({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:d,model:a},selectionService:e.selectionService},{picasso:r,ds:D,model:a,app:s,chart:h,onSelect:M,isLocked:I,interactions:y,constraints:d,translator:l,viewState:g,dataRowCount:S,encodings:w,colorService:v,pluginService:b,tooltipService:x,debouncer:ds,properties:m[1],logicalSize:E,flags:o});e.generateSettings=A,h.update({data:C,settings:A()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:w}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,d,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=S(),n=h(),r=j();q((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),gp({instance:e,services:t})}}};export{Gp as default};
987
+ function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}}));const bp={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},xp={getDimensions:e=>bp.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>bp.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>bp.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>bp.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=bp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=bp.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const qp={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>xp.getNumMeasures(e)>=1},showLegend:e=>{const t=bp.getValue(e,"color.auto"),n=bp.getValue(e,"color.expressionIsColor"),r=bp.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!bp.getValue(e,"color.auto")&&"byDimension"===bp.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===bp.getValue(e,"color.useDimColVal")&&bp.setValue(e,"color.useDimColVal",!1),!bp.getValue(e,"color.auto")&&"byDimension"===bp.getValue(e,"color.mode")&&"libraryItem"===bp.getValue(e,"color.byDimDef.type"))},Dp=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=qp;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!bp.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=bp.getValue(e,"color.auto");return bp.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===bp.getValue(e,"color.mode")&&!0===bp.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>bp.getValue(e,"legend.show")&&o(e)}}};function Cp(e){return new Dp(e)}const wp=Cp("hard");const Sp=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,n)=>n.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:wp.color.colorMode.options},persistentColors:{show:wp.color.persistentColors.show}}},legend:{show:wp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:wp.legend.showTitle.show},dock:{show:wp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}),Mp={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Ep={uses:"sorting"},Ip={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Ap(e){return{type:"items",component:"accordion",items:{data:Mp,sorting:Ep,addons:Ip,settings:Sp(e)}}}const Op=Cp("explore"),Tp=Ap();var jp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Tp.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:Tp.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:Op.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Op.color.useDimColVal.show(e))}}}}}}};function kp(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Lp(e){return e.data.num.label}function Np(e){return e.data.radius.label}function Pp(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Lp:kp;if("share"===e.dataPoint.labelMode)return kp;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Np:Lp;return Lp}(n,r)(e,t)}function Rp(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Fp{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-r.left+l.x*(s.x+a*Math.sin(c)),d=u.top-r.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Rp(n),label:Pp(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=K(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=K(e.options,{effect:null}),n?t.getProperties().then((e=>K(e,{effectPath:null,effectProperties:null,dataPoint:K(!0,{},e.originalModelSettings.dataPoint),legend:K(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class Vp extends Fp{init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class Hp extends Fp{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((n,r)=>{const o=Pp(n,this.chart.formatter,e,t);return{text:`${Rp(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=K(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var _p={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new Vp(e):"/effects/highlight-value"===e.effectPath?new Hp(e):null};function zp(e){const t={},{components:n,tooltip:r}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Up(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Bp(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Wp({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Bp(e),Up(t),Sc.addCallbackCustomTooltip(t)},move(e,t){Bp(e),Up(t),Sc.moveCallbackCustomTooltip(t,e)},remove(e,t){Sc.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Bp(e),Up(r),Sc.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Up(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const $p=e=>e.qMax<=0,Yp=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every($p));function Kp(e){return{definition:Ap(e.flags),softDefinition:jp,support:{snapshot:Yp,export:Yp,exportData:!0,sharing:Yp,viewData:!0,effects:!0},effects:_p,extendMetrics:zp,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=vp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Wp(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>vp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function Jp(e){return{properties:{version:"1.13.1",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:Fc.STROKE.COLOR},cornerRadius:Fc.CORNER_RADIUS,innerRadius:Fc.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:[Wp(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=vp.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Wp(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>vp.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const Gp=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(N).forEach((t=>{e.add(N[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(si()),o.component("pie-dividers",pi),o.component("negative-indicators",mi),o}();return{qae:Jp(o),ext:Kp(o),component(){const e=dc({picasso:a}),t=Pc({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=h(),a=D(),s=C(),l=w(),u=I(),c=S(),p=y(),d=E(),{qLocaleInfo:f}=A(),[m]=T((()=>t?(jc.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);q((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),q((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,tooltipService:x}=t,q=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",q.legendScrollOffset||0),g.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,g),x.expando.set("properties",m[1]);const D=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),C=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],w={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const S=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length:e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),w),M=p?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{p.select(e)}))}:()=>{},E=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,I=t=>e.selectionService.getIsSelectionLocked(t),A=()=>hp({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:d,model:a},selectionService:e.selectionService},{picasso:r,ds:D,model:a,app:s,chart:h,onSelect:M,isLocked:I,interactions:y,constraints:d,translator:l,viewState:g,dataRowCount:S,encodings:w,colorService:v,pluginService:b,tooltipService:x,debouncer:ds,properties:m[1],logicalSize:E,flags:o});e.generateSettings=A,h.update({data:C,settings:A()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:w}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,d,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=S(),n=h(),r=j();q((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),gp({instance:e,services:t})}}};export{Gp as default};