@nebula.js/sn-combo-chart 1.26.4 → 1.26.6

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.
@@ -1,17 +1,17 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.26.4
2
+ * @nebula.js/sn-combo-chart v1.26.6
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,d,m,h,p,f,g,y,v,b,x,S,E,M,C,T,O,A,R,w,N,I,k,L,P,D,q,z,$,_,j,B,F,H,V,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,u=e.useAppLayout,c=e.usePlugins,d=e.useEmbed,m=e.useOptions,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,y=e.useLayout,v=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.cache,T=e.debouncer,O=e.throttler,A=e.colorService,R=e.tooltipService,w=e.layoutService,N=e.dockService,I=e.themeService,k=e.pluginService,L=e.storage,P=e.selectionService,D=e.fontResolver},function(e){q=e.default},function(e){z=e.default},function(e){$=e.default},function(e){_=e.default,j=e,B=e.Children,F=e.isValidElement,H=e.cloneElement},function(e){V=e,U=e.default},function(e){Y=e.default}],execute:function(){e("default",(function(e){var i,o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(W).forEach((t=>{e.add(W[t])}))}}(e.translator);const{flags:a}=e,s=null===(i=e.anything)||void 0===i||null===(o=i.sense)||void 0===o?void 0:o.isUnsupportedFeature,l=Nx();return{qae:_C(e),ext:mT(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),i=function(){const[e,t]=n();return r((()=>{t(L({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),o=function(){const e=m(),t=h(),i=d(),o=p(),[a,s]=n(),l=f();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);r>-1&&o[e].splice(r,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),c=function(){var e,t,i;const o=g(),[a,s]=n(!1),[l,u]=n(!1),c=y(),d=h(),m=!!c.qSelectionInfo.qInSelections,p=!(null===(e=c.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(i=t[0])||void 0===i||!i.qIsOneAndOnlyOne);r((()=>{o&&s(!o.select&&!o.active)}),[o]);const f=e=>{u("boolean"==typeof e?e:!l)};return v((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:wC,hidden:!a||!m||p,active:l,action:f})),[m,p,l,a,d.language()]),{action:f,enabled:()=>a,active:()=>l}}();let d=NC;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||NC}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),c=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r((()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[i]),a}({picasso:l,environment:o}),b=LC({chart:c,actions:u}),x=RC({picasso:l,chart:c,environment:o,flags:a,viewState:i,viewCache:e,actions:u,selectionService:b});Am({picasso:l,chart:c,models:x,environment:o,viewState:i,viewCache:e,actions:u}),Mm({picasso:l,chart:c,models:x,environment:o,viewState:i,viewCache:e,actions:u,isUnsupportedFeature:s}),jC({models:x,chart:c,viewState:i})}}}));var W={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G=Object.prototype.hasOwnProperty,K=Object.prototype.toString,J=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Q=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===K.call(e)},ee=function(e){if(!e||"[object Object]"!==K.call(e))return!1;var t,n=G.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&G.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||G.call(e,t)},te=function(e,t){J&&"__proto__"===t.name?J(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!G.call(e,t))return;if(Z)return Z(e,t).value}return e[t]},re=function e(){var t,n,r,i,o,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=ne(s,n),s!==(i=ne(t,n))&&(c&&i&&(ee(i)||(o=Q(i)))?(o?(o=!1,a=r&&Q(r)?r:[]):a=r&&ee(r)?r:{},te(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&te(s,{name:n,newValue:i}));return s},ie=X(re);const oe="center",ae="bottom";var se={NoDataExist:{label:"NoDataExist",alignment:oe,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:oe,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:oe,default:!1},LimitedData:{label:"LimitedData",alignment:ae,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ae,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ae,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ae,default:!1}};const le=[["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}]],ue={};le.forEach((([e,{width:t,height:n}])=>{ue[e]={width:t,height:n}}));const ce={getLayoutModes:()=>ue,getLayoutMode(e,t){let n;for(n=0;n<le.length;++n)if(e>=le[n][1].width&&t>=le[n][1].height)return le[n][0];return"SPARK"}};const de=["$date","$timestamp","$time"],me=["D","TS","T"],he={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>de.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&me.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(he.hasTimeTag(t)&&he.hasUnknownFormat(t)||he.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&he.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n,r;const i=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==i?void 0:i.length)&&void 0!==r?r:0)<1)&&he.canBeContinuousDimension(i[0])},maxNumberOfLines:12},pe=/^[A-Z][A-z0-9_]*$/i,fe={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||pe.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},ge=e=>fe.getValue(e,"qHyperCube.qDimensionInfo",[]),ye=e=>fe.getValue(e,"qHyperCube.qMeasureInfo",[]),ve=e=>fe.getValue(e,"barGrouping.grouping"),be={continuous:(e,t=!1)=>!!he.canBeContinuous(e)&&(fe.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ge(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ve(e)&&(ge(e).length>1||ye(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ge(e).length>1&&1===ye(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ge(e).length&&ye(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ve(e)||this.continuous(e))&&(ge(e).length>1||ye(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ge(e).length>1&&1===ye(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ge(e).length&&ye(e).length>1},simple:e=>0===ge(e).length||1===ge(e).length&&1===ye(e).length,snapshot:e=>!!fe.getValue(e,"snapshotData")};function xe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Se=e=>{throw e.isHandled=!0,e};const Ee={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Ee.getVerticalDock(t):n?Ee.getOppositeDock(Ee.getHorizontalDock(t)):Ee.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},Me={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=Me.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=Me.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=Me.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(Me.stringWidthOverMWidth(o)+1.0909090909090908*a)}},Ce=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Te=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Oe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ae={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Ce.test(e),isRtlChar:e=>Te.test(e)||Oe.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Ae.isLtrChar(r))return"ltr";if(Ae.isRtlChar(r))return"rtl"}return"ltr"}},Re={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,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("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=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Re.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=Ae.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=Ae.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:Ae.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=Ae.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Ae.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Re.getColorSymbol(e,t)]:[Re.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Ae.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Ae.detectTextDirection(e.value);let l;return l=i?r?[e.value,Re.getColorSymbol(t,n)]:[Re.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function we(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ne(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ie(){}var ke=.7,Le=1/ke,Pe="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ze=/^#([0-9a-f]{3,8})$/,$e=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),_e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),je=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${De}\\)$`),Be=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Fe=new RegExp(`^hsl\\(${De},${qe},${qe}\\)$`),He=new RegExp(`^hsla\\(${De},${qe},${qe},${De}\\)$`),Ve={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 Ue(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function We(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ze.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xe(t):3===n?new Ze(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ge(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ge(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=$e.exec(e))?new Ze(t[1],t[2],t[3],1):(t=_e.exec(e))?new Ze(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=je.exec(e))?Ge(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ge(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fe.exec(e))?it(t[1],t[2]/100,t[3]/100,1):(t=He.exec(e))?it(t[1],t[2]/100,t[3]/100,t[4]):Ve.hasOwnProperty(e)?Xe(Ve[e]):"transparent"===e?new Ze(NaN,NaN,NaN,0):null}function Xe(e){return new Ze(e>>16&255,e>>8&255,255&e,1)}function Ge(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ze(e,t,n,r)}function Ke(e){return e instanceof Ie||(e=We(e)),e?new Ze((e=e.rgb()).r,e.g,e.b,e.opacity):new Ze}function Je(e,t,n,r){return 1===arguments.length?Ke(e):new Ze(e,t,n,null==r?1:r)}function Ze(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Qe(){return`#${rt(this.r)}${rt(this.g)}${rt(this.b)}`}function et(){const e=tt(this.opacity);return`${1===e?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${1===e?")":`, ${e})`}`}function tt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rt(e){return((e=nt(e))<16?"0":"")+e.toString(16)}function it(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,n,r)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Ie||(e=We(e)),!e)return new at;if(e instanceof at)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new at(a,s,l,e.opacity)}function at(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function st(e){return(e=(e||0)%360)<0?e+360:e}function lt(e){return Math.max(0,Math.min(1,e||0))}function ut(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}we(Ie,We,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ue,formatHex:Ue,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ot(this).formatHsl()},formatRgb:Ye,toString:Ye}),we(Ze,Je,Ne(Ie,{brighter(e){return e=null==e?Le:Math.pow(Le,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(nt(this.r),nt(this.g),nt(this.b),tt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qe,formatHex:Qe,formatHex8:function(){return`#${rt(this.r)}${rt(this.g)}${rt(this.b)}${rt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:et,toString:et})),we(at,(function(e,t,n,r){return 1===arguments.length?ot(e):new at(e,t,n,null==r?1:r)}),Ne(Ie,{brighter(e){return e=null==e?Le:Math.pow(Le,e),new at(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new at(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ze(ut(e>=240?e-240:e+120,i,r),ut(e,i,r),ut(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new at(st(this.h),lt(this.s),lt(this.l),tt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=tt(this.opacity);return`${1===e?"hsl(":"hsla("}${st(this.h)}, ${100*lt(this.s)}%, ${100*lt(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,dt=180/Math.PI,mt=.96422,ht=1,pt=.82521,ft=4/29,gt=6/29,yt=3*gt*gt,vt=gt*gt*gt;function bt(e){if(e instanceof xt)return new xt(e.l,e.a,e.b,e.opacity);if(e instanceof Ot)return At(e);e instanceof Ze||(e=Ke(e));var t,n,r=Ct(e.r),i=Ct(e.g),o=Ct(e.b),a=St((.2225045*r+.7168786*i+.0606169*o)/ht);return r===i&&i===o?t=n=a:(t=St((.4360747*r+.3850649*i+.1430804*o)/mt),n=St((.0139322*r+.0971045*i+.7141733*o)/pt)),new xt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function xt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function St(e){return e>vt?Math.pow(e,1/3):e/yt+ft}function Et(e){return e>gt?e*e*e:yt*(e-ft)}function Mt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ot)return new Ot(e.h,e.c,e.l,e.opacity);if(e instanceof xt||(e=bt(e)),0===e.a&&0===e.b)return new Ot(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*dt;return new Ot(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ot(e,t,n,null==r?1:r)}function Ot(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function At(e){if(isNaN(e.h))return new xt(e.l,0,0,e.opacity);var t=e.h*ct;return new xt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}we(xt,(function(e,t,n,r){return 1===arguments.length?bt(e):new xt(e,t,n,null==r?1:r)}),Ne(Ie,{brighter(e){return new xt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new xt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ze(Mt(3.1338561*(t=mt*Et(t))-1.6168667*(e=ht*Et(e))-.4906146*(n=pt*Et(n))),Mt(-.9787684*t+1.9161415*e+.033454*n),Mt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),we(Ot,Tt,Ne(Ie,{brighter(e){return new Ot(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ot(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return At(this).rgb()}}));var Rt={isDark:function(e){return Tt(e).l<70}};function wt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Nt(e){return 1===e.length&&(e=function(e){return function(t,n){return wt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var It=Nt(wt).right,kt=Math.sqrt(50),Lt=Math.sqrt(10),Pt=Math.sqrt(2);function Dt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=kt?10:o>=Lt?5:o>=Pt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=kt?10:o>=Lt?5:o>=Pt?2:1)}function qt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=kt?i*=10:o>=Lt?i*=5:o>=Pt&&(i*=2),t<e?-i:i}function zt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var $t="$";function _t(){}function jt(e,t){var n=new _t;if(e instanceof _t)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Bt(){}_t.prototype=jt.prototype={constructor:_t,has:function(e){return $t+e in this},get:function(e){return this[$t+e]},set:function(e,t){return this[$t+e]=t,this},remove:function(e){var t=$t+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===$t&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===$t&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===$t&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===$t&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===$t&&++e;return e},empty:function(){for(var e in this)if(e[0]===$t)return!1;return!0},each:function(e){for(var t in this)t[0]===$t&&e(this[t],t.slice(1),this)}};var Ft=jt.prototype;Bt.prototype={constructor:Bt,has:Ft.has,add:function(e){return this[$t+(e+="")]=e,this},remove:Ft.remove,clear:Ft.clear,values:Ft.keys,size:Ft.size,empty:Ft.empty,each:Ft.each};var Ht=Array.prototype,Vt=Ht.map,Ut=Ht.slice;function Yt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Xt(){}var Gt=.7,Kt=1/Gt,Jt="\\s*([+-]?\\d+)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",en=/^#([0-9a-f]{3})$/,tn=/^#([0-9a-f]{6})$/,nn=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),rn=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),on=new RegExp("^rgba\\("+[Jt,Jt,Jt,Zt]+"\\)$"),an=new RegExp("^rgba\\("+[Qt,Qt,Qt,Zt]+"\\)$"),sn=new RegExp("^hsl\\("+[Zt,Qt,Qt]+"\\)$"),ln=new RegExp("^hsla\\("+[Zt,Qt,Qt,Zt]+"\\)$"),un={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 cn(e){var t;return e=(e+"").trim().toLowerCase(),(t=en.exec(e))?new fn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=tn.exec(e))?dn(parseInt(t[1],16)):(t=nn.exec(e))?new fn(t[1],t[2],t[3],1):(t=rn.exec(e))?new fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=on.exec(e))?mn(t[1],t[2],t[3],t[4]):(t=an.exec(e))?mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=sn.exec(e))?yn(t[1],t[2]/100,t[3]/100,1):(t=ln.exec(e))?yn(t[1],t[2]/100,t[3]/100,t[4]):un.hasOwnProperty(e)?dn(un[e]):"transparent"===e?new fn(NaN,NaN,NaN,0):null}function dn(e){return new fn(e>>16&255,e>>8&255,255&e,1)}function mn(e,t,n,r){return r<=0&&(e=t=n=NaN),new fn(e,t,n,r)}function hn(e){return e instanceof Xt||(e=cn(e)),e?new fn((e=e.rgb()).r,e.g,e.b,e.opacity):new fn}function pn(e,t,n,r){return 1===arguments.length?hn(e):new fn(e,t,n,null==r?1:r)}function fn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function gn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function yn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vn(e,t,n,r)}function vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function bn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Yt(Xt,cn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Yt(fn,pn,Wt(Xt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Gt:Math.pow(Gt,e),new fn(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"#"+gn(this.r)+gn(this.g)+gn(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+")")}})),Yt(vn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof vn)return new vn(e.h,e.s,e.l,e.opacity);if(e instanceof Xt||(e=cn(e)),!e)return new vn;if(e instanceof vn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new vn(a,s,l,e.opacity)}(e):new vn(e,t,n,null==r?1:r)}),Wt(Xt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Gt:Math.pow(Gt,e),new vn(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,i=2*n-r;return new fn(bn(e>=240?e-240:e+120,i,r),bn(e,i,r),bn(e<120?e+240:e-120,i,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 xn=Math.PI/180,Sn=180/Math.PI,En=.96422,Mn=1,Cn=.82521,Tn=4/29,On=6/29,An=3*On*On,Rn=On*On*On;function wn(e){if(e instanceof Nn)return new Nn(e.l,e.a,e.b,e.opacity);if(e instanceof Dn){if(isNaN(e.h))return new Nn(e.l,0,0,e.opacity);var t=e.h*xn;return new Nn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof fn||(e=hn(e));var n,r,i=Pn(e.r),o=Pn(e.g),a=Pn(e.b),s=In((.2225045*i+.7168786*o+.0606169*a)/Mn);return i===o&&o===a?n=r=s:(n=In((.4360747*i+.3850649*o+.1430804*a)/En),r=In((.0139322*i+.0971045*o+.7141733*a)/Cn)),new Nn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Nn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function In(e){return e>Rn?Math.pow(e,1/3):e/An+Tn}function kn(e){return e>On?e*e*e:An*(e-Tn)}function Ln(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Pn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Dn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Yt(Nn,(function(e,t,n,r){return 1===arguments.length?wn(e):new Nn(e,t,n,null==r?1:r)}),Wt(Xt,{brighter:function(e){return new Nn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Nn(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 fn(Ln(3.1338561*(t=En*kn(t))-1.6168667*(e=Mn*kn(e))-.4906146*(n=Cn*kn(n))),Ln(-.9787684*t+1.9161415*e+.033454*n),Ln(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Yt(Dn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Dn)return new Dn(e.h,e.c,e.l,e.opacity);if(e instanceof Nn||(e=wn(e)),0===e.a&&0===e.b)return new Dn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Sn;return new Dn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Dn(e,t,n,null==r?1:r)}),Wt(Xt,{brighter:function(e){return new Dn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Dn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return wn(this).rgb()}}));var qn=-.14861,zn=1.78277,$n=-.29227,_n=-.90649,jn=1.97294,Bn=jn*_n,Fn=jn*zn,Hn=zn*$n-_n*qn;function Vn(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Un)return new Un(e.h,e.s,e.l,e.opacity);e instanceof fn||(e=hn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Hn*r+Bn*t-Fn*n)/(Hn+Bn-Fn),o=r-i,a=(jn*(n-i)-$n*o)/_n,s=Math.sqrt(a*a+o*o)/(jn*i*(1-i)),l=s?Math.atan2(a,o)*Sn-120:NaN;return new Un(l<0?l+360:l,s,i,e.opacity)}(e):new Un(e,t,n,null==r?1:r)}function Un(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Yn(e){return function(){return e}}function Wn(e,t){return function(n){return e+n*t}}function Xn(e){return 1==(e=+e)?Gn: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):Yn(isNaN(t)?n:t)}}function Gn(e,t){var n=t-e;return n?Wn(e,n):Yn(isNaN(e)?t:e)}Yt(Un,Vn,Wt(Xt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new Un(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Gt:Math.pow(Gt,e),new Un(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*xn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new fn(255*(t+n*(qn*r+zn*i)),255*(t+n*($n*r+_n*i)),255*(t+n*(jn*r)),this.opacity)}}));var Kn=function e(t){var n=Xn(t);function r(e,t){var r=n((e=pn(e)).r,(t=pn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Gn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Jn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=ir(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Zn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Qn(e,t){return t-=e=+e,function(n){return e+t*n}}function er(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=ir(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var tr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nr=new RegExp(tr.source,"g");function rr(e,t){var n,r,i,o=tr.lastIndex=nr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=tr.exec(e))&&(r=nr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Qn(n,r)})),o=nr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function ir(e,t){var n,r=typeof t;return null==t||"boolean"===r?Yn(t):("number"===r?Qn:"string"===r?(n=cn(t))?(t=n,Kn):rr:t instanceof cn?Kn:t instanceof Date?Zn:Array.isArray(t)?Jn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?er:Qn)(e,t)}function or(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ar(e){return function t(n){function r(t,r){var i=e((t=Vn(t)).h,(r=Vn(r)).h),o=Gn(t.s,r.s),a=Gn(t.l,r.l),s=Gn(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function sr(e){return+e}ar((function(e,t){var n=t-e;return n?Wn(e,n>180||n<-180?n-360*Math.round(n/360):n):Yn(isNaN(e)?t:e)})),ar(Gn);var lr=[0,1];function ur(e){return e}function cr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function dr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function mr(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=cr(i,r),o=n(a,o)):(r=cr(r,i),o=n(o,a)),function(e){return o(r(e))}}function hr(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=cr(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=It(e,t,1,r)-1;return o[n](i[n](t))}}function pr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fr(e,t){return function(){var e,t,n,r,i,o,a=lr,s=lr,l=ir,u=ur;function c(){return r=Math.min(a.length,s.length)>2?hr:mr,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),Qn)))(n)))},d.domain=function(e){return arguments.length?(a=Vt.call(e,sr),u===ur||(u=dr(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Ut.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Ut.call(e),l=or,c()},d.clamp=function(e){return arguments.length?(u=e?dr(a):ur,d):u!==ur},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function gr(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)]}function yr(e){return(e=gr(Math.abs(e)))?e[1]:NaN}var vr,br=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xr(e){return new Sr(e)}function Sr(e){if(!(t=br.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 Er(e,t){var n=gr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}xr.prototype=Sr.prototype,Sr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Mr={"%":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 Er(100*e,t)},r:Er,s:function(e,t){var n=gr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(vr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+gr(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Cr(e){return e}var Tr,Or,Ar,Rr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):Cr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Cr,s=e.percent||"%";function l(e){var t=(e=xr(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,m=e.comma,h=e.precision,p=e.trim,f=e.type;"n"===f?(m=!0,f="g"):Mr[f]||(null==h&&(h=12),p=!0,f="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?i[0]:"#"===u&&/[boxX]/.test(f)?"0"+f.toLowerCase():"",y="$"===u?i[1]:/[%p]/.test(f)?s:"",v=Mr[f],b=/[defgprs%]/.test(f);function x(e){var i,s,u,x=g,S=y;if("c"===f)S=v(e)+S,e="";else{var E=(e=+e)<0;if(e=v(Math.abs(e),h),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),x=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===f?Rr[8+vr/3]:"")+S+(E&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){S=(46===u?o+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}m&&!c&&(e=r(e,1/0));var M=x.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(m&&c&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=x+e+S+C;break;case"=":e=x+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+x+e+S+C.slice(M);break;default:e=C+x+e+S}return a(e)}return h=null==h?6:/[gprs]/.test(f)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=xr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(yr(t)/3))),i=Math.pow(10,-r),o=Rr[8+r/3];return function(e){return n(i*e)+o}}}}function Nr(e,t,n,r){var i,o=qt(e,t,n);switch((r=xr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yr(t)/3)))-yr(Math.abs(e)))}(o,a))||(r.precision=i),Ar(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yr(t)-yr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-yr(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Or(r)}function Ir(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Dt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Nr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=Dt(s,l,n))>0?r=Dt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Dt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function kr(){var e=fr(ur,ur);return e.copy=function(){return pr(e,kr())},zt.apply(e,arguments),Ir(e)}Tr=wr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Or=Tr.format,Ar=Tr.formatPrefix;var Lr=new Date,Pr=new Date;function Dr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Dr((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&&(i.count=function(t,r){return Lr.setTime(+t),Pr.setTime(+r),e(Lr),e(Pr),Math.floor(n(Lr,Pr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var qr=Dr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));qr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Dr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):qr:null},qr.range;var zr=1e3,$r=6e4,_r=36e5,jr=864e5,Br=6048e5,Fr=Dr((function(e){e.setTime(Math.floor(e/zr)*zr)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getUTCSeconds()}));Fr.range;var Hr=Dr((function(e){e.setTime(Math.floor(e/$r)*$r)}),(function(e,t){e.setTime(+e+t*$r)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getMinutes()}));Hr.range;var Vr=Dr((function(e){var t=e.getTimezoneOffset()*$r%_r;t<0&&(t+=_r),e.setTime(Math.floor((+e-t)/_r)*_r+t)}),(function(e,t){e.setTime(+e+t*_r)}),(function(e,t){return(t-e)/_r}),(function(e){return e.getHours()}));Vr.range;var Ur=Dr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/jr}),(function(e){return e.getDate()-1}));function Yr(e){return Dr((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-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/Br}))}Ur.range;var Wr=Yr(0),Xr=Yr(1),Gr=Yr(2),Kr=Yr(3),Jr=Yr(4),Zr=Yr(5),Qr=Yr(6);Wr.range,Xr.range,Gr.range,Kr.range,Jr.range,Zr.range,Qr.range;var ei=Dr((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()}));ei.range;var ti=Dr((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()}));ti.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dr((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},ti.range;var ni=Dr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*$r)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getUTCMinutes()}));ni.range;var ri=Dr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*_r)}),(function(e,t){return(t-e)/_r}),(function(e){return e.getUTCHours()}));ri.range;var ii=Dr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getUTCDate()-1}));function oi(e){return Dr((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)/Br}))}ii.range;var ai=oi(0),si=oi(1),li=oi(2),ui=oi(3),ci=oi(4),di=oi(5),mi=oi(6);ai.range,si.range,li.range,ui.range,ci.range,di.range,mi.range;var hi=Dr((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()}));hi.range;var pi=Dr((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 fi(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 gi(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 yi(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}pi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dr((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},pi.range;var vi,bi,xi,Si={"-":"",_:" ",0:"0"},Ei=/^\s*\d+/,Mi=/^%/,Ci=/[\\^$*+?|[\]().{}]/g;function Ti(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Oi(e){return e.replace(Ci,"\\$&")}function Ai(e){return new RegExp("^(?:"+e.map(Oi).join("|")+")","i")}function Ri(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function wi(e,t,n){var r=Ei.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ni(e,t,n){var r=Ei.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ii(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ki(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Li(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Pi(e,t,n){var r=Ei.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Di(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qi(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 zi(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $i(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function _i(e,t,n){var r=Ei.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ji(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Bi(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Fi(e,t,n){var r=Ei.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Hi(e,t,n){var r=Ei.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vi(e,t,n){var r=Ei.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ui(e,t,n){var r=Mi.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Yi(e,t,n){var r=Ei.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wi(e,t,n){var r=Ei.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Xi(e,t){return Ti(e.getDate(),t,2)}function Gi(e,t){return Ti(e.getHours(),t,2)}function Ki(e,t){return Ti(e.getHours()%12||12,t,2)}function Ji(e,t){return Ti(1+Ur.count(ti(e),e),t,3)}function Zi(e,t){return Ti(e.getMilliseconds(),t,3)}function Qi(e,t){return Zi(e,t)+"000"}function eo(e,t){return Ti(e.getMonth()+1,t,2)}function to(e,t){return Ti(e.getMinutes(),t,2)}function no(e,t){return Ti(e.getSeconds(),t,2)}function ro(e){var t=e.getDay();return 0===t?7:t}function io(e,t){return Ti(Wr.count(ti(e),e),t,2)}function oo(e,t){var n=e.getDay();return e=n>=4||0===n?Jr(e):Jr.ceil(e),Ti(Jr.count(ti(e),e)+(4===ti(e).getDay()),t,2)}function ao(e){return e.getDay()}function so(e,t){return Ti(Xr.count(ti(e),e),t,2)}function lo(e,t){return Ti(e.getFullYear()%100,t,2)}function uo(e,t){return Ti(e.getFullYear()%1e4,t,4)}function co(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ti(t/60|0,"0",2)+Ti(t%60,"0",2)}function mo(e,t){return Ti(e.getUTCDate(),t,2)}function ho(e,t){return Ti(e.getUTCHours(),t,2)}function po(e,t){return Ti(e.getUTCHours()%12||12,t,2)}function fo(e,t){return Ti(1+ii.count(pi(e),e),t,3)}function go(e,t){return Ti(e.getUTCMilliseconds(),t,3)}function yo(e,t){return go(e,t)+"000"}function vo(e,t){return Ti(e.getUTCMonth()+1,t,2)}function bo(e,t){return Ti(e.getUTCMinutes(),t,2)}function xo(e,t){return Ti(e.getUTCSeconds(),t,2)}function So(e){var t=e.getUTCDay();return 0===t?7:t}function Eo(e,t){return Ti(ai.count(pi(e),e),t,2)}function Mo(e,t){var n=e.getUTCDay();return e=n>=4||0===n?ci(e):ci.ceil(e),Ti(ci.count(pi(e),e)+(4===pi(e).getUTCDay()),t,2)}function Co(e){return e.getUTCDay()}function To(e,t){return Ti(si.count(pi(e),e),t,2)}function Oo(e,t){return Ti(e.getUTCFullYear()%100,t,2)}function Ao(e,t){return Ti(e.getUTCFullYear()%1e4,t,4)}function Ro(){return"+0000"}function wo(){return"%"}function No(e){return+e}function Io(e){return Math.floor(+e/1e3)}!function(e){vi=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ai(i),c=Ri(i),d=Ai(o),m=Ri(o),h=Ai(a),p=Ri(a),f=Ai(s),g=Ri(s),y=Ai(l),v=Ri(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Xi,e:Xi,f:Qi,H:Gi,I:Ki,j:Ji,L:Zi,m:eo,M:to,p:function(e){return i[+(e.getHours()>=12)]},Q:No,s:Io,S:no,u:ro,U:io,V:oo,w:ao,W:so,x:null,X:null,y:lo,Y:uo,Z:co,"%":wo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:mo,e:mo,f:yo,H:ho,I:po,j:fo,L:go,m:vo,M:bo,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:No,s:Io,S:xo,u:So,U:Eo,V:Mo,w:Co,W:To,x:null,X:null,y:Oo,Y:Ao,Z:Ro,"%":wo},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=m[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=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:$i,e:$i,f:Vi,H:ji,I:ji,j:_i,L:Hi,m:zi,M:Bi,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:Yi,s:Wi,S:Fi,u:Ni,U:Ii,V:ki,w:wi,W:Li,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Di,Y:Pi,Z:qi,"%":Ui};function E(e,t){return function(n){var r,i,o,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!=(i=Si[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=yi(1900);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=gi(yi(o.y))).getUTCDay(),r=i>4||0===i?si.ceil(r):si(r),r=ii.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(yi(o.y))).getDay(),r=i>4||0===i?Xr.ceil(r):Xr(r),r=Ur.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?gi(yi(o.y)).getUTCDay():t(yi(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,gi(o)):t(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in Si?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",fi);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,gi);return t.toString=function(){return e},t}}}(e),vi.format,vi.parse,bi=vi.utcFormat,xi=vi.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"]});var ko="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||bi(ko),+new Date("2000-01-01T00:00:00.000Z")||xi(ko);var Lo=1e3,Po=60*Lo,Do=60*Po,qo=24*Do,zo=7*qo,$o=30*qo,_o=365*qo;function jo(e){return new Date(e)}function Bo(e){return e instanceof Date?+e:+new Date(+e)}function Fo(e,t,n,r,i,o,a,s,l){var u=fr(ur,ur),c=u.invert,d=u.domain,m=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,Lo],[a,5,5*Lo],[a,15,15*Lo],[a,30,30*Lo],[o,1,Po],[o,5,5*Po],[o,15,15*Po],[o,30,30*Po],[i,1,Do],[i,3,3*Do],[i,6,6*Do],[i,12,12*Do],[r,1,qo],[r,2,2*qo],[n,1,zo],[t,1,$o],[t,3,3*$o],[e,1,_o]];function S(s){return(a(s)<s?m:o(s)<s?h:i(s)<s?p:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function E(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Nt((function(e){return e[2]})).right(x,o);a===x.length?(i=qt(n/_o,r/_o,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(qt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Vt.call(e,Bo)):d().map(jo)},u.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=E(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?S:l(t)},u.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):u},u.copy=function(){return pr(u,Fo(e,t,n,r,i,o,a,s,l))},u}function Ho(){return zt.apply(Fo(pi,hi,ai,ii,ri,ni,Fr,qr,bi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Vo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Uo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var Yo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Vo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Uo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Uo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Wo({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Xo;function Go(){Xo=Xo||document.createElement("canvas").getContext("2d")}const Ko={measureTextWidth(e){Go();const{width:t}=Xo.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Go();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Xo.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[h]=m,c="",i=1;i<m.length;i++)if(l=`${h} ${m[i]}`,u=Ko.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=m[i]):h=l,"number"==typeof r&&s.length>=r){c=m.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${c}`}return s},wordWrap(e,t,n,r,i){if(Go(),!e||!e.length)return[];n&&(Xo.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||Ko.measureTextWidth(u)<=t?o.push(u):(s=Ko.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Ko.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=Ko.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&Ko.measureTextWidth(u)>t&&(o[o.length-1]=Ko.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){Go();let i,o,a,s,l=e;const u=Ko.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Xo.font=n),e&&t){if(Ko.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Ko.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Go();let o,a=e,s="",l=[];if(Ko.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Ko.measureTextWidth(a)<=t));i--);return(!i&&!a||Ko.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Ko.measureTextWidth(s)>t?(s=Ko.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Go(),e&&t?(n&&(Xo.font=n),Ko.explodeWord(e,t,r,Math.max(1,Ko.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Ko.lineWrap(e,t,n,r):[e],o=Ko.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Go(),e&&(Xo.font=e),1.5*Ko.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Go(),t&&(Xo.font=t);const s=Ko.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(r)||r<=0?m:Math.min(m,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Ko.wrapText(e,i,t,u[n])))})):d=Ko.wrapText(e,i,t,u[0],n),d}},Jo={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(ie({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},Zo=ie.bind(null,!0),Qo={},{isArray:ea}=Array;function ta(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function na(e){return void 0===e}function ra(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ia(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=na(e[r||t])?o:e[t],e=e[r||t]})),e}function oa(e,t){let n=!0;if(ta(e)&&ta(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oa(e[r],t[r])||(n=!1)})),n);if(ea(e)&&ea(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oa(e[n],t[n]))return!1;return!0}return e===t}Qo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Zo({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;oa(o,a)||ra(t,i)||(na(a)?r.push({op:"add",path:s,value:o}):ta(o)&&ta(a)?r=r.concat(Qo.generate(a,o,s)):ea(o)&&ea(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&na(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(oa(t,i))return r;if(!na(t[0])&&na(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(Qo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{na(t[i])&&!ra(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},Qo.apply=function(e,t){t.forEach((t=>{let n=ia(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(ea(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(ea(i)&&ea(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(ta(i)&&ta(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ra(a,e)&&delete a[e]})),Zo(i,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 i=ia(e,t.from);ea(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(ea(n)?n.splice(+r,1):delete n[r]);var a}))},Qo.clone=function(e){return Zo({},e)},Qo.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},Qo.updateObject=function(e,t){Object.keys(e).length?Qo.apply(e,Qo.generate(e,t)):Zo(e,t)};const aa=[[2,4,6],[2,4],[3]],sa=[,[,,[[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 la(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function ua(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)la(e[r],t,n)}!function(){let e,t;for(ua(aa,1,10),e=0;e<sa.length;e++)if(sa[e])for(t=0;t<sa[e].length;t++)Array.isArray(sa[e][t])&&ua(sa[e][t])}();const ca={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=ca.findSegmentPositionMeetMin(e,t);return ca.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=ca.findSegmentPositionMeetMax(e,n);return ca.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=ca.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=ca.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,ca.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)ca.layoutPositionFromMin(e,t,n,r),ca.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=ca.findSegmentPositionMeetMaxThenMin(r,t,n)}}},da=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},ma=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,ha=e=>e.filter(ma),pa=(e,t)=>ha(fe.getValue(e,t,[])),fa=e=>ma(e)&&(!1!==e.showValue||!1!==e.showLabel),ga=e=>e.filter(fa),ya=(e,t)=>ga(fe.getValue(e,t,[])),va=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ba=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},xa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},Sa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},Ea=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ma=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ca={isRefLineVisible:ma,getVisibleRefLines:ha,getRefLines:pa,getMeasureRefLines:e=>pa(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:pa(e,"refLine.dimRefLines"),isRefLineLabelVisible:fa,getVisibleRefLineLabels:ga,getRefLineLabels:ya,getMeasureRefLineLabels:e=>ya(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ya(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=da(s,i,o,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let u;return l=da(s,i,o,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===u?s(n):u)+l}return l=da(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=fe.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():fe.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=fe.getValue(l,u,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():i?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],i=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),o},getInputValue:va,extractInfoFromInputValue:ba,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=va({refLineLayout:e,layoutService:n});return ba(r,t,"id")},isDiscreteMinOutOfBounds:xa,isDiscreteMaxOutOfBounds:Sa,isContinuousMinOutOfBounds:Ea,isContinuousMaxOutOfBounds:Ma,isOutOfRange:({value:e,qMin:t,qMax:n})=>Ea({value:e,qMin:t})||Ma({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Sa({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&xa({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Ta="…";function Oa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines=Ko.tokenize(i.title,t,`${Ta} ${i.valueString}`,3,n),i.maxNumLines=i.lines.length}}function Aa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Ko.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function Ra({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>Aa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function wa(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Na=3,Ia=2;function ka({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const La=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ca.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ca.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ca.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ca.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Pa={hasEngineFormat:ka,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=Ca.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{canBeContinuous:d}=r.meta;let m,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,p=La({label:o,dataPages:c,qMin:m,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Ca.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=ka({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,r.title=Pa.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=ka({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,n.title=Pa.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,n.title=Pa.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=Pa.getTotalNumLines(e)-r;if(t<=0)return;Pa.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Pa.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map((e=>e)),y=n;Pa.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:c,rtl:m,isContinuous:p,isDimension:f}),wa(e,"center"),Pa.addLabelsNeighborInfo(e,r,i,o),Oa(e,a,s),Pa.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===c&&(Pa.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=Ko.tokenize(i.title,t,`${Ta} ${i.valueString}`,i.maxNumLines,n))}}(e,a,s)),Pa.addLabelsSize(e,s,l,d),Pa.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=r,{minorCenter:c}=i,{fontSize:d,fontFamily:m,background:h}=t;let p=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const h={type:"text",text:t,title:Aa({title:e.title,font:a,ellipsis:`… ${e.valueString}`}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:u};return h[l]=c,h[s]=e.segment.position,h.y+=(i-(r-1)/2)*o,h}));e.background&&p.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=Na,padding:u={}}=a,{top:c=Ia,bottom:d=Ia,left:m=Ia,right:h=Ia}=u,p=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(m+h),height:i.height+(c+d),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+m,f.y-=p*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:h})),p=p.concat(i)})),p}};function Da(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function qa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return Pa.getMaxTextWidth(e)>a&&(Oa(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+i+o}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,Pa.getMaxTextWidth(e))+n+r}(t,n)}function za(e,t){return t?e.domain():[0,1]}function $a(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function _a(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function ja(e,t){return e>9?t[1]:t[0]}function Ba({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:h,minorDimension:p,dock:f}=s,g=i[p],y=Jo.createOob({oob:Jo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=f;const v=`c${m}`,b=`c${h}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};x[b]=g/2,x[v]=a;const S={type:"text",text:c>9?"9+":c,title:Ra({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return S[h]=g/2,S[m]=a,[y,x,S]}function Fa(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Ko.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const Ha=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var Va={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Ha(this.settings.labels),s=Da(this.chart,this.settings.formatter,e);Pa.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=za(t,n);return $a(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return $a(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Fa(t.label),{dock:n}=this.settings.layout;return Pa.measureLabelsWidth(c,this.measureText),d=qa(n,c,e),d}const m=_a(this.measureText),h=l?ja(l,m):0,p=u?ja(u,m):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,u=Ha(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),p=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,m),{orientation:f,majorDimension:g}=h,{majorSize:y}=p,{font:v,lineHeight:b,gap:x,maxLabelWidth:S}=Fa(n.label),E=Da(this.chart,this.settings.formatter,e),M=y;Pa.addLabelTitles({labels:u,formatter:E,isContinuous:o,canBeContinuous:l,localeInfo:s}),Pa.calculateLabelPositions({labels:u,scale:e,size:M,layoutService:r,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[C,T]=za(e,o),{filteredLabels:O,lowerOobs:A,upperOobs:R,lowerCircleSize:w,upperCircleSize:N,lowerOobSpace:I,upperOobSpace:k}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=$a(e,t,n,u),h="scaledValue"!==u&&Ca.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,c,h),f=function(e,t,n){return n?e:t}(d,c,h),g=p.length,y=f.length,v=_a(l),b=ja(g,v),x=ja(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),E=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:m,lowerOobs:p,upperOobs:f,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:E}}({labels:u,minValue:C,maxValue:T,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),L=I,P=y-k;wa(A),wa(R);const D=Ba({alignment:0,dockValue:0,oobs:A,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+w/2,areaProps:h,radius:w/2,font:v}),q=Ba({alignment:1,dockValue:1,oobs:R,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:h,radius:N/2,font:v});Pa.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:L,upperLimit:P,font:v,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),ca.layout(O.map((e=>e.segment)),L,P,n.label.gap);const z=O.filter((e=>ca.isInside(e.segment,L,P,o)));return Pa.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:h,area:p,lineHeight:b,font:v,theme:i}).concat([...D,...q])}};var Ua={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Ya(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=ie(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=Ua;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var Wa={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,u=a.y-s.y,c=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Ya(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Ya(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Xa,extractInfoFromInputValue:Ga,resolveValue:Ka}=Ca;var Ja={resolveValue:Ka,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Xa({refLineLayout:e,layoutService:n});return Ga(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Xa({refLineLayout:e,layoutService:n});return Ga(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=Xa({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Xa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Za=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,h;const p={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):(p.valueInfo=Ja.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),p.value=()=>{var e;const i=Ca.getScaledPosition({scale:a.scale(s),value:Ja.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:p.valueInfo,size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i}),p};function Qa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!p.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Wa.lines.trackBy,compensateForLayoutChanges:Wa.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!u),y=!e||n.meta.isContinuous;return p.forEach((o=>{f.lines[l].push(Za({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),f}const es={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}},ts=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:u,theme:c,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:u?2:4,right:u?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Wa.refLineLabels.trackBy,compensateForLayoutChanges:Wa.refLineLabels.compensateForLayoutChanges}}),ns=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>Ja.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ja.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ja.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l};function rs({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const f=[],g=!e||n.meta.isContinuous,y=p.map((e=>ns({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:u,isContinuous:g})));return f.push(ts({isDimension:e,rtl:d,style:ie(!0,es,s),dock:o,key:m,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:u,isContinuous:g,localeInfo:c})),f}function is({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=be.dimensionless(o),l=Ca.getMeasureRefLines(o),u=Ca.getDimensionRefLines(o,s),c=Ca.getMeasureRefLineLabels(o),d=Ca.getDimensionRefLineLabels(o,s);let m={},h={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=Ca.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return Ca.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return Ca.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:e=>Ca.getRefLines(o,e),getRefLineLabels:e=>Ca.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(m=Ca.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,u.forEach((t=>{const n=Ca.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return f.update(),f}var os={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},as={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const ss={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 ls(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const us={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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=o[t]*(n>l?1:n/l),c=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(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=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function cs(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;let a,s,l,u,c,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var m;if(a=e.session.options||(null===(m=e.enigmaModel)||void 0===m?void 0:m.session.sessionConfig),!a){var h;a=null===(h=e.session)||void 0===h?void 0:h.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",u=a.port?`:${a.port}`:"",c=a.prefix?a.prefix:"/","/"!==c[c.length-1]&&(c=`${c}/`),s+l+u+c}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await us.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function ds(e,t,n,r){var i,o,a,s,l,u;const{app:c,flags:d}=t,m=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!m)return[];const[h]=m,p=h.size||"small",f=h.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.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"===f&&null!==(l=h.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return cs(h,p,c);if("url"===f)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&ls(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await us.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await us.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(c,d,h,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===f&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(ls(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await us.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(c,n[g],p,v)}return[]}const ms={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(ds(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},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}},hs={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await ms.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>ms.checkIfPromisesExist({customTooltipModel:e})};const ps=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:ss.CHART.CHART_PARENT_TYPE,qId:ss.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},fs=e=>{var t,n,r;const i=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:ss.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const gs={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,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=ss.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:ss.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:i,rtl:o})=>{var a,s,l;const u=i,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 gs.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=ss.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=ss.CHART.STATE,a=ps(t,o),s=await e.createSessionObject(a),l=fs(t);if(s.id!==ss.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,m,h,p;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(m=n[0].data)||void 0===m?void 0:m.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var f,g;const e=null!==(f=n[0].data.selectionOuterDimension)&&void 0!==f?f: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(ss.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(h=u.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(p=u.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await gs.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(gs.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ss.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=ss.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({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 ys(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function vs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=ss.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function bs(e){const t=vs();return e.filter((e=>t[e.id]))}const xs={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=xs.getAttrExprData(a);o.length||n.length?hs.handlePromises({customTooltipModel:i,nodes:xs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&gs.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>hs.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.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[ss.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[ss.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[ss.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(bs(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[ss.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[ss.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ys(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===bs(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=ys(e)||[];[...i,t].forEach((e=>{const t=bs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=vs(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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:Ae.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ae.detectTextDirection(e.src),r=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Ss(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[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 i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case ss.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ss.CUSTOM.TITLE:case ss.CUSTOM.DESCRIPTION:case ss.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const Es={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Ss(t,e,r,n)}}};const Ms={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[ss.CUSTOM.TITLE]:!0,[ss.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=xs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ss.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===ss.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Re.getMeasure(e,t))),e,o)}};function Cs({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(Ms.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ts}=ss;function Os({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:u}){const c={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:xs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=()=>{var e,n;const r=!(null===(e=c.properties)||void 0===e||null===(n=e.qHyperCubeDef)||void 0===n||!n.qDimensions.some((e=>{var t,n;return null===(t=e.qCalcCondition)||void 0===t||null===(n=t.qCond)||void 0===n?void 0:n.qv})));return!(!t.tooltip||t.tooltip.auto||r)};return{setProperties:e=>{c.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&E(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=Cs({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ts.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ts.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>xs.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>xs.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const i=xs.getDataNodes(o,r),{attrExps:a}=xs.getAttrExprData(t);return hs.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(n=e.chart)&&void 0!==n&&null!==(i=n.object)&&void 0!==i&&i.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e,n,i},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>gs.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>xs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>gs.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>gs.hide({app:n,customTooltipModel:d}),destroy:()=>gs.destroyVisualization({customTooltipModel:d})}}}function As({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===as.TYPE.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:Es.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Rs({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:Es.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function ws({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===as.TYPE.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Ns={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Is={OPTIONS:Ns,DEFAULT:Ns.MINI_CHART};function ks({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Ls({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ps=e=>({miniChart:e===Is.OPTIONS.MINI_CHART.value,bar:e===Is.OPTIONS.BAR.value,none:e===Is.OPTIONS.NONE.value}),Ds=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ps(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ps(Is.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Ps(!n&&(r||!r&&i)?Is.OPTIONS.NONE.value:Is.OPTIONS.MINI_CHART.value)};function qs({layoutService:e,override:t}){const n=Ds({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Is.OPTIONS.MINI_CHART.value,n.bar=t.value===Is.OPTIONS.BAR.value,n.none=t.value===Is.OPTIONS.NONE.value),n}function zs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,h=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[y,v]=Ls({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:f,relative:g,thumb:S?f-y*p:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function $s({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=Ls({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(m-d)*c}}}function _s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=zs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=$s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const js="data-scrollbar-handle";function Bs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(js)||""}const Fs="scrollbarResize",Hs=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Vs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=zs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Fs}`,options:{event:Fs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Fs]=this[Fs]||{},Hs(t)&&Bs({e:t})&&(this[Fs].panningEvent=t.srcEvent),!!this[Fs].panningEvent))}},events:{[`${Fs}start`](n){n.preventDefault(),this[Fs]=this[Fs]||{},this[Fs].panningEvent&&t.component(e).emit("dragStart",this[Fs].panningEvent)},[`${Fs}move`](n){if(n.preventDefault(),this[Fs]=this[Fs]||{},!this[Fs].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Bs({e:this[Fs].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;m===h&&(m-="start"===d?u:0,h+="end"===d?u:0),r.set("zoom",{min:m,max:h}),t.component(e).emit("render")},[`${Fs}end`](n){n.preventDefault(),this[Fs]=this[Fs]||{},delete this[Fs].panningEvent,t.component(e).emit("dragEnd")},[`${Fs}cancel`](n){n.preventDefault(),this[Fs]=this[Fs]||{},delete this[Fs].panningEvent,t.component(e).emit("dragEnd")}}}}const Us="scrollbarPan";function Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=zs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=$s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Us}`,options:{event:Us,threshold:0,enable(r,i){return this[Us]=this[Us]||{},!(i&&!this[Us].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{[`${Us}start`](n){n.preventDefault();const a=u(n);if(this[Us]=this[Us]||{},this[Us].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Us].relative=a.relative,this[Us].zoom=r.get("zoom"),this[Us].zoom.span=this[Us].zoom.max-this[Us].zoom.min,this[Us].zoom.fullSpan=o-n}else if(a.onThumb)this[Us].offset=a.thumb;else{const e=c();this[Us].offset=a.beforeThumb?0:e.thumbSize}},[`${Us}move`](n){n.preventDefault();const a=u(n);if(this[Us]=this[Us]||{},o.meta.isContinuous){const e=a.relative-this[Us].relative,{fullSpan:t,span:n,min:o,max:s}=this[Us].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Us].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Us}end`](n){n.preventDefault(),this[Us]=this[Us]||{},this[Us].isPanning=!1,t.component(e).emit("unlockState")},[`${Us}cancel`](n){n.preventDefault(),this[Us]=this[Us]||{},this[Us].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[_s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Vs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Xs({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Gs={background:"rgba(0, 0, 0, 0.1)"},Ks={top:-1,bottom:-1,width:6},Js={width:2,background:"#595959"};var Zs={before:Gs,after:Gs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ks,endHandle:Ks,startHandleBorder:Js,endHandleBorder:Js};const Qs={background:"rgba(0, 0, 0, 0.1)"},el={top:-1,bottom:-1,width:6},tl={width:2,background:"#595959"};var nl={before:Qs,after:Qs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:el,endHandle:el,startHandleBorder:tl,endHandleBorder:tl};const rl={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},il={pointerEvents:"initial"},ol={pointerEvents:"none"};const al="ew-resize",sl="default";function ll(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function ul(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?al:sl}function cl(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function dl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function ml(){const{size:e,start:t,end:n}=ll.call(this);this.renderer.render(this.elements(this.h,cl.call(this,e,t,n)))}function hl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?nl:Zs;return{container:{...rl},before:{...rl,...n.before,...t.before},after:{...rl,...n.after,...t.after},thumb:{...rl,...n.thumb,...t.thumb},startHandle:{...rl,...il,...n.startHandle},endHandle:{...rl,...il,...n.endHandle},startHandleBorder:{...rl,...ol,...n.startHandleBorder},endHandleBorder:{...rl,...ol,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var pl={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){ml.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!dl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Bs({e:e});t&&(this.state.hover[t]=!0),ul.call(this),ml.call(this)},leave(){this.state.locked||(this.state.hover.reset(),ul.call(this),ml.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Bs({e:e});t&&(this.state.drag[t]=!0),ul.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),ul.call(this),ml.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=ll.call(this);return this.elements(e,cl.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-n},m={[i.start]:r},h={left:-3},p={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?f:h},class:"scrollbar--start-handle",[js]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?h:f},class:"scrollbar--end-handle",[js]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...c])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:hl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function fl({layoutService:e}){return e.meta.isContinuous&&qs({layoutService:e}).miniChart}function gl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(as.TYPE.LINE),l=[...Rs({forceCreate:!0,key:os.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Rs({key:os.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Rs({key:os.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...As({key:os.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...As({key:os.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...ws({key:os.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...ws({key:os.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return fl(e)&&(l.push(...Rs({key:os.COLLECTION.REDUCED,source:os.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Rs({key:os.COLLECTION.REDUCED_PRIMARY,source:os.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Rs({key:os.COLLECTION.REDUCED_SECONDARY,source:os.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...As({key:os.COLLECTION.REDUCED_STACKED_PRIMARY,source:os.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===as.TYPE.BAR)),colorService:i})),l.push(...As({key:os.COLLECTION.REDUCED_STACKED_SECONDARY,source:os.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===as.TYPE.BAR)),colorService:i}))),l}const yl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function vl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const bl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:yl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:vl({models:e})}},xl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:yl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:vl({models:e})}};function Sl({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function El({viewCache:e,mainMajor:t}){return ie(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function Ml({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Cl({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,d=l.getStyles(),m={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:Ml({viewState:t,viewCache:n,layoutService:o})};return{[os.SCALE.MAJOR]:ie(!0,{},m,{ticks:{level:"outer"}}),[os.SCALE.MAJOR_INNER]:ie(!0,{},m,{ticks:{level:"inner"}})}}function Tl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Cl({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[os.SCALE.MAJOR]:Sl({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[os.SCALE.MAJOR]:xl({models:t,environment:i})}:{[os.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?xl({models:t,environment:i}):bl({models:t,environment:i})};return fl(t)?{...a,[os.SCALE.REDUCED]:El({viewCache:r,mainMajor:a[os.SCALE.MAJOR]})}:a}function Ol({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Al({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!fl({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function Rl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Tl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[os.SCALE.MINOR.PRIMARY]:Ol({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[os.SCALE.MINOR.SECONDARY]:Ol({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[os.SCALE.MINOR.REDUCED_PRIMARY]:Al({layoutService:o,tickModel:s,dockService:c,environment:i}),[os.SCALE.MINOR.REDUCED_SECONDARY]:Al({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var wl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const Nl=["all","labels"];function Il({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i,styleModel:o}=e,a=t.getLayoutValue("measureAxes");if(!a||!a.length)return[];const s=i.getStyles(),l=o.query.axis.label.getStyle(),{measureAxes:u}=r.meta;return u.filter((e=>{const t=e.isPrimary?0:1;return Nl.some((e=>a[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?os.COMPONENT.AXIS.MINOR.PRIMARY:os.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:wl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}})))}var kl={INACTIVE:.5},Ll={LOWER:3,UPPER:13};const Pl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return Me.getAdjustedMaxGlyphCount(t,r,0,"qText")};function Dl({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:i}=e,o="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=i.query.axis.label.getStyle(),l=Pl({layoutService:n}),{orientation:u}=r.meta.major,c="horizontal"===u?a.label:"auto";return{type:"axis",key:os.COMPONENT.AXIS.MAJOR,scale:os.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:wl.AXIS.MAJOR[u.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:o?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===c?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>Ll.LOWER&&l<Ll.UPPER?1:void 0,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:kl.INACTIVE}}}]}}}function ql({models:e}){const{dockService:t,styleModel:n}=e,{orientation:r}=t.meta.major,i=n.query.axis.label.getStyle();return{type:"axis",key:os.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:os.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:wl.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:i.fontFamily,fontSize:i.fontSize,fill:i.fill},line:{show:!1}}}}function zl({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i}=e,o="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),u=i.query.axis.label.getStyle(),c=o?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:wl.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(u.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:o?"end":"start",label:{align:s,justify:c},guideLine:{major:{justify:c},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[ie(!0,{},d,{key:os.COMPONENT.AXIS.TIME_INNER,scale:os.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),ie(!0,{},d,{key:os.COMPONENT.AXIS.TIME_OUTER,scale:os.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[ql({models:e})]:[Dl({models:e,environment:t})]}const $l=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,_l=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function jl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:kl.INACTIVE},...n}}}]}}var Bl={MAX:"max",MIN:"min"};function Fl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Hl=(e,t)=>`${e}-${t.id}`,Vl=4,Ul=12,Yl=4;function Wl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${Yl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(os.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(Vl,Math.min(Ul,l));o.size=`${"bar"===i?2*u:u}px`}return o.size}}const{isDark:Xl}=Rt;const Gl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:m}=n.options,{isContinuous:h}=i.meta,p="rtl"===r.options.direction,{orientation:f}=s.meta.major,g="horizontal"===f,y=(n.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return Fl(t,y)},b=Hl(os.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[g?"x":"y"]:{scale:os.SCALE.MAJOR,fn:_l({layoutService:i,seriesModel:o,rtl:p,orientation:f}),ref:h?"major":void 0},[g?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===m?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?Xl(t)?function(e){return Je(e).brighter(.5).toString()}(t):function(e){return Je(e).darker().toString()}(t):t},size:Wl({chart:e,layoutService:i,dockService:s,markerKey:b,markerType:m}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:m,horizontal:g,rtl:p})},brush:jl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:kl.INACTIVE}}})}};function Kl({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(os.SCALE.MAJOR),u=s(os.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=d.map(m),p=Math.min(...h),f=Math.max(...h)-p,g=0===f?1:f,y=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/g)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(y[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const b=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function Jl({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const m=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Kl({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return c;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?Kl({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(os.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(os.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,m=(t?Math.max(0,c):c)-d,h=0===m?1:m,p=s.domain(),f=[];for(let e=0;e<p.length-1;e++){const t=p[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/h))});const i=p[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:c,rtl:a})}const Zl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=_l({layoutService:r,seriesModel:i,rtl:s,orientation:l});return{key:Hl(os.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:os.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Jl({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:jl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:kl.INACTIVE},inactive:{opacity:kl.INACTIVE}})}};var Ql={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function eu({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const tu=3,nu=20;function ru({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:m}=a.meta.major,h="horizontal"===m,p="SPARK"===a.meta.chart.mode,f=i.getColor(),{POINT:g}=Ql,y=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=eu({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){const t=e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{});return t}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),v="rtl"===n.options.direction,b=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=r.meta,S=({end:e})=>{const{value:t}=e;return Fl(t,b)};return{type:"point",key:Hl(os.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?g.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:os.SCALE.MAJOR,fn:_l({layoutService:r,seriesModel:o,rtl:v,orientation:m}),ref:"major"},sizeLimits:{minPx:tu,maxPx:nu},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:f,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:p?y({item:e,items:t.items})?1:0:d||y({item:e,items:t.items})?1:0}},brush:jl({layoutService:r,active:{r:e=>e.r+Ql.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;const i=[os.COMPONENT.AXIS_OVERLAY.CONTINUOUS,os.COMPONENT.AXIS_OVERLAY.TIME_INNER,os.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0));return i?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const iu=(e,{dataset:t})=>{const{value:n,label:r,source:i}=e.end,o=t(i.key).field(i.field);return fe.shouldUseFormat(o.raw())?o.formatter()(n):r};function ou({chart:e,models:t,environment:n,series:r,lineSeries:i}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,{id:c}=r,d="rtl"===n.options.direction,m=o.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;const h=(r.isPrimary?l:u).query.getExtrema(),p=s.query.point.label.getStyle();return{type:"point-label",key:`${os.COMPONENT.POINT_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:wl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>iu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${os.COMPONENT.POINT}-${c}`,allPoints:i.map((e=>`${os.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Fl(e.value,h))(e.data),labelSpace:{use:()=>{const t=e.component(os.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill}}}const au=({chart:e,dock:t})=>{let n=t;const r=e.component(`${os.COMPONENT.SLICED_HAT}-${Bl.MAX}`),i=e.component(`${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.PRIMARY}`),o=e.component(`${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.SECONDARY}`);return r?n=`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}`:i?n=`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.PRIMARY}`:o&&(n=`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.SECONDARY}`),n},su=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}`&&e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.PRIMARY}`&&e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MAX}-${as.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MIN}`&&e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MIN}-${as.AXIS.PRIMARY}`&&e!==`@${os.COMPONENT.SLICED_HAT}-${Bl.MIN}-${as.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function lu({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const m=u?"left":"right";return{type:"label-space",key:os.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:wl.LABEL_SPACE,dock:au({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${os.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(os.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),h=e.scale(os.SCALE.MINOR.SECONDARY)(m.implicit.line.max),p=c||u?h:1-h,f=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&p<n?10:0}}}const uu={min:"Min",max:"Max"};function cu(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function du(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function mu(e,t,n){return cu(e,t,n)||du(e,t,n)}function hu(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function pu(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function fu(e,t){return hu(e,t)||pu(e,t)}function gu({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${uu[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Bl.MAX?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Bl.MAX?!hu(r,e):!pu(r,e)}({extrema:e,type:t}))}var yu=Object.freeze({__proto__:null,isMaxOutOfBounds:hu,isMinOutOfBounds:pu,isOutOfBounds:fu,isSegmentMaxOutOfBounds:cu,isSegmentMinOutOfBounds:du,isSegmentOutOfBounds:mu,shouldShowOob:gu});const vu={min:"Min",max:"Max"},bu=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:h,themeService:p,fieldModel:f}=t,g="rtl"===o.options.direction,{dock:y,opposite:v,orientation:b}=s.meta.major,x=l.query.getExtrema(),S=u.query.getExtrema(),E=a===Bl.MAX,{isBarSeriesGrouped:M}=m.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Bl.MAX?n:r;const o=e.component(`${os.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`),s=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.SECONDARY}`),l=e.component(os.COMPONENT.LABEL_SPACE),u=e.component(`${os.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.PRIMARY}`),d=e.component(`${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.SECONDARY}`);return o?i=`@${os.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`:s?i=`@${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.SECONDARY}`:u||c||d?l&&t===Bl.MAX?i=`@${os.COMPONENT.LABEL_SPACE}`:u?i=`@${os.COMPONENT.BAR_OOB}-${t}`:c?i=`@${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.PRIMARY}`:d&&(i=`@${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.SECONDARY}`):l&&t===Bl.MAX&&(i=`@${os.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:v,dock:y}),T=_l({layoutService:m,seriesModel:h,rtl:g,orientation:b}),O=r.concat(n);if(!O.length)return!1;const A=E?x.implicit.bar.max:x.implicit.bar.min,R=Number(A.toFixed(13));if(!M&&i.length&&yu[`is${vu[a]}OutOfBounds`](R,x))return!1;if(!x.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const w=E?"max":"min",N=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),I=Math[w](Number(S.implicit.line[w].toFixed(13)),Number(S.implicit.marker[w].toFixed(13))),k=O.filter((e=>e.isPrimary)),L=O.filter((e=>!e.isPrimary)),P=k.length>0,D=L.length>0,{major:q,majorNumeric:z}=f.main,$=e=>"NaN"!==e.qNum?e.qNum:0,_=m.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${os.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:wl.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:n})=>({field:q,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:_},end:{field:e,value:n.showAsZeros?$:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:k,secondarySeries:L,orientation:b,rtl:g,major:{scale:os.SCALE.MAJOR,fn:T},markerOffset:su({dockPosition:C,orientation:b,rtl:g})},brush:jl({layoutService:m}),show:()=>{if(E){if(P&&N>c.query.getMax())return!0;if(D&&I>d.query.getMax())return!0}if(!E){if(P&&N<c.query.getMin())return!0;if(D&&I<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color}}},xu={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Su({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${os.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=xu[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=xu[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Eu=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Mu(e){return Math.min(Math.max(0,e),1)}const Cu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m}=t,{isContinuous:h,isBarSeriesStacked:p,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:g}=o.meta,y=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?as.AXIS.PRIMARY:as.AXIS.SECONDARY,b=i?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=p?{scale:b,start:{ref:"start",fn:e=>{const t=y(e);return Mu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:y(e))(e);return Mu(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=y(e);return Mu(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?y(e):e.datum.end.value;return Mu(e.scale(n))}}},S=(i?d:m).query.getExtrema(),E=p?({start:e,end:t})=>mu(e.value,t.value,S):({end:e})=>fu(e.value,S);return{type:"box",key:`${os.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(p)return;const e=l.query.series(as.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:p?i?os.COLLECTION.STACKED_PRIMARY:os.COLLECTION.STACKED_SECONDARY:i?os.COLLECTION.PRIMARY:os.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:os.SCALE.MAJOR,fn:$l({layoutService:o,axis:v}),ref:h?{start:"major",end:"major"}:void 0},minor:x,box:{width:Eu({isContinuous:h,isBarSeriesGrouped:f,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:g}),minWidthPx:h?Su({chart:e,models:t,viewState:n,viewCache:r,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:jl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:kl.INACTIVE}}})}},Tu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=i?as.AXIS.PRIMARY:as.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${os.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?os.COLLECTION.STACKED_TOTAL_PRIMARY:os.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:os.SCALE.MAJOR,fn:$l({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Eu({isContinuous:m,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:m?Su({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Ou(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Rt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}const Au="vertical",Ru="horizontal";function wu(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return t===Au&&i<0?o="down":t===Ru&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const Nu=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Iu=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function ku(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const Lu=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i,styleModel:o,themeService:a}=e,{meta:s}=r,l="rtl"===t.options.direction,u=a.getStyles(),c=o.query.bar.label.getStyle(),d=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),m=n?as.AXIS.PRIMARY:as.AXIS.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!Nu(d,s))return!1;let h;!s.isBarSeriesStacked&&(h=s.isBarSeriesStacked?1:0);const p={label:e=>iu(e.data,e),simplifiedPlacements:ku(h,0===h?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:u.label.value},f=[Ou(e,p)],g={component:`${os.COMPONENT.BAR}-${m}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>wu(t.data.end.value,e.dockService.meta.minor.orientation,l,0),labels:f,fontSize:parseInt(c.fontSize,10),fontFamily:c.fontFamily}}},y=[g];return{type:"labels",key:`${os.COMPONENT.BAR_LABEL}-${m}`,layout:{minimumLayoutMode:wl.VALUE_LABEL},settings:{sources:y}}};function Pu(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function Du({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),u=r?as.AXIS.PRIMARY:as.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Iu(l,i))return!1;const c=s.useContrastColor,d=e.formatter(r?os.FORMATTER.PRIMARY:os.FORMATTER.SECONDARY)||(e=>e),m=e=>0===e?"":d(e),h={label:e=>m(e.data.sumOfPositives.value),simplifiedPlacements:Pu("outside",true,c,i.isContinuous),style:a.label.value},p={label:e=>m(e.data.sumOfNegatives.value),simplifiedPlacements:Pu("opposite",true,c,i.isContinuous),style:a.label.value},f=[Ou(t,h),Ou(t,p)];return{type:"labels",key:`${os.COMPONENT.STACK_BAR_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:wl.VALUE_LABEL},settings:{sources:[{component:`${os.COMPONENT.STACK_BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>wu(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:f,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]}}}var qu=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const zu={min:"Min",max:"Max"},$u=1e-12;function _u({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?Tu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Cu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():u.query.getExtrema(),v=n===Bl.MAX,b=o?as.AXIS.PRIMARY:as.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${zu[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!qu[`has${zu[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${zu[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let x="end";m&&(x=v?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`),a=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start}),M={type:"box-sliced-hat",key:`${os.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:ie({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<$u?t:e}(e.datum[x].value);return v?n>t:n<t},width:Eu({isContinuous:h,isBarSeriesGrouped:p,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:jl({layoutService:a})};return M}const ju={min:"Min",max:"Max"},Bu={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Fu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:d,start:m}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,p=h?Tu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Cu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),f=o?l.query.getExtrema():u.query.getExtrema(),g=n===Bl.MAX?f.implicit.bar.max:f.implicit.bar.min,y=Number(g.toFixed(13)),v=o?as.AXIS.PRIMARY:as.AXIS.SECONDARY;if(!p)return!1;if(!yu[`is${ju[n]}OutOfBounds`](y,f))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Bl.MAX?n:r;const a=e.component(os.COMPONENT.LABEL_SPACE),s=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`),l=e.component(`${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.SECONDARY}`),u=e.component(`${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.PRIMARY}`),c=e.component(`${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.SECONDARY}`);return s?o=`@${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.PRIMARY}`:l?o=`@${os.COMPONENT.SLICED_HAT}-${t}-${as.AXIS.SECONDARY}`:u&&c&&!i?o=`@${os.COMPONENT.BAR_OOB}-${t}-${as.AXIS.PRIMARY}`:a&&t===Bl.MAX&&(o=`@${os.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:m,isPrimary:o});let x="end";h&&(x=n===Bl.MAX?"sumOfPositives":"sumOfNegatives");const S={type:"box-out-of-bounds",key:`${os.COMPONENT.BAR_OOB}-${n}-${v}`,layout:{dock:b},data:p.data,settings:{orientation:p.settings.orientation,major:p.settings.major,minor:p.settings.minor,dockValue:Ee.getDockValue(n===Bl.MAX?d:m),oob:ie({},p.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=h&&0===e.datum[x].value,i=yu[`is${ju[n]}OutOfBounds`](e.datum[x].value,f,n),o=(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Bu[n]].value;return 0!==i&&yu[`is${ju[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:x,extrema:f}))&&i;return o}})},brush:jl({layoutService:a})};return S}function Hu(e){return Math.min(Math.max(0,e),1)}const Vu=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(r?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY),h=r?as.AXIS.PRIMARY:as.AXIS.SECONDARY,p=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Bl.MAX;if(!gu({extrema:p,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e),v={type:"box",key:`${os.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(as.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?os.COLLECTION.STACKED_TOTAL_PRIMARY:os.COLLECTION.STACKED_TOTAL_SECONDARY:r?os.COLLECTION.PRIMARY:os.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:os.SCALE.MAJOR,fn:$l({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Hu(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Hu(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Hu(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Hu(e.scale(t))}}},box:{width:Eu({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=f?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:m.max();return f?n>m.max():n<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return v};function Uu(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Yu=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:u,seriesModel:c,themeService:d}=t,m=d.getStyles(),h=u.query.bar.label.getStyle(),{meta:p}=o,{isBarSeriesStacked:f}=p,g=e.formatter(i?os.FORMATTER.PRIMARY:os.FORMATTER.SECONDARY),y=o.getLayoutValue("dataPoint.showBarLabels",!1),v="horizontal"===a.meta.major.orientation,b="rtl"===r.options.direction;if(!(i?c.meta.primaryBarSeriesCount:c.meta.secondaryBarSeriesCount)||!f&&!Nu(y,p)||f&&!Iu(y,p))return!1;const x=i?s.query.getExtrema():l.query.getExtrema();if(!x.meta.hasExplicit)return!1;const S=n===Bl.MAX?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Bl.MAX?hu(S,x):pu(S,x)))return!1;let E=e=>iu(e.data,e);p.isBarSeriesStacked&&(E=n===Bl.MAX?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(hu(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return g?g(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(pu(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return g?g(t):t}return""});const M={label:E,simplifiedPlacements:Uu("outside",true,p.isContinuous,v,b),style:m.label.value},C={label:E,simplifiedPlacements:Uu("opposite",true,p.isContinuous,v,b),style:m.label.value},T=[Ou(t,M),Ou(t,C)],O=i?as.AXIS.PRIMARY:as.AXIS.SECONDARY,A="horizontal"===a.meta.major.orientation?"down":"right",R=[{component:`${os.COMPONENT.GHOST_BAR_OOB}-${n}-${O}`,selector:"rect",strategy:{type:"bar",settings:{direction:A,labels:T,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{key:`${os.COMPONENT.BAR_OOB_LABEL}-${n}-${O}`,type:"labels",layout:{minimumLayoutMode:wl.VALUE_LABEL},settings:{sources:R}}},Wu=({chart:e,models:t,viewState:n,viewCache:r})=>[Cu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Cu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Xu=({chart:e,models:t,viewState:n,viewCache:r})=>[Tu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Tu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Gu=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Du({chart:e,models:t,environment:n,isPrimary:!0}),Du({chart:e,models:t,environment:n,isPrimary:!1})]}return[Lu({models:t,environment:n,isPrimary:!0}),Lu({models:t,environment:n,isPrimary:!1})]},Ku=({chart:e,models:t,viewCache:n,viewState:r})=>[_u({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),_u({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),_u({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),_u({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Ju=({chart:e,models:t,viewCache:n,viewState:r})=>[Fu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Fu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Fu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Fu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Zu=({chart:e,models:t})=>[Vu({chart:e,models:t,type:"max",isPrimary:!0}),Vu({chart:e,models:t,type:"min",isPrimary:!0}),Vu({chart:e,models:t,type:"max",isPrimary:!1}),Vu({chart:e,models:t,type:"min",isPrimary:!1})],Qu=({chart:e,models:t,environment:n})=>[Yu({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Yu({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Yu({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Yu({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],ec=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(as.TYPE.BAR).slice(-1),s=o.query.series(as.TYPE.LINE),l=o.query.series(as.TYPE.MARKER);return[...Wu({chart:e,models:n,viewState:r,viewCache:i}),...Xu({chart:e,models:n,viewState:r,viewCache:i}),...s.map((e=>Zl({models:n,environment:t,series:e}))),...s.map((e=>ru({models:n,series:e,environment:t}))),...l.map((r=>Gl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>ou({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Gu({chart:e,models:n,environment:t}),...Ku({chart:e,models:n,viewCache:i,viewState:r}),...Ju({chart:e,models:n,viewCache:i,viewState:r}),...Zu({chart:e,models:n}),...Qu({chart:e,models:n,environment:t}),bu({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),bu({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),lu({chart:e,models:n,environment:t,lineSeries:s})]},tc={NONE:0,WIDE:1,MEDIUM:2,NARROW:3};function nc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i}=e,{auto:o,spacing:a}=r.getLayoutValue("gridLine",{});if(!o&&a===tc.NONE)return!1;const s=i.getStyles(),l=n.meta.primarySeries.length>0;return{key:os.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:wl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===tc.WIDE)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===tc.NARROW,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY}}function rc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:os.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:wl.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:os.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function ic({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:i}=t.meta;if(!r)return[];const o=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:wl.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[ie(!0,{},a,{key:"time-inner-grid",x:{scale:os.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),ie(!0,{},a,{key:"time-outer-grid",x:{scale:os.SCALE.MAJOR}})]:[ie(!0,{},a,{key:"continuous-grid",x:{scale:os.SCALE.MAJOR},minorTicks:{show:!0}})]}function oc({models:e}){return[nc({models:e}),rc({models:e}),...ic({models:e})]}function ac({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,styleModel:l}=e,u=o.query.getProperties(),c=r.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:m}=i.meta.major,h=l.query.axis.title.getStyle();return{type:"data-title",key:os.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:wl.AXIS_TITLE.MAJOR[m.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}const sc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function lc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:u}=e,c=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const m=u.query.axis.title.getStyle(),{measureAxes:h}=o.meta;return h.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,h={type:"data-title",key:u?os.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:os.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:wl.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:sc(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,color:m.color}};return d&&(h.settings.padding="0",h.settings.minWidth="auto"),h}))}function uc({models:e,environment:t,actions:n}){return[ac({models:e,environment:t,actions:n}),...lc({models:e,environment:t,actions:n})]}function cc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=qs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Ls({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(h.settings.injections=()=>[ks({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Is.OPTIONS.BAR.value},deviceType:t.deviceType})}function dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Cu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?as.AXIS.PRIMARY:as.AXIS.SECONDARY;return a.key=`${os.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?os.COLLECTION.REDUCED_STACKED_PRIMARY:os.COLLECTION.REDUCED_STACKED_SECONDARY:i?os.COLLECTION.REDUCED_PRIMARY:os.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?os.SCALE.MINOR.REDUCED_PRIMARY:os.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=os.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function mc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(as.TYPE.LINE).map((r=>{const i=Zl({models:t,environment:e,series:r});return i.key=Hl(os.COMPONENT.MINI_CHART.LINE,r),i.data.collection=os.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?os.SCALE.MINOR.REDUCED_PRIMARY:os.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=os.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function hc({models:e,environment:t}){return e.seriesModel.query.series(as.TYPE.MARKER).map((n=>{const r=Gl({models:e,environment:t,series:n});return r.key=Hl(os.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=os.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?os.SCALE.MINOR.REDUCED_PRIMARY:os.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=os.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function pc({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return fl(t)?[dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...mc({environment:i,models:t}),...hc({models:t,environment:i})]:[]}function fc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=wl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:os.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:os.SCALE.MAJOR_INNER,layout:{dock:`@${os.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:os.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:os.SCALE.MAJOR,layout:{dock:`@${os.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:os.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:os.SCALE.MAJOR,layout:{dock:`@${os.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function gc({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:m}=n,h="rtl"===d.direction,p=u.query.series(as.TYPE.BAR).filter((e=>e.isPrimary)),f=u.query.series(as.TYPE.BAR).filter((e=>!e.isPrimary)),g=u.query.series(as.TYPE.LINE),y=u.query.series(as.TYPE.MARKER),v=u.query.all(),b=v.some((e=>e.isPrimary)),x=v.some((e=>!e.isPrimary)),S=b&&x,E={resolveUIColor:o.getPaletteColor},M=b?rs({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:os.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:os.FORMATTER.PRIMARY,theme:m,localeInfo:c,rtl:h,key:os.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?rs({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:os.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:os.FORMATTER.SECONDARY,theme:m,localeInfo:c,rtl:h,key:os.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Qa({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:os.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:os.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:wl.REFERENCE_LINE}),!!x&&Qa({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:os.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:os.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:wl.REFERENCE_LINE}),Qa({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:os.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:os.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:p.length?`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`:f.length?`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`:g.length?`${os.COMPONENT.LINE}-${g[0].id}`:y.length?`${os.COMPONENT.MARKER}-${y[0].id}`:`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`,minimumLayoutMode:wl.REFERENCE_LINE}),...M,...C,...rs({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dock:a.meta.major.opposite,scale:os.SCALE.MAJOR,style:s.getStyles(),theme:m,localeInfo:c,rtl:h,key:os.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function yc(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var vc=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(yc)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=n.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function bc({environment:e,models:t}){const{flags:n,translator:r,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,u=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let i,o;for(let a=0,s=vc.length;a<s;a++){i=vc[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!u)return!1;const{fontFamily:c}=l.getStyles(),d=function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:se[e].alignment},settings:{label:i.get(`Object.Disclaimer.${e}`),rtl:o},style:r}}(u.key,{translator:r},{rtl:"rtl"===i.direction},{fontFamily:c});return d}function xc({layoutService:e}){return!!fl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:os.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Sc(e){return(null==e?void 0:e.type)||as.TYPE.BAR}function Ec({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,m=n.getLayoutValue("color",{}),h=e=>e.filter((e=>Sc(e)===as.TYPE.LINE)).map((e=>({key:Hl(os.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,f=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:os.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!f[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Mc({models:{fieldModel:e}}){return{[os.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[os.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var Cc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Tc}=Cc;function Oc({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Tc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Ac}=Cc,Rc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Ac}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Oc({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:wc}=Cc,{MAX_NUM_POINTS:Nc,DEFAULT_NUM_POINTS:Ic,DEFAULT_NUM_LINES:kc}=Cc,{DEFAULT_NUM_POINTS:Lc}=Cc,Pc=({layoutService:e,largeDataService:t})=>{if(!Oc({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Lc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:i=kc,maxNumPoints:o=Ic,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Rc({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,u=Math.floor(r[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>kc||o>Ic)?Math.min(u,Math.ceil(Nc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=wc}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})},Dc=({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Pc({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Rc({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)};function qc({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Oc({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Pc({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Rc({layoutService:t,largeDataService:n}),fetch:(i,o)=>Dc({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function zc(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function $c({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function _c(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function jc(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=_c(),o=_c();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Bc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Fc(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=jc(e,t,n.qMatrix),i=Bc(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const Hc=2**.5,Vc=1/Hc,Uc=1e-6,Yc=Vc**44;function Wc(e){return e.qIsOtherCell}function Xc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Wc)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Wc)||t++})),t}(n)}const Gc={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Kc={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};const Jc="…";function Zc(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Qc(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const m={x:c+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}${Jc}`).width,p=Math.max(0,m.width-u.width),f=Math.max(0,m.height-u.height),g=o*p,y=a*f;return{show:m.width>=Math.min(h,u.width),text:l,dx:g,dy:y,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Zc(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Zc(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function ed(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Zc(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Zc(i,n.minorGuideLine.strokeWidth),x2:o,y2:Zc(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function td(e){return e.filter((e=>e.show)).map((e=>ie({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var nd={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Zc(1,t.line.strokeWidth);return{show:n.line.show,x1:Zc(0,t.line.strokeWidth),y1:r,x2:Zc(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Qc(n,this),this.state.minor=ed(r,this)},render(){return[...td([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ie({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...td(this.state.major.map((e=>e.guideLine))),...td(this.state.minor.map((e=>e.guideLine)))];var e}};function rd(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function id(e){return e.qTags.indexOf("$qualified")>-1}function od({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];rd(o,a)?(id(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function ad({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}const sd=16;function ld({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+sd}))),r.clamp(n),i.rangeAndWidth}}}const ud=6;function cd({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=ud,canFitHalfDayTicks:n=>n>=t*e.count()}}function dd({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=ld,queryFactory:s=cd}={attributesFactory:ld,queryFactory:cd}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function md({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=dd,mapper:a=od,resolver:s=ad}={metaFactory:dd,mapper:od,resolver:ad}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=m.resolve(t);return n.set(r,i),i}}}const hd=86400,pd=864e5;function fd(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(pd*(e-Math.floor(e)))))}const gd=fd(0).getTime();function yd(e){return(e.getTime()-gd)/hd/1e3}var vd=new Date,bd=new Date;function xd(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return xd((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&&(i.count=function(t,r){return vd.setTime(+t),bd.setTime(+r),e(vd),e(bd),Math.floor(n(vd,bd))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Sd=36e5,Ed=xd((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),Md=Ed;Ed.range;var Cd=xd((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()})),Td=Cd;Cd.range;var Od=xd((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Sd)}),(function(e,t){return(t-e)/Sd}),(function(e){return e.getUTCHours()})),Ad=Od;Od.range;var Rd=xd((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})),wd=Rd;function Nd(e){return xd((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}))}Rd.range;var Id=Nd(0),kd=Nd(1),Ld=Nd(2),Pd=Nd(3),Dd=Nd(4),qd=Nd(5),zd=Nd(6);Id.range,kd.range,Ld.range,Pd.range,Dd.range,qd.range,zd.range;var $d=xd((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()})),_d=$d;$d.range;var jd=xd((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()}));jd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?xd((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 Bd=jd;jd.range;const Fd={second:1,minute:2,hour:3,day:4,month:5,year:6};function Hd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Bd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Md.count(e,t),l=Td.count(e,t),u=Ad.count(e,t),c=wd.count(e,t),d=Id.count(e,t),m=_d.count(e,t),h=Bd.count(e,t),p=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:Bd.every(1),formatter:r.year.formatter,offset:e=>Bd.offset(e,-1),floor:Bd.floor};if(s<=p)v.type=Fd.second,v.desc="second",v.count=s,v.interval=Md.every(1),v.formatter=r.second.formatter,v.offset=e=>Md.offset(e,-1),v.floor=Md.floor;else if(s/2<=p)v.type=Fd.second,v.desc="every other second",v.count=s/2,v.interval=Md.every(2),v.formatter=r.second.formatter,v.offset=e=>Md.offset(e,-2),v.floor=Md.floor;else if(s/5<=p)v.type=Fd.second,v.desc="every 5 second",v.count=s/5,v.interval=Md.every(5),v.formatter=r.second.formatter,v.offset=e=>Md.offset(e,-5),v.floor=Md.floor;else if(s/15<=p)v.type=Fd.second,v.desc="every 15 second",v.count=s/15,v.interval=Md.every(15),v.formatter=r.second.formatter,v.offset=e=>Md.offset(e,-15),v.floor=Md.floor;else if(s/30<=p)v.type=Fd.second,v.desc="every 30 second",v.count=s/30,v.interval=Md.every(30),v.formatter=r.second.formatter,v.offset=e=>Md.offset(e,-30),v.floor=Md.floor;else if(l<=f)v.type=Fd.minute,v.desc="minute",v.count=l,v.interval=Td.every(1),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-1),v.floor=Td.floor;else if(l/2<=f)v.type=Fd.minute,v.desc="every 2 minute",v.count=l/2,v.interval=Td.every(2),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-2),v.floor=Td.floor;else if(l/5<=f)v.type=Fd.minute,v.desc="every 5 minute",v.count=l/5,v.interval=Td.every(5),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-5),v.floor=Td.floor;else if(l/10<=f)v.type=Fd.minute,v.desc="every 10 minute",v.count=l/10,v.interval=Td.every(10),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-10),v.floor=Td.floor;else if(l/15<=f)v.type=Fd.minute,v.desc="every 15 minute",v.count=l/15,v.interval=Td.every(15),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-15),v.floor=Td.floor;else if(l/30<=f)v.type=Fd.minute,v.desc="every 30 minute",v.count=l/30,v.interval=Td.every(30),v.formatter=r.minute.formatter,v.offset=e=>Td.offset(e,-30),v.floor=Td.floor;else if(u<=f)v.type=Fd.hour,v.desc="hour",v.count=u,v.interval=Ad.every(1),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-1),v.floor=Ad.floor;else if(u/2<=f)v.type=Fd.hour,v.desc="every 2 hour",v.count=u/2,v.interval=Ad.every(2),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-2),v.floor=Ad.floor;else if(u/3<=f)v.type=Fd.hour,v.desc="every 3 hour",v.count=u/3,v.interval=Ad.every(3),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-3),v.floor=Ad.floor;else if(u/6<=f)v.type=Fd.hour,v.desc="every 6 hour",v.count=u/6,v.interval=Ad.every(6),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-6),v.floor=Ad.floor;else if(u/12<=f||i)v.type=Fd.hour,v.desc="every 12 hour",v.count=u/12,v.interval=Ad.every(12),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-12),v.floor=Ad.floor;else if(c<=g)v.type=Fd.day,v.desc="day",v.count=c,v.interval=wd.every(1),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-1),v.floor=wd.floor;else if(c/2<=g)v.type=Fd.day,v.desc="every 2 day",v.count=c/2,v.interval=wd.every(2),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-2),v.floor=wd.floor;else if(c/3<=g)v.type=Fd.day,v.desc="every 3 day",v.count=c/3,v.interval=wd.every(3),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-3),v.floor=wd.floor;else if(d<=g)v.type=Fd.day,v.desc="week",v.count=d,v.interval=Id.every(1),v.formatter=r.date.formatter,v.offset=e=>Id.offset(e,-1),v.floor=wd.floor;else if(d/2<=g)v.type=Fd.day,v.desc="every 2 week",v.count=d/2,v.interval=Id.every(2),v.formatter=r.date.formatter,v.offset=e=>Id.offset(e,-2),v.floor=wd.floor;else if(m<=g)v.type=Fd.month,v.desc="month",v.count=m,v.interval=_d.every(1),v.formatter=r.date.formatter,v.offset=e=>_d.offset(e,-1),v.floor=wd.floor;else if(m/3<=g)v.type=Fd.month,v.desc="quarter",v.count=m/3,v.interval=_d.every(3),v.formatter=r.date.formatter,v.offset=e=>_d.offset(e,-3),v.floor=wd.floor;else if(m/6<=g)v.type=Fd.month,v.desc="half year",v.count=m/6,v.interval=_d.every(6),v.formatter=r.date.formatter,v.offset=e=>_d.offset(e,-6),v.floor=wd.floor;else if(h<=y)v.type=Fd.year,v.desc="year",v.count=h,v.interval=Bd.every(1),v.formatter=r.year.formatter,v.offset=e=>Bd.offset(e,-1),v.floor=Bd.floor;else if(h/2<=y)v.type=Fd.year,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Bd.offset(e,-2),v.floor=Bd.floor;else if(h/5<=y)v.type=Fd.year,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Bd.offset(e,-5),v.floor=Bd.floor;else if(h/10<=y)v.type=Fd.year,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Bd.offset(e,-10),v.floor=Bd.floor;else{const e=Math.floor(h/y);v.type=Fd.year,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Bd.offset(t,-e),v.floor=Bd.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:c.formatter}}));let h=[];if(!o&&c.type<=Fd.hour){const n=t.getFormat("date"),r=e.ticks(wd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(wd.offset(r[0],-1)),h=(r.length?r:[wd.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:m,outer:h}}const Vd=86400,Ud=1440,Yd={};function Wd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Xd(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=Ho().domain([fd(l),fd(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let m;m="d3"===d.type?(e,i)=>Hd({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:fd(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Yd[[t,n,r,r,o]])return Yd[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=fd(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,m=t/(i-r),h=m/1440,p=m/Vd,f=366*m,g=3*m*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/f;let S,E,M,C=0,T=0,O=null,A=null,R=null,w=null,N=null,I=null;const k={outer:[],inner:[]};for(y<1?(O=1,T=1/Vd):y<2?(O=2,T=1/Vd*2):y<5?(O=5,T=1/Vd*5):y<10?(O=10,T=1/Vd*10):y<30?(O=30,T=1/Vd*30):v<1?(A=1,T=1/Ud):v<2?(A=2,T=1/Ud*2):v<5?(A=5,T=1/Ud*5):v<10?(A=10,T=1/Ud*10):v<30?(A=30,T=1/Ud*30):v<60?(R=1,T=1/24):v<120?(R=2,T=2/24):v<360?(R=6,T=.25):v<720?(R=12,T=.5):b<1/90?(T=1,w=1):b<2/90?(T=2,w=2):b<7/90?(T=7,w=7):b<31/90?(N=1,T=31):b<1?(N=3,T=90):x<1?(I=1,T=366):x<2?(I=2,T=732):x<5?(I=5,T=1826.25):(I=10,T=3652.5),E=Math.floor((d+n%1)/T);C<i;){M=E+1,S=I?Wd("year",[l+E*I,0,1],[l+M*I,0,1],a.year.formatter):N?Wd("month",[l,u+E*N,1],[l,u+M*N,1],a.date.formatter):w?Wd("day",[l,u,c+E*w],[l,u,c+M*w],a.date.formatter):R?Wd("hour",[l,u,c,0+E*R],[l,u,c,0+M*R],a.minute.formatter):A?Wd("minute",[l,u,c,0,0+E*A],[l,u,c,0,0+M*A],a.minute.formatter):Wd("second",[l,u,c,0,0,0+E*O],[l,u,c,0,0,0+M*O],a.second.formatter),C=yd(S.start),k.inner.push(S);const e=Math.floor(C);if(!(o||I||N||w)){const t={type:"day",start:fd(e),end:fd(e+1),formatter:a.date.formatter,qStart:e};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===t.qStart||k.outer.push(t)}E++}return k.min=r,k.max=i,Yd[[t,n,r,r,o]]=k,k}(n,e,d.min,l,u,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===i?yd(t.start):"end"===i?yd(t.end):(yd(t.start)+yd(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:yd(t.start),end:yd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const Gd=41000.2343433,Kd=/t+/i,Jd=16,Zd=60;const Qd={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function em(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const tm="continuousPan";var nm={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Gc,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=qc,snapshotFetcherFactory:u=$c,cacheFetcherFactory:c=zc,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=u({layoutService:t,viewCache:i}),p=c({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=y,r=v,Math.max(Uc,(r-n)*Yc))),g=t.meta.isSnapshot?h:m,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Bc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Fc(y,v,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Bc(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Fc(e,t,n))).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>Fc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ie({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ie({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Xc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=T(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),h=m-(r>0?Vc:Hc)*m,p=c+h*u,f=d-h*(1-u),g=p<a?a-p:0,y=f>s?f-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(f+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:tm,pointers:1,threshold:10,enable(r,i){return this.started===tm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{[`${tm}start`](n){n.preventDefault(),this.started=tm;const{min:i,max:o}=r.get("zoom");this[tm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${tm}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[tm],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${tm}end`](e){e.preventDefault(),this.started=!1},[`${tm}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Kc,timeAxis:nd},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=ie(!0,{},t[i],o)})),r}(t,Qd,n),{qAxis:i}=r,o=kr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,c,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,n.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(em(a,m),a.instance(e)),m.normInvert=e=>(em(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:Zd,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:Zd,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:Zd,formatter:void 0},year:{type:"year",pattern:"YYYY",width:Zd,formatter:void 0}};return i&&Kd.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(Gd)).width+Jd)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=fd(t[0].data.start),i=fd(t[n-1].data.start);return wd.count(r,i)/n>=1?o.date:Ad.count(r,i)/n>0?o.minute:Td.count(r,i)/n>0?o.second:o.date},t}(r);return c=Xd(o.copy(),r,h),u=md({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>h.getFormatFromTicks(d).formatter,m}}};const rm=e=>e.meta.seriesComponentKeys[0],im=(e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}};function om({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=nm,{layoutService:s,seriesModel:l}=t,u=rm(l),c=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===os.COMPONENT.LEGEND_CATEGORICAL));im(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===u));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const am="continuousPinchZoom";function sm({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=nm.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,h="rtl"===n.options.direction,p=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Xs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:c,layoutService:l,dockService:u,rtl:h}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...p.gestures]},y=[om({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...c.interactions.gestures),y.push(c.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:rm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0,diff:0},s=nm.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:am,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[`${am}start`](e){a.last=e.scale,e.preventDefault()},[`${am}move`](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:rm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:h})),[g,...y]}const lm=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},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}}}),um="lasso",cm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:um,enable(e,n){if(this.started===um||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==um&&(i.actions.select.emit("start",um),this.chart.component(e).emit("lassoStart",t),this.started=um)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",um),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const dm=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else h&&m.emit("hide")}}}};const mm=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const hm=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function pm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=hm(e,t,"range");return{interactions:[e.onEdited?mm(e,t):null,r].filter(Boolean),components:[n]}}const fm=/axis|legend/,gm=e=>e.some((e=>fm.test(e.type)));function ym({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`,`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`,...n.query.series(as.TYPE.MARKER).map((e=>Hl(os.COMPONENT.MARKER,e))),...n.query.series(as.TYPE.LINE).map((e=>Hl(os.COMPONENT.POINT,e))),os.COMPONENT.AXIS.MAJOR,os.COMPONENT.AXIS_OVERLAY.TIME_INNER,os.COMPONENT.AXIS_OVERLAY.TIME_OUTER,os.COMPONENT.AXIS_OVERLAY.CONTINUOUS,os.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[os.COMPONENT.AXIS.MAJOR,os.COMPONENT.AXIS_OVERLAY.TIME_INNER,os.COMPONENT.AXIS_OVERLAY.TIME_OUTER,os.COMPONENT.AXIS_OVERLAY.CONTINUOUS,os.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>gm(e)?0:3,debouncer:T,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[dm(e,t)],components:[]}}(s,l)}function vm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,os.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[hm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[os.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const bm={components:[],interactions:[]};function xm({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&pm({eventName:"minorRange",key:"minor-range-brush",targets:[os.COMPONENT.AXIS.MINOR.PRIMARY,`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`,...i.query.series(as.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>Hl(os.COMPONENT.MARKER,e))),...i.query.series(as.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>Hl(os.COMPONENT.POINT,e)))],fillTargets:[os.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:os.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||bm,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&pm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[os.COMPONENT.AXIS.MINOR.SECONDARY,`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`,...i.query.series(as.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>Hl(os.COMPONENT.MARKER,e))),...i.query.series(as.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>Hl(os.COMPONENT.POINT,e)))],fillTargets:[os.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:os.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||bm,a=vm({actions:e,models:n})||bm,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[os.COMPONENT.AXIS_OVERLAY.TIME_INNER,os.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[os.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return pm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`,`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`,...o.query.series(as.TYPE.MARKER).map((e=>Hl(os.COMPONENT.MARKER,e))),...o.query.series(as.TYPE.LINE).map((e=>Hl(os.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?os.SCALE.MAJOR_INNER:os.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(os.FORMATTER.PRIMARY),o=t.scale(os.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||bm,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=`${os.SCALE.COLOR}Range`,{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&pm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||bm;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Sm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};const o={key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=lm(n);return{interactions:[cm(n,t)],components:[r]}}(o,{actions:e})}function Em({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,isUnsupportedFeature:s}){const{colorService:l,pluginService:u}=n,c=n.layoutService.getLayout(),{options:d}=r,m=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:c,options:d}),h=(p={logicalSize:m,minCenterRatio:0},{layoutModes:ce.getLayoutModes(),center:void 0!==p.minCenterRatio?{minWidthRatio:p.minCenterRatio,minHeightRatio:p.minCenterRatio}:void 0,logicalSize:p.logicalSize?{align:.5,preserveAspectRatio:!0,...p.logicalSize}:void 0});var p;const f=function({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o}){var a;const{colorService:s,layoutService:l,dockService:u,tooltipService:c}=t,d=bc({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[...oc({models:t}),...Il({models:t}),...ec({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Ec({models:t,environment:n}),...zl({models:t,environment:n}),...uc({models:t,environment:n,actions:o}),Wo({viewState:r,viewCache:i,layoutService:l,dockService:u}),...fc({models:t}),...gc({chart:e,models:t,environment:n}),cc({models:t,environment:n,viewState:r,viewCache:i}),...s.custom.legendComponents(),xc(t),...pc({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...c.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}),g=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=ym({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=xm({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Sm({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:a,chart:t,models:n,isUnsupportedFeature:s}),y=u.extendComponents([...f,...g.components]);return{collections:gl({models:n}),scales:Rl({picasso:e,models:n,viewState:i,viewCache:o,environment:r}),components:y,formatters:Mc({models:n}),interactions:sm({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,selectables:g}),strategy:h,palettes:l.getPalettes()}}const Mm=({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:u})=>{const{width:c,height:d}=i(),[,m]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&a))return;const{colorService:i,discreteModel:o,dockService:m,layoutService:h,refLineModel:p}=n;function f(){t.update({settings:Em({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:u})})}m.update({width:c,height:d}),i.custom.updateLegend(),p.update({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l});const g=h.getDataPages();h.setDataPages([]),f(),h.setDataPages(g),h.meta.isContinuous||await o.command.initialize(),f()}),[c,d]);if(m)throw m},Cm=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:os.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Tm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:os.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],Om=[os.COMPONENT.AXIS_TITLE.MAJOR,os.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,os.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,os.COMPONENT.GRID_LINE,os.COMPONENT.ZERO_LINE],Am=({picasso:e,chart:t,models:n,environment:i,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:i})=>{const{event:{onZoomIntercept:o,onZoomChange:a}}=nm;r((()=>{if(!t||!n||!i)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:u}=t,{miniComponentKeys:c}=u.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...Om,...c]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",o({viewCache:i})))}),[t,n,i])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:a,actions:s})=>{const[,l]=o((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:o,colorService:l,discreteModel:u}=n;function c(o=!1){t.update({settings:Em({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:a,actions:s}),data:o&&[Cm({models:n}),...Tm({models:n}),...l.getData()]})}const d=o.getDataPages();o.setDataPages([]),c(!0),o.setDataPages(d),o.meta.isContinuous||await u.command.initialize(),c(!1)}),[null==t?void 0:t.update,n,r]);if(l)throw l})({picasso:e,chart:t,models:n,environment:i,viewState:a,viewCache:s,actions:l})},Rm={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function wm(e){return Rm[e]||e}function Nm(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=wm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=wm(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),u&&c()},off(){u=!1,d()},on(){u=!0,0===l.length&&c()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function Im(){return Im=Object.assign?Object.assign.bind():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},Im.apply(this,arguments)}var km={exports:{}};function Lm(){}function Pm(){}Pm.resetWarningCache=Lm;km.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var 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:Pm,resetWarningCache:Lm};return n.PropTypes=n,n}();var Dm=X(km.exports),qm={black:"#000",white:"#fff"},zm={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"},$m={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"},_m={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"},jm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Bm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Fm={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Hm={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"};function Vm(){return Vm=Object.assign?Object.assign.bind():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},Vm.apply(this,arguments)}function Um(e){return Um="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},Um(e)}function Ym(e){return e&&"object"===Um(e)&&e.constructor===Object}function Wm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Vm({},e):e;return Ym(e)&&Ym(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Ym(t[i])&&i in e?r[i]=Wm(e[i],t[i],n):r[i]=t[i])})),r}function Xm(e){var t=function(e,t){if("object"!==Um(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Um(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Um(t)?t:String(t)}function Gm(e,t,n){return(t=Xm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Km(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function Jm(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 Math.min(Math.max(t,e),n)}function Zm(e){if(e.type)return e;if("#"===e.charAt(0))return Zm(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Km(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Qm(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 eh(e){var t="hsl"===(e=Zm(e)).type?Zm(function(e){var t=(e=Zm(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*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])),Qm({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 th(e,t){return e=Zm(e),t=Jm(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Qm(e)}function nh(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function rh(e,t){if(null==e)return{};var n,r,i=nh(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ih=["xs","sm","md","lg","xl"];function oh(e,t,n){var r;return Vm({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Vm({paddingLeft:t(2),paddingRight:t(2)},n,Gm({},e.up("sm"),Vm({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Gm(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Gm(r,e.up("sm"),{minHeight:64}),r)},n)}var ah={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:qm.white,default:Hm[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},sh={text:{primary:qm.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:Hm[800],default:"#303030"},action:{active:qm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function lh(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Zm(e),t=Jm(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 Qm(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=Zm(e),t=Jm(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 Qm(e)}(e.main,o)))}function uh(e){var t=e.primary,n=void 0===t?{light:_m[300],main:_m[500],dark:_m[700]}:t,r=e.secondary,i=void 0===r?{light:$m.A200,main:$m.A400,dark:$m.A700}:r,o=e.error,a=void 0===o?{light:zm[300],main:zm[500],dark:zm[700]}:o,s=e.warning,l=void 0===s?{light:Fm[300],main:Fm[500],dark:Fm[700]}:s,u=e.info,c=void 0===u?{light:jm[300],main:jm[500],dark:jm[700]}:u,d=e.success,m=void 0===d?{light:Bm[300],main:Bm[500],dark:Bm[700]}:d,h=e.type,p=void 0===h?"light":h,f=e.contrastThreshold,g=void 0===f?3:f,y=e.tonalOffset,v=void 0===y?.2:y,b=rh(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=eh(e),r=eh(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,sh.text.primary)>=g?sh.text.primary:ah.text.primary;return t}var S=function(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;if(!(e=Vm({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Km(4,t));if("string"!=typeof e.main)throw new Error(Km(5,JSON.stringify(e.main)));return lh(e,"light",n,v),lh(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},E={dark:sh,light:ah};return Wm(Vm({common:qm,type:p,primary:S(n),secondary:S(i,"A400","A200","A700"),error:S(a),warning:S(l),info:S(c),success:S(m),grey:Hm,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:v},E[p]),b)}function ch(e){return Math.round(1e5*e)/1e5}function dh(e){return ch(e)}var mh={textTransform:"uppercase"},hh='"Roboto", "Helvetica", "Arial", sans-serif';function ph(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?hh:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,m=void 0===d?500:d,h=n.fontWeightBold,p=void 0===h?700:h,f=n.htmlFontSize,g=void 0===f?16:f,y=n.allVariants,v=n.pxToRem,b=rh(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=v||function(e){return"".concat(e/g*x,"rem")},E=function(e,t,n,r,o){return Vm({fontFamily:i,fontWeight:e,fontSize:S(t),lineHeight:n},i===hh?{letterSpacing:"".concat(ch(r/t),"em")}:{},o,y)},M={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(c,48,1.167,0),h4:E(c,34,1.235,.25),h5:E(c,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(c,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(c,16,1.5,.15),body2:E(c,14,1.43,.15),button:E(m,14,1.75,.4,mh),caption:E(c,12,1.66,.4),overline:E(c,12,2.66,1,mh)};return Wm(Vm({htmlFontSize:g,pxToRem:S,round:dh,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:p},M),b,{clone:!1})}function fh(){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 gh=["none",fh(0,2,1,-1,0,1,1,0,0,1,3,0),fh(0,3,1,-2,0,2,2,0,0,1,5,0),fh(0,3,3,-2,0,3,4,0,0,1,8,0),fh(0,2,4,-1,0,4,5,0,0,1,10,0),fh(0,3,5,-1,0,5,8,0,0,1,14,0),fh(0,3,5,-1,0,6,10,0,0,1,18,0),fh(0,4,5,-2,0,7,10,1,0,2,16,1),fh(0,5,5,-3,0,8,10,1,0,3,14,2),fh(0,5,6,-3,0,9,12,1,0,3,16,2),fh(0,6,6,-3,0,10,14,1,0,4,18,3),fh(0,6,7,-4,0,11,15,1,0,4,20,3),fh(0,7,8,-4,0,12,17,2,0,5,22,4),fh(0,7,8,-4,0,13,19,2,0,5,24,4),fh(0,7,9,-4,0,14,21,2,0,5,26,4),fh(0,8,9,-5,0,15,22,2,0,6,28,5),fh(0,8,10,-5,0,16,24,2,0,6,30,5),fh(0,8,11,-5,0,17,26,2,0,6,32,5),fh(0,9,11,-5,0,18,28,2,0,7,34,6),fh(0,9,12,-6,0,19,29,2,0,7,36,6),fh(0,10,13,-6,0,20,31,3,0,8,38,7),fh(0,10,13,-6,0,21,33,3,0,8,40,7),fh(0,10,14,-6,0,22,35,3,0,8,42,7),fh(0,11,14,-7,0,23,36,3,0,9,44,8),fh(0,11,15,-7,0,24,38,3,0,9,46,8)],yh={borderRadius:4};function vh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bh(e,t){if(e){if("string"==typeof e)return vh(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)?vh(e,t):void 0}}function xh(e){return function(e){if(Array.isArray(e))return vh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bh(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 Sh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||bh(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 Eh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Mh={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)"},Ch={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Th(e){return"".concat(Math.round(e),"ms")}var Oh={easing:Mh,duration:Ch,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?Ch.standard:n,i=t.easing,o=void 0===i?Mh.easeInOut:i,a=t.delay,s=void 0===a?0:a;return rh(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Th(r)," ").concat(o," ").concat("string"==typeof s?s:Th(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))}},Ah={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Rh(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=rh(e,["breakpoints","mixins","palette","spacing","typography"]),d=uh(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=rh(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var r=ih.indexOf(t);return r===ih.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[ih[r+1]]?n[ih[r+1]]:t)-a/100).concat(i,")")}return Vm({keys:ih,values:n,up:l,down:function(e){var t=ih.indexOf(e)+1,r=n[ih[t]];return t===ih.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}(n),h=Eh(s),p=Wm({breakpoints:m,direction:"ltr",mixins:oh(m,h,i),overrides:{},palette:d,props:{},shadows:gh,typography:ph(d,u),spacing:h,shape:yh,transitions:Oh,zIndex:Ah},c),f=arguments.length,g=new Array(f>1?f-1:0),y=1;y<f;y++)g[y-1]=arguments[y];return p=g.reduce((function(e,t){return Wm(e,t)}),p)}var wh="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Nh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Ih(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Nh.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[wh]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}function kh(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var Lh="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},Ph="object"===("undefined"==typeof window?"undefined":Lh(window))&&"object"===("undefined"==typeof document?"undefined":Lh(document))&&9===document.nodeType;function Dh(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,Xm(r.key),r)}}function qh(e,t,n){return t&&Dh(e.prototype,t),n&&Dh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zh(e,t){return zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zh(e,t)}function $h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zh(e,t)}function _h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var jh={}.constructor;function Bh(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Bh);if(e.constructor!==jh)return e;var t={};for(var n in e)t[n]=Bh(e[n]);return t}function Fh(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Bh(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var Hh=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Vh=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Hh(e[n]," ");else t=Hh(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Uh(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function Yh(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Wh(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=Uh(n),l=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];for(var m in d){var h=d[m];null!=h&&(r&&(r+=l),r+=Yh(m+":"+u+Vh(h)+";",o))}}else for(var p in a){var f=a[p];null!=f&&(r&&(r+=l),r+=Yh(p+":"+u+Vh(f)+";",o))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(r&&(r+=l),r+=Yh(g+":"+u+Vh(y)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),Yh(""+e+u+"{"+r,--o)+Yh("}",o)):r}var Xh=/([[\].#*$><+~=|^:(),"'`\s])/g,Gh="undefined"!=typeof CSS&&CSS.escape,Kh=function(e){return Gh?Gh(e):e.replace(Xh,"\\$1")},Jh=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),Zh=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(_h(_h(i)),s),i.selectorText="."+Kh(i.id)),i}$h(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Vh(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Vm({},e,{allowEmpty:!0}):e;return Wh(this.selectorText,this.style,n)},qh(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Jh),Qh={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new Zh(e,t,n)}},ep={indent:1,children:!0},tp=/@([\w-]+)/,np=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(tp);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Op(Vm({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=ep);var t=Uh(e).linebreak;if(null==e.indent&&(e.indent=ep.indent),null==e.children&&(e.children=ep.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),rp=/@container|@media|@supports\s+/,ip={onCreateRule:function(e,t,n){return rp.test(e)?new np(e,t,n):null}},op={indent:1,children:!0},ap=/@keyframes\s+([\w-]+)/,sp=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(ap);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:Kh(a(this,o)),this.rules=new Op(Vm({},n,{parent:this})),t)this.rules.add(s,t[s],Vm({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=op);var t=Uh(e).linebreak;if(null==e.indent&&(e.indent=op.indent),null==e.children&&(e.children=op.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),lp=/@keyframes\s+/,up=/\$([\w-]+)/g,cp=function(e,t){return"string"==typeof e?e.replace(up,(function(e,n){return n in t?t[n]:e})):e},dp=function(e,t,n){var r=e[t],i=cp(r,n);i!==r&&(e[t]=i)},mp={onCreateRule:function(e,t,n){return"string"==typeof e&&lp.test(e)?new sp(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&dp(e,"animation-name",n.keyframes),"animation"in e&&dp(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return cp(e,r.keyframes);default:return e}}},hp=function(e){function t(){return e.apply(this,arguments)||this}return $h(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Vm({},e,{allowEmpty:!0}):e;return Wh(this.key,this.style,n)},t}(Jh),pp={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new hp(e,t,n):null}},fp=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Uh(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Wh(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Wh(this.at,this.style,e)},e}(),gp=/@font-face/,yp={onCreateRule:function(e,t,n){return gp.test(e)?new fp(e,t,n):null}},vp=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Wh(this.key,this.style,e)},e}(),bp={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new vp(e,t,n):null}},xp=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Sp={"@charset":!0,"@import":!0,"@namespace":!0},Ep={onCreateRule:function(e,t,n){return e in Sp?new xp(e,t,n):null}},Mp=[Qh,ip,mp,pp,yp,bp,Ep],Cp={process:!0},Tp={force:!0,process:!0},Op=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,c=Vm({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+Kh(this.classes[d]));var m=Fh(d,t,c);if(!m)return null;this.register(m);var h=void 0===c.index?this.index.length:c.index;return this.index.splice(h,0,m),m},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=Vm({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof Zh?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof sp&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof Zh?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof sp&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Cp);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,Tp)}for(var c in s){var d=t.style[c],m=s[c];null==d&&d!==m&&t.prop(c,null,Tp)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Uh(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),Ap=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Vm({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Op(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Rp=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),wp=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=nh(t,["attached"]),i=Uh(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},qh(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Np=new wp,Ip="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),kp="2f1acc6c3a606b082e5eef5e54414ffb";null==Ip[kp]&&(Ip[kp]=0);var Lp=Ip[kp]++,Pp=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+Lp+i+t:o+n.key+"-"+Lp+(i?"-"+i:"")+"-"+t}},Dp=function(e){var t;return function(){return t||(t=e()),t}},qp=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},zp=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Vh(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},$p=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},_p=function(e,t){return e.selectorText=t,e.selectorText===t},jp=Dp((function(){return document.querySelector("head")}));function Bp(e){var t=Np.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=jp(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var Fp=Dp((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Hp=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Vp=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Up=function(){function e(e){this.getPropertyValue=qp,this.setProperty=zp,this.removeProperty=$p,this.setSelector=_p,this.hasInsertedRules=!1,this.cssRules=[],e&&Np.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=Fp();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Bp(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else jp().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=Vp(n,t);if(!1===(i=Hp(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=Vp(n,t),l=Hp(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ap&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Yp=0,Wp=function(){function e(e){this.id=Yp++,this.version="10.10.0",this.plugins=new Rp,this.options={id:{minify:!1},createGenerateId:Pp,Renderer:Ph?Up:null,plugins:[]},this.generateId=Pp({minify:!1});for(var t=0;t<Mp.length;t++)this.plugins.use(Mp[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Vm({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Np.index?0:Np.index+1);var r=new Ap(e,Vm({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Np.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=Vm({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Fh(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Xp=function(e){return new Wp(e)},Gp="object"==typeof CSS&&null!=CSS&&"number"in CSS;function Kp(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=Kp(r);o&&(t||(t={}),t[n]=o)}}return t}
7
+ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,d,m,h,p,f,g,y,v,b,x,S,E,M,C,T,O,A,R,w,N,I,k,L,P,D,q,z,$,_,j,B,F,H,V,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,u=e.useAppLayout,c=e.usePlugins,d=e.useEmbed,m=e.useOptions,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,y=e.useLayout,v=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.cache,T=e.debouncer,O=e.throttler,A=e.colorService,R=e.tooltipService,w=e.layoutService,N=e.dockService,I=e.themeService,k=e.pluginService,L=e.storage,P=e.selectionService,D=e.fontResolver},function(e){q=e.default},function(e){z=e.default},function(e){$=e.default},function(e){_=e.default,j=e,B=e.Children,F=e.isValidElement,H=e.cloneElement},function(e){V=e,U=e.default},function(e){Y=e.default}],execute:function(){e("default",(function(e){var i,o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(W).forEach((t=>{e.add(W[t])}))}}(e.translator);const{flags:a}=e,s=null===(i=e.anything)||void 0===i||null===(o=i.sense)||void 0===o?void 0:o.isUnsupportedFeature,l=kx();return{qae:BC(e),ext:pT(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),i=function(){const[e,t]=n();return r((()=>{t(L({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),o=function(){const e=m(),t=h(),i=d(),o=p(),[a,s]=n(),l=f();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);r>-1&&o[e].splice(r,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),c=function(){var e,t,i;const o=g(),[a,s]=n(!1),[l,u]=n(!1),c=y(),d=h(),m=!!c.qSelectionInfo.qInSelections,p=!(null===(e=c.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(i=t[0])||void 0===i||!i.qIsOneAndOnlyOne);r((()=>{o&&s(!o.select&&!o.active)}),[o]);const f=e=>{u("boolean"==typeof e?e:!l)};return v((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:IC,hidden:!a||!m||p,active:l,action:f})),[m,p,l,a,d.language()]),{action:f,enabled:()=>a,active:()=>l}}();let d=kC;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||kC}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),c=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r((()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[i]),a}({picasso:l,environment:o}),b=DC({chart:c,actions:u}),x=NC({picasso:l,chart:c,environment:o,flags:a,viewState:i,viewCache:e,actions:u,selectionService:b});wm({picasso:l,chart:c,models:x,environment:o,flags:a,viewState:i,viewCache:e,actions:u}),Tm({picasso:l,chart:c,models:x,environment:o,flags:a,viewState:i,viewCache:e,actions:u,isUnsupportedFeature:s}),FC({models:x,chart:c,viewState:i})}}}));var W={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G=Object.prototype.hasOwnProperty,K=Object.prototype.toString,J=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Q=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===K.call(e)},ee=function(e){if(!e||"[object Object]"!==K.call(e))return!1;var t,n=G.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&G.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||G.call(e,t)},te=function(e,t){J&&"__proto__"===t.name?J(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!G.call(e,t))return;if(Z)return Z(e,t).value}return e[t]},re=function e(){var t,n,r,i,o,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=ne(s,n),s!==(i=ne(t,n))&&(c&&i&&(ee(i)||(o=Q(i)))?(o?(o=!1,a=r&&Q(r)?r:[]):a=r&&ee(r)?r:{},te(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&te(s,{name:n,newValue:i}));return s},ie=X(re);const oe="center",ae="bottom";var se={NoDataExist:{label:"NoDataExist",alignment:oe,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:oe,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:oe,default:!1},LimitedData:{label:"LimitedData",alignment:ae,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:ae,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:ae,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:ae,default:!1}};const le=[["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}]],ue={};le.forEach((([e,{width:t,height:n}])=>{ue[e]={width:t,height:n}}));const ce={getLayoutModes:()=>ue,getLayoutMode(e,t){let n;for(n=0;n<le.length;++n)if(e>=le[n][1].width&&t>=le[n][1].height)return le[n][0];return"SPARK"}};const de=["$date","$timestamp","$time"],me=["D","TS","T"],he={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>de.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&me.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(he.hasTimeTag(t)&&he.hasUnknownFormat(t)||he.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&he.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n,r;const i=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==i?void 0:i.length)&&void 0!==r?r:0)<1)&&he.canBeContinuousDimension(i[0])},maxNumberOfLines:12},pe=/^[A-Z][A-z0-9_]*$/i,fe={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||pe.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},ge=e=>fe.getValue(e,"qHyperCube.qDimensionInfo",[]),ye=e=>fe.getValue(e,"qHyperCube.qMeasureInfo",[]),ve=e=>fe.getValue(e,"barGrouping.grouping"),be={continuous:(e,t=!1)=>!!he.canBeContinuous(e)&&(fe.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ge(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ve(e)&&(ge(e).length>1||ye(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ge(e).length>1&&1===ye(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ge(e).length&&ye(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ve(e)||this.continuous(e))&&(ge(e).length>1||ye(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ge(e).length>1&&1===ye(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ge(e).length&&ye(e).length>1},simple:e=>0===ge(e).length||1===ge(e).length&&1===ye(e).length,snapshot:e=>!!fe.getValue(e,"snapshotData")};function xe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Se=e=>{throw e.isHandled=!0,e};const Ee={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Ee.getVerticalDock(t):n?Ee.getOppositeDock(Ee.getHorizontalDock(t)):Ee.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},Me={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=Me.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=Me.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=Me.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(Me.stringWidthOverMWidth(o)+1.0909090909090908*a)}},Ce=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Te=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Oe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ae={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Ce.test(e),isRtlChar:e=>Te.test(e)||Oe.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Ae.isLtrChar(r))return"ltr";if(Ae.isRtlChar(r))return"rtl"}return"ltr"}},Re={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,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("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=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Re.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=Ae.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=Ae.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:Ae.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=Ae.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Ae.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Re.getColorSymbol(e,t)]:[Re.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Ae.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Ae.detectTextDirection(e.value);let l;return l=i?r?[e.value,Re.getColorSymbol(t,n)]:[Re.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function we(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ne(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ie(){}var ke=.7,Le=1/ke,Pe="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ze=/^#([0-9a-f]{3,8})$/,$e=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),_e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),je=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${De}\\)$`),Be=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Fe=new RegExp(`^hsl\\(${De},${qe},${qe}\\)$`),He=new RegExp(`^hsla\\(${De},${qe},${qe},${De}\\)$`),Ve={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 Ue(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function We(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ze.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xe(t):3===n?new Ze(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ge(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ge(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=$e.exec(e))?new Ze(t[1],t[2],t[3],1):(t=_e.exec(e))?new Ze(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=je.exec(e))?Ge(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ge(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fe.exec(e))?it(t[1],t[2]/100,t[3]/100,1):(t=He.exec(e))?it(t[1],t[2]/100,t[3]/100,t[4]):Ve.hasOwnProperty(e)?Xe(Ve[e]):"transparent"===e?new Ze(NaN,NaN,NaN,0):null}function Xe(e){return new Ze(e>>16&255,e>>8&255,255&e,1)}function Ge(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ze(e,t,n,r)}function Ke(e){return e instanceof Ie||(e=We(e)),e?new Ze((e=e.rgb()).r,e.g,e.b,e.opacity):new Ze}function Je(e,t,n,r){return 1===arguments.length?Ke(e):new Ze(e,t,n,null==r?1:r)}function Ze(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Qe(){return`#${rt(this.r)}${rt(this.g)}${rt(this.b)}`}function et(){const e=tt(this.opacity);return`${1===e?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${1===e?")":`, ${e})`}`}function tt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rt(e){return((e=nt(e))<16?"0":"")+e.toString(16)}function it(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,n,r)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Ie||(e=We(e)),!e)return new at;if(e instanceof at)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new at(a,s,l,e.opacity)}function at(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function st(e){return(e=(e||0)%360)<0?e+360:e}function lt(e){return Math.max(0,Math.min(1,e||0))}function ut(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}we(Ie,We,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ue,formatHex:Ue,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ot(this).formatHsl()},formatRgb:Ye,toString:Ye}),we(Ze,Je,Ne(Ie,{brighter(e){return e=null==e?Le:Math.pow(Le,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(nt(this.r),nt(this.g),nt(this.b),tt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qe,formatHex:Qe,formatHex8:function(){return`#${rt(this.r)}${rt(this.g)}${rt(this.b)}${rt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:et,toString:et})),we(at,(function(e,t,n,r){return 1===arguments.length?ot(e):new at(e,t,n,null==r?1:r)}),Ne(Ie,{brighter(e){return e=null==e?Le:Math.pow(Le,e),new at(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new at(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ze(ut(e>=240?e-240:e+120,i,r),ut(e,i,r),ut(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new at(st(this.h),lt(this.s),lt(this.l),tt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=tt(this.opacity);return`${1===e?"hsl(":"hsla("}${st(this.h)}, ${100*lt(this.s)}%, ${100*lt(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,dt=180/Math.PI,mt=.96422,ht=1,pt=.82521,ft=4/29,gt=6/29,yt=3*gt*gt,vt=gt*gt*gt;function bt(e){if(e instanceof xt)return new xt(e.l,e.a,e.b,e.opacity);if(e instanceof Ot)return At(e);e instanceof Ze||(e=Ke(e));var t,n,r=Ct(e.r),i=Ct(e.g),o=Ct(e.b),a=St((.2225045*r+.7168786*i+.0606169*o)/ht);return r===i&&i===o?t=n=a:(t=St((.4360747*r+.3850649*i+.1430804*o)/mt),n=St((.0139322*r+.0971045*i+.7141733*o)/pt)),new xt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function xt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function St(e){return e>vt?Math.pow(e,1/3):e/yt+ft}function Et(e){return e>gt?e*e*e:yt*(e-ft)}function Mt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ot)return new Ot(e.h,e.c,e.l,e.opacity);if(e instanceof xt||(e=bt(e)),0===e.a&&0===e.b)return new Ot(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*dt;return new Ot(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ot(e,t,n,null==r?1:r)}function Ot(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function At(e){if(isNaN(e.h))return new xt(e.l,0,0,e.opacity);var t=e.h*ct;return new xt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}we(xt,(function(e,t,n,r){return 1===arguments.length?bt(e):new xt(e,t,n,null==r?1:r)}),Ne(Ie,{brighter(e){return new xt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new xt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ze(Mt(3.1338561*(t=mt*Et(t))-1.6168667*(e=ht*Et(e))-.4906146*(n=pt*Et(n))),Mt(-.9787684*t+1.9161415*e+.033454*n),Mt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),we(Ot,Tt,Ne(Ie,{brighter(e){return new Ot(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ot(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return At(this).rgb()}}));var Rt={isDark:function(e){return Tt(e).l<70}};function wt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function Nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){return 1===e.length&&(e=function(e){return function(t,n){return Nt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var kt=It(Nt).right,Lt=Math.sqrt(50),Pt=Math.sqrt(10),Dt=Math.sqrt(2);function qt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Lt?10:o>=Pt?5:o>=Dt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Lt?10:o>=Pt?5:o>=Dt?2:1)}function zt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Lt?i*=10:o>=Pt?i*=5:o>=Dt&&(i*=2),t<e?-i:i}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var _t="$";function jt(){}function Bt(e,t){var n=new jt;if(e instanceof jt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ft(){}jt.prototype=Bt.prototype={constructor:jt,has:function(e){return _t+e in this},get:function(e){return this[_t+e]},set:function(e,t){return this[_t+e]=t,this},remove:function(e){var t=_t+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===_t&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===_t&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===_t&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===_t&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===_t&&++e;return e},empty:function(){for(var e in this)if(e[0]===_t)return!1;return!0},each:function(e){for(var t in this)t[0]===_t&&e(this[t],t.slice(1),this)}};var Ht=Bt.prototype;Ft.prototype={constructor:Ft,has:Ht.has,add:function(e){return this[_t+(e+="")]=e,this},remove:Ht.remove,clear:Ht.clear,values:Ht.keys,size:Ht.size,empty:Ht.empty,each:Ht.each};var Vt=Array.prototype,Ut=Vt.map,Yt=Vt.slice;function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gt(){}var Kt=.7,Jt=1/Kt,Zt="\\s*([+-]?\\d+)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",en="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tn=/^#([0-9a-f]{3})$/,nn=/^#([0-9a-f]{6})$/,rn=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),on=new RegExp("^rgb\\("+[en,en,en]+"\\)$"),an=new RegExp("^rgba\\("+[Zt,Zt,Zt,Qt]+"\\)$"),sn=new RegExp("^rgba\\("+[en,en,en,Qt]+"\\)$"),ln=new RegExp("^hsl\\("+[Qt,en,en]+"\\)$"),un=new RegExp("^hsla\\("+[Qt,en,en,Qt]+"\\)$"),cn={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 dn(e){var t;return e=(e+"").trim().toLowerCase(),(t=tn.exec(e))?new gn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=nn.exec(e))?mn(parseInt(t[1],16)):(t=rn.exec(e))?new gn(t[1],t[2],t[3],1):(t=on.exec(e))?new gn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=an.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=sn.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ln.exec(e))?vn(t[1],t[2]/100,t[3]/100,1):(t=un.exec(e))?vn(t[1],t[2]/100,t[3]/100,t[4]):cn.hasOwnProperty(e)?mn(cn[e]):"transparent"===e?new gn(NaN,NaN,NaN,0):null}function mn(e){return new gn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new gn(e,t,n,r)}function pn(e){return e instanceof Gt||(e=dn(e)),e?new gn((e=e.rgb()).r,e.g,e.b,e.opacity):new gn}function fn(e,t,n,r){return 1===arguments.length?pn(e):new gn(e,t,n,null==r?1:r)}function gn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function yn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function vn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bn(e,t,n,r)}function bn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function xn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wt(Gt,dn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Wt(gn,fn,Xt(Gt,{brighter:function(e){return e=null==e?Jt:Math.pow(Jt,e),new gn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new gn(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"#"+yn(this.r)+yn(this.g)+yn(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+")")}})),Wt(bn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof bn)return new bn(e.h,e.s,e.l,e.opacity);if(e instanceof Gt||(e=dn(e)),!e)return new bn;if(e instanceof bn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new bn(a,s,l,e.opacity)}(e):new bn(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return e=null==e?Jt:Math.pow(Jt,e),new bn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new bn(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,i=2*n-r;return new gn(xn(e>=240?e-240:e+120,i,r),xn(e,i,r),xn(e<120?e+240:e-120,i,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 Sn=Math.PI/180,En=180/Math.PI,Mn=.96422,Cn=1,Tn=.82521,On=4/29,An=6/29,Rn=3*An*An,wn=An*An*An;function Nn(e){if(e instanceof In)return new In(e.l,e.a,e.b,e.opacity);if(e instanceof qn){if(isNaN(e.h))return new In(e.l,0,0,e.opacity);var t=e.h*Sn;return new In(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof gn||(e=pn(e));var n,r,i=Dn(e.r),o=Dn(e.g),a=Dn(e.b),s=kn((.2225045*i+.7168786*o+.0606169*a)/Cn);return i===o&&o===a?n=r=s:(n=kn((.4360747*i+.3850649*o+.1430804*a)/Mn),r=kn((.0139322*i+.0971045*o+.7141733*a)/Tn)),new In(116*s-16,500*(n-s),200*(s-r),e.opacity)}function In(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function kn(e){return e>wn?Math.pow(e,1/3):e/Rn+On}function Ln(e){return e>An?e*e*e:Rn*(e-On)}function Pn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Dn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function qn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Wt(In,(function(e,t,n,r){return 1===arguments.length?Nn(e):new In(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return new In(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new In(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 gn(Pn(3.1338561*(t=Mn*Ln(t))-1.6168667*(e=Cn*Ln(e))-.4906146*(n=Tn*Ln(n))),Pn(-.9787684*t+1.9161415*e+.033454*n),Pn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Wt(qn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof qn)return new qn(e.h,e.c,e.l,e.opacity);if(e instanceof In||(e=Nn(e)),0===e.a&&0===e.b)return new qn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*En;return new qn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new qn(e,t,n,null==r?1:r)}),Xt(Gt,{brighter:function(e){return new qn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new qn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Nn(this).rgb()}}));var zn=-.14861,$n=1.78277,_n=-.29227,jn=-.90649,Bn=1.97294,Fn=Bn*jn,Hn=Bn*$n,Vn=$n*_n-jn*zn;function Un(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Yn)return new Yn(e.h,e.s,e.l,e.opacity);e instanceof gn||(e=pn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Vn*r+Fn*t-Hn*n)/(Vn+Fn-Hn),o=r-i,a=(Bn*(n-i)-_n*o)/jn,s=Math.sqrt(a*a+o*o)/(Bn*i*(1-i)),l=s?Math.atan2(a,o)*En-120:NaN;return new Yn(l<0?l+360:l,s,i,e.opacity)}(e):new Yn(e,t,n,null==r?1:r)}function Yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Wn(e){return function(){return e}}function Xn(e,t){return function(n){return e+n*t}}function Gn(e){return 1==(e=+e)?Kn: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):Wn(isNaN(t)?n:t)}}function Kn(e,t){var n=t-e;return n?Xn(e,n):Wn(isNaN(e)?t:e)}Wt(Yn,Un,Xt(Gt,{brighter:function(e){return e=null==e?Jt:Math.pow(Jt,e),new Yn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new Yn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Sn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new gn(255*(t+n*(zn*r+$n*i)),255*(t+n*(_n*r+jn*i)),255*(t+n*(Bn*r)),this.opacity)}}));var Jn=function e(t){var n=Gn(t);function r(e,t){var r=n((e=fn(e)).r,(t=fn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Kn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Zn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=or(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Qn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function er(e,t){return t-=e=+e,function(n){return e+t*n}}function tr(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=or(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var nr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rr=new RegExp(nr.source,"g");function ir(e,t){var n,r,i,o=nr.lastIndex=rr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=nr.exec(e))&&(r=rr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:er(n,r)})),o=rr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function or(e,t){var n,r=typeof t;return null==t||"boolean"===r?Wn(t):("number"===r?er:"string"===r?(n=dn(t))?(t=n,Jn):ir:t instanceof dn?Jn:t instanceof Date?Qn:Array.isArray(t)?Zn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?tr:er)(e,t)}function ar(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function sr(e){return function t(n){function r(t,r){var i=e((t=Un(t)).h,(r=Un(r)).h),o=Kn(t.s,r.s),a=Kn(t.l,r.l),s=Kn(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function lr(e){return+e}sr((function(e,t){var n=t-e;return n?Xn(e,n>180||n<-180?n-360*Math.round(n/360):n):Wn(isNaN(e)?t:e)})),sr(Kn);var ur=[0,1];function cr(e){return e}function dr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function mr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function hr(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=dr(i,r),o=n(a,o)):(r=dr(r,i),o=n(o,a)),function(e){return o(r(e))}}function pr(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=dr(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=kt(e,t,1,r)-1;return o[n](i[n](t))}}function fr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function gr(e,t){return function(){var e,t,n,r,i,o,a=ur,s=ur,l=or,u=cr;function c(){return r=Math.min(a.length,s.length)>2?pr:hr,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),er)))(n)))},d.domain=function(e){return arguments.length?(a=Ut.call(e,lr),u===cr||(u=mr(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Yt.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Yt.call(e),l=ar,c()},d.clamp=function(e){return arguments.length?(u=e?mr(a):cr,d):u!==cr},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function yr(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)]}function vr(e){return(e=yr(Math.abs(e)))?e[1]:NaN}var br,xr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sr(e){return new Er(e)}function Er(e){if(!(t=xr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Mr(e,t){var n=yr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Sr.prototype=Er.prototype,Er.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 Cr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Mr(100*e,t)},r:Mr,s:function(e,t){var n=yr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(br=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+yr(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Tr(e){return e}var Or,Ar,Rr,wr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):Tr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Tr,s=e.percent||"%";function l(e){var t=(e=Sr(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,m=e.comma,h=e.precision,p=e.trim,f=e.type;"n"===f?(m=!0,f="g"):Cr[f]||(null==h&&(h=12),p=!0,f="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?i[0]:"#"===u&&/[boxX]/.test(f)?"0"+f.toLowerCase():"",y="$"===u?i[1]:/[%p]/.test(f)?s:"",v=Cr[f],b=/[defgprs%]/.test(f);function x(e){var i,s,u,x=g,S=y;if("c"===f)S=v(e)+S,e="";else{var E=(e=+e)<0;if(e=v(Math.abs(e),h),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),x=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===f?wr[8+br/3]:"")+S+(E&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){S=(46===u?o+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}m&&!c&&(e=r(e,1/0));var M=x.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(m&&c&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=x+e+S+C;break;case"=":e=x+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+x+e+S+C.slice(M);break;default:e=C+x+e+S}return a(e)}return h=null==h?6:/[gprs]/.test(f)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Sr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(vr(t)/3))),i=Math.pow(10,-r),o=wr[8+r/3];return function(e){return n(i*e)+o}}}}function Ir(e,t,n,r){var i,o=zt(e,t,n);switch((r=Sr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vr(t)/3)))-vr(Math.abs(e)))}(o,a))||(r.precision=i),Rr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vr(t)-vr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-vr(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Ar(r)}function kr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=qt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Ir(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=qt(s,l,n))>0?r=qt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=qt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function Lr(){var e=gr(cr,cr);return e.copy=function(){return fr(e,Lr())},$t.apply(e,arguments),kr(e)}Or=Nr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Ar=Or.format,Rr=Or.formatPrefix;var Pr=new Date,Dr=new Date;function qr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return qr((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&&(i.count=function(t,r){return Pr.setTime(+t),Dr.setTime(+r),e(Pr),e(Dr),Math.floor(n(Pr,Dr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var zr=qr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));zr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?qr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):zr:null},zr.range;var $r=1e3,_r=6e4,jr=36e5,Br=864e5,Fr=6048e5,Hr=qr((function(e){e.setTime(Math.floor(e/$r)*$r)}),(function(e,t){e.setTime(+e+t*$r)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getUTCSeconds()}));Hr.range;var Vr=qr((function(e){e.setTime(Math.floor(e/_r)*_r)}),(function(e,t){e.setTime(+e+t*_r)}),(function(e,t){return(t-e)/_r}),(function(e){return e.getMinutes()}));Vr.range;var Ur=qr((function(e){var t=e.getTimezoneOffset()*_r%jr;t<0&&(t+=jr),e.setTime(Math.floor((+e-t)/jr)*jr+t)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getHours()}));Ur.range;var Yr=qr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_r)/Br}),(function(e){return e.getDate()-1}));function Wr(e){return qr((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-(t.getTimezoneOffset()-e.getTimezoneOffset())*_r)/Fr}))}Yr.range;var Xr=Wr(0),Gr=Wr(1),Kr=Wr(2),Jr=Wr(3),Zr=Wr(4),Qr=Wr(5),ei=Wr(6);Xr.range,Gr.range,Kr.range,Jr.range,Zr.range,Qr.range,ei.range;var ti=qr((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()}));ti.range;var ni=qr((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()}));ni.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qr((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},ni.range;var ri=qr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*_r)}),(function(e,t){return(t-e)/_r}),(function(e){return e.getUTCMinutes()}));ri.range;var ii=qr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getUTCHours()}));ii.range;var oi=qr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Br}),(function(e){return e.getUTCDate()-1}));function ai(e){return qr((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)/Fr}))}oi.range;var si=ai(0),li=ai(1),ui=ai(2),ci=ai(3),di=ai(4),mi=ai(5),hi=ai(6);si.range,li.range,ui.range,ci.range,di.range,mi.range,hi.range;var pi=qr((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()}));pi.range;var fi=qr((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 gi(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 yi(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 vi(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}fi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qr((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},fi.range;var bi,xi,Si,Ei={"-":"",_:" ",0:"0"},Mi=/^\s*\d+/,Ci=/^%/,Ti=/[\\^$*+?|[\]().{}]/g;function Oi(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Ai(e){return e.replace(Ti,"\\$&")}function Ri(e){return new RegExp("^(?:"+e.map(Ai).join("|")+")","i")}function wi(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ni(e,t,n){var r=Mi.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ii(e,t,n){var r=Mi.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ki(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Li(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Pi(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Di(e,t,n){var r=Mi.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function qi(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zi(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 $i(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function _i(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ji(e,t,n){var r=Mi.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Bi(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Fi(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Hi(e,t,n){var r=Mi.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Vi(e,t,n){var r=Mi.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ui(e,t,n){var r=Mi.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yi(e,t,n){var r=Ci.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Wi(e,t,n){var r=Mi.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Xi(e,t,n){var r=Mi.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Gi(e,t){return Oi(e.getDate(),t,2)}function Ki(e,t){return Oi(e.getHours(),t,2)}function Ji(e,t){return Oi(e.getHours()%12||12,t,2)}function Zi(e,t){return Oi(1+Yr.count(ni(e),e),t,3)}function Qi(e,t){return Oi(e.getMilliseconds(),t,3)}function eo(e,t){return Qi(e,t)+"000"}function to(e,t){return Oi(e.getMonth()+1,t,2)}function no(e,t){return Oi(e.getMinutes(),t,2)}function ro(e,t){return Oi(e.getSeconds(),t,2)}function io(e){var t=e.getDay();return 0===t?7:t}function oo(e,t){return Oi(Xr.count(ni(e),e),t,2)}function ao(e,t){var n=e.getDay();return e=n>=4||0===n?Zr(e):Zr.ceil(e),Oi(Zr.count(ni(e),e)+(4===ni(e).getDay()),t,2)}function so(e){return e.getDay()}function lo(e,t){return Oi(Gr.count(ni(e),e),t,2)}function uo(e,t){return Oi(e.getFullYear()%100,t,2)}function co(e,t){return Oi(e.getFullYear()%1e4,t,4)}function mo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Oi(t/60|0,"0",2)+Oi(t%60,"0",2)}function ho(e,t){return Oi(e.getUTCDate(),t,2)}function po(e,t){return Oi(e.getUTCHours(),t,2)}function fo(e,t){return Oi(e.getUTCHours()%12||12,t,2)}function go(e,t){return Oi(1+oi.count(fi(e),e),t,3)}function yo(e,t){return Oi(e.getUTCMilliseconds(),t,3)}function vo(e,t){return yo(e,t)+"000"}function bo(e,t){return Oi(e.getUTCMonth()+1,t,2)}function xo(e,t){return Oi(e.getUTCMinutes(),t,2)}function So(e,t){return Oi(e.getUTCSeconds(),t,2)}function Eo(e){var t=e.getUTCDay();return 0===t?7:t}function Mo(e,t){return Oi(si.count(fi(e),e),t,2)}function Co(e,t){var n=e.getUTCDay();return e=n>=4||0===n?di(e):di.ceil(e),Oi(di.count(fi(e),e)+(4===fi(e).getUTCDay()),t,2)}function To(e){return e.getUTCDay()}function Oo(e,t){return Oi(li.count(fi(e),e),t,2)}function Ao(e,t){return Oi(e.getUTCFullYear()%100,t,2)}function Ro(e,t){return Oi(e.getUTCFullYear()%1e4,t,4)}function wo(){return"+0000"}function No(){return"%"}function Io(e){return+e}function ko(e){return Math.floor(+e/1e3)}!function(e){bi=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ri(i),c=wi(i),d=Ri(o),m=wi(o),h=Ri(a),p=wi(a),f=Ri(s),g=wi(s),y=Ri(l),v=wi(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Gi,e:Gi,f:eo,H:Ki,I:Ji,j:Zi,L:Qi,m:to,M:no,p:function(e){return i[+(e.getHours()>=12)]},Q:Io,s:ko,S:ro,u:io,U:oo,V:ao,w:so,W:lo,x:null,X:null,y:uo,Y:co,Z:mo,"%":No},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:ho,e:ho,f:vo,H:po,I:fo,j:go,L:yo,m:bo,M:xo,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:Io,s:ko,S:So,u:Eo,U:Mo,V:Co,w:To,W:Oo,x:null,X:null,y:Ao,Y:Ro,Z:wo,"%":No},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=m[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=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:_i,e:_i,f:Ui,H:Bi,I:Bi,j:ji,L:Vi,m:$i,M:Fi,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:Wi,s:Xi,S:Hi,u:Ii,U:ki,V:Li,w:Ni,W:Pi,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:qi,Y:Di,Z:zi,"%":Yi};function E(e,t){return function(n){var r,i,o,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!=(i=Ei[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=vi(1900);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=yi(vi(o.y))).getUTCDay(),r=i>4||0===i?li.ceil(r):li(r),r=oi.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(vi(o.y))).getDay(),r=i>4||0===i?Gr.ceil(r):Gr(r),r=Yr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?yi(vi(o.y)).getUTCDay():t(vi(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,yi(o)):t(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in Ei?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",gi);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,yi);return t.toString=function(){return e},t}}}(e),bi.format,bi.parse,xi=bi.utcFormat,Si=bi.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"]});var Lo="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||xi(Lo),+new Date("2000-01-01T00:00:00.000Z")||Si(Lo);var Po=1e3,Do=60*Po,qo=60*Do,zo=24*qo,$o=7*zo,_o=30*zo,jo=365*zo;function Bo(e){return new Date(e)}function Fo(e){return e instanceof Date?+e:+new Date(+e)}function Ho(e,t,n,r,i,o,a,s,l){var u=gr(cr,cr),c=u.invert,d=u.domain,m=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,Po],[a,5,5*Po],[a,15,15*Po],[a,30,30*Po],[o,1,Do],[o,5,5*Do],[o,15,15*Do],[o,30,30*Do],[i,1,qo],[i,3,3*qo],[i,6,6*qo],[i,12,12*qo],[r,1,zo],[r,2,2*zo],[n,1,$o],[t,1,_o],[t,3,3*_o],[e,1,jo]];function S(s){return(a(s)<s?m:o(s)<s?h:i(s)<s?p:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function E(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=It((function(e){return e[2]})).right(x,o);a===x.length?(i=zt(n/jo,r/jo,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(zt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Ut.call(e,Fo)):d().map(Bo)},u.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=E(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?S:l(t)},u.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):u},u.copy=function(){return fr(u,Ho(e,t,n,r,i,o,a,s,l))},u}function Vo(){return $t.apply(Ho(fi,pi,si,oi,ii,ri,Hr,zr,xi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Uo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Yo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var Wo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Uo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Yo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Yo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Xo({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Go;function Ko(){Go=Go||document.createElement("canvas").getContext("2d")}const Jo={measureTextWidth(e){Ko();const{width:t}=Go.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Ko();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Go.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[h]=m,c="",i=1;i<m.length;i++)if(l=`${h} ${m[i]}`,u=Jo.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=m[i]):h=l,"number"==typeof r&&s.length>=r){c=m.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${c}`}return s},wordWrap(e,t,n,r,i){if(Ko(),!e||!e.length)return[];n&&(Go.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||Jo.measureTextWidth(u)<=t?o.push(u):(s=Jo.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Jo.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=Jo.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&Jo.measureTextWidth(u)>t&&(o[o.length-1]=Jo.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){Ko();let i,o,a,s,l=e;const u=Jo.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Go.font=n),e&&t){if(Jo.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Jo.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Ko();let o,a=e,s="",l=[];if(Jo.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Jo.measureTextWidth(a)<=t));i--);return(!i&&!a||Jo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Jo.measureTextWidth(s)>t?(s=Jo.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Ko(),e&&t?(n&&(Go.font=n),Jo.explodeWord(e,t,r,Math.max(1,Jo.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Jo.lineWrap(e,t,n,r):[e],o=Jo.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Ko(),e&&(Go.font=e),1.5*Jo.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Ko(),t&&(Go.font=t);const s=Jo.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(r)||r<=0?m:Math.min(m,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Jo.wrapText(e,i,t,u[n])))})):d=Jo.wrapText(e,i,t,u[0],n),d}},Zo={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(ie({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},Qo=ie.bind(null,!0),ea={},{isArray:ta}=Array;function na(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ra(e){return void 0===e}function ia(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function oa(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=ra(e[r||t])?o:e[t],e=e[r||t]})),e}function aa(e,t){let n=!0;if(na(e)&&na(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{aa(e[r],t[r])||(n=!1)})),n);if(ta(e)&&ta(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!aa(e[n],t[n]))return!1;return!0}return e===t}ea.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Qo({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;aa(o,a)||ia(t,i)||(ra(a)?r.push({op:"add",path:s,value:o}):na(o)&&na(a)?r=r.concat(ea.generate(a,o,s)):ta(o)&&ta(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&ra(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(aa(t,i))return r;if(!ra(t[0])&&ra(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(ea.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{ra(t[i])&&!ia(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},ea.apply=function(e,t){t.forEach((t=>{let n=oa(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(ta(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(ta(i)&&ta(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(na(i)&&na(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ia(a,e)&&delete a[e]})),Qo(i,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 i=oa(e,t.from);ta(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(ta(n)?n.splice(+r,1):delete n[r]);var a}))},ea.clone=function(e){return Qo({},e)},ea.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},ea.updateObject=function(e,t){Object.keys(e).length?ea.apply(e,ea.generate(e,t)):Qo(e,t)};const sa=[[2,4,6],[2,4],[3]],la=[,[,,[[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 ua(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function ca(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)ua(e[r],t,n)}!function(){let e,t;for(ca(sa,1,10),e=0;e<la.length;e++)if(la[e])for(t=0;t<la[e].length;t++)Array.isArray(la[e][t])&&ca(la[e][t])}();const da={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=da.findSegmentPositionMeetMin(e,t);return da.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=da.findSegmentPositionMeetMax(e,n);return da.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=da.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=da.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,da.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)da.layoutPositionFromMin(e,t,n,r),da.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=da.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ma=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},ha=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,pa=e=>e.filter(ha),fa=(e,t)=>pa(fe.getValue(e,t,[])),ga=e=>ha(e)&&(!1!==e.showValue||!1!==e.showLabel),ya=e=>e.filter(ga),va=(e,t)=>ya(fe.getValue(e,t,[])),ba=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,xa=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},Sa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},Ea=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},Ma=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ca=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ta={isRefLineVisible:ha,getVisibleRefLines:pa,getRefLines:fa,getMeasureRefLines:e=>fa(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:fa(e,"refLine.dimRefLines"),isRefLineLabelVisible:ga,getVisibleRefLineLabels:ya,getRefLineLabels:va,getMeasureRefLineLabels:e=>va(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:va(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ma(s,i,o,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let u;return l=ma(s,i,o,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===u?s(n):u)+l}return l=ma(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=fe.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():fe.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=fe.getValue(l,u,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():i?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],i=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),o},getInputValue:ba,extractInfoFromInputValue:xa,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=ba({refLineLayout:e,layoutService:n});return xa(r,t,"id")},isDiscreteMinOutOfBounds:Sa,isDiscreteMaxOutOfBounds:Ea,isContinuousMinOutOfBounds:Ma,isContinuousMaxOutOfBounds:Ca,isOutOfRange:({value:e,qMin:t,qMax:n})=>Ma({value:e,qMin:t})||Ca({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Ea({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Sa({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Oa="…";function Aa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines=Jo.tokenize(i.title,t,`${Oa} ${i.valueString}`,3,n),i.maxNumLines=i.lines.length}}function Ra({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Jo.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function wa({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>Ra({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function Na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ia=3,ka=2;function La({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Pa=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ta.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ta.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ta.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ta.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Da={hasEngineFormat:La,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=Ta.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{canBeContinuous:d}=r.meta;let m,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,p=Pa({label:o,dataPages:c,qMin:m,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Ta.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=La({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,r.title=Da.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=La({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,n.title=Da.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ae.lrm}(${o})${Ae.lrm}`,n.title=Da.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=Da.getTotalNumLines(e)-r;if(t<=0)return;Da.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Da.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map((e=>e)),y=n;Da.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:c,rtl:m,isContinuous:p,isDimension:f}),Na(e,"center"),Da.addLabelsNeighborInfo(e,r,i,o),Aa(e,a,s),Da.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===c&&(Da.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=Jo.tokenize(i.title,t,`${Oa} ${i.valueString}`,i.maxNumLines,n))}}(e,a,s)),Da.addLabelsSize(e,s,l,d),Da.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=r,{minorCenter:c}=i,{fontSize:d,fontFamily:m,background:h}=t;let p=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const h={type:"text",text:t,title:Ra({title:e.title,font:a,ellipsis:`… ${e.valueString}`}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:u};return h[l]=c,h[s]=e.segment.position,h.y+=(i-(r-1)/2)*o,h}));e.background&&p.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=Ia,padding:u={}}=a,{top:c=ka,bottom:d=ka,left:m=ka,right:h=ka}=u,p=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(m+h),height:i.height+(c+d),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+m,f.y-=p*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:h})),p=p.concat(i)})),p}};function qa(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function za(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return Da.getMaxTextWidth(e)>a&&(Aa(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+i+o}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,Da.getMaxTextWidth(e))+n+r}(t,n)}function $a(e,t){return t?e.domain():[0,1]}function _a(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function ja(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ba(e,t){return e>9?t[1]:t[0]}function Fa({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:h,minorDimension:p,dock:f}=s,g=i[p],y=Zo.createOob({oob:Zo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=f;const v=`c${m}`,b=`c${h}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};x[b]=g/2,x[v]=a;const S={type:"text",text:c>9?"9+":c,title:wa({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return S[h]=g/2,S[m]=a,[y,x,S]}function Ha(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Jo.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const Va=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var Ua={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Va(this.settings.labels),s=qa(this.chart,this.settings.formatter,e);Da.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=$a(t,n);return _a(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return _a(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Ha(t.label),{dock:n}=this.settings.layout;return Da.measureLabelsWidth(c,this.measureText),d=za(n,c,e),d}const m=ja(this.measureText),h=l?Ba(l,m):0,p=u?Ba(u,m):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,u=Va(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),p=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,m),{orientation:f,majorDimension:g}=h,{majorSize:y}=p,{font:v,lineHeight:b,gap:x,maxLabelWidth:S}=Ha(n.label),E=qa(this.chart,this.settings.formatter,e),M=y;Da.addLabelTitles({labels:u,formatter:E,isContinuous:o,canBeContinuous:l,localeInfo:s}),Da.calculateLabelPositions({labels:u,scale:e,size:M,layoutService:r,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[C,T]=$a(e,o),{filteredLabels:O,lowerOobs:A,upperOobs:R,lowerCircleSize:w,upperCircleSize:N,lowerOobSpace:I,upperOobSpace:k}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=_a(e,t,n,u),h="scaledValue"!==u&&Ta.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,c,h),f=function(e,t,n){return n?e:t}(d,c,h),g=p.length,y=f.length,v=ja(l),b=Ba(g,v),x=Ba(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),E=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:m,lowerOobs:p,upperOobs:f,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:E}}({labels:u,minValue:C,maxValue:T,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),L=I,P=y-k;Na(A),Na(R);const D=Fa({alignment:0,dockValue:0,oobs:A,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+w/2,areaProps:h,radius:w/2,font:v}),q=Fa({alignment:1,dockValue:1,oobs:R,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:h,radius:N/2,font:v});Da.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:L,upperLimit:P,font:v,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),da.layout(O.map((e=>e.segment)),L,P,n.label.gap);const z=O.filter((e=>da.isInside(e.segment,L,P,o)));return Da.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:h,area:p,lineHeight:b,font:v,theme:i}).concat([...D,...q])}};var Ya={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Wa(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=ie(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=Ya;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var Xa={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,u=a.y-s.y,c=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Wa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Wa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Ga,extractInfoFromInputValue:Ka,resolveValue:Ja}=Ta;var Za={resolveValue:Ja,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ga({refLineLayout:e,layoutService:n});return Ka(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ga({refLineLayout:e,layoutService:n});return Ka(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=Ga({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ga({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Qa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,h;const p={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):(p.valueInfo=Za.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),p.value=()=>{var e;const i=Ta.getScaledPosition({scale:a.scale(s),value:Za.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:p.valueInfo,size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i}),p};function es({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!p.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Xa.lines.trackBy,compensateForLayoutChanges:Xa.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!u),y=!e||n.meta.isContinuous;return p.forEach((o=>{f.lines[l].push(Qa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),f}const ts={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}},ns=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:u,theme:c,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:u?2:4,right:u?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Xa.refLineLabels.trackBy,compensateForLayoutChanges:Xa.refLineLabels.compensateForLayoutChanges}}),rs=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>Za.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Za.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Za.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l};function is({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const f=[],g=!e||n.meta.isContinuous,y=p.map((e=>rs({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:u,isContinuous:g})));return f.push(ns({isDimension:e,rtl:d,style:ie(!0,ts,s),dock:o,key:m,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:u,isContinuous:g,localeInfo:c})),f}function os({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=be.dimensionless(o),l=Ta.getMeasureRefLines(o),u=Ta.getDimensionRefLines(o,s),c=Ta.getMeasureRefLineLabels(o),d=Ta.getDimensionRefLineLabels(o,s);let m={},h={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=Ta.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return Ta.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return Ta.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:e=>Ta.getRefLines(o,e),getRefLineLabels:e=>Ta.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(m=Ta.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,u.forEach((t=>{const n=Ta.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return f.update(),f}function as(e){if(null!=e&&e.isEnabled("IM_4962_SVG_CHART_LABELS"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}var ss={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},ls={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const us={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 cs(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ds={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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=o[t]*(n>l?1:n/l),c=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(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=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function ms(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;let a,s,l,u,c,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var m;if(a=e.session.options||(null===(m=e.enigmaModel)||void 0===m?void 0:m.session.sessionConfig),!a){var h;a=null===(h=e.session)||void 0===h?void 0:h.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",u=a.port?`:${a.port}`:"",c=a.prefix?a.prefix:"/","/"!==c[c.length-1]&&(c=`${c}/`),s+l+u+c}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await ds.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function hs(e,t,n,r){var i,o,a,s,l,u;const{app:c,flags:d}=t,m=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!m)return[];const[h]=m,p=h.size||"small",f=h.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.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"===f&&null!==(l=h.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return ms(h,p,c);if("url"===f)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&cs(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ds.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await ds.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(c,d,h,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===f&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(cs(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ds.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(c,n[g],p,v)}return[]}const ps={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(hs(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},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}},fs={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await ps.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>ps.checkIfPromisesExist({customTooltipModel:e})};const gs=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:us.CHART.CHART_PARENT_TYPE,qId:us.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ys=e=>{var t,n,r;const i=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:us.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const vs={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,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=us.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:us.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:i,rtl:o})=>{var a,s,l;const u=i,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 vs.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=us.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=us.CHART.STATE,a=gs(t,o),s=await e.createSessionObject(a),l=ys(t);if(s.id!==us.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,m,h,p;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(m=n[0].data)||void 0===m?void 0:m.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var f,g;const e=null!==(f=n[0].data.selectionOuterDimension)&&void 0!==f?f: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(us.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(h=u.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(p=u.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await vs.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(vs.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(us.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=us.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({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 bs(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function xs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=us.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function Ss(e){const t=xs();return e.filter((e=>t[e.id]))}const Es={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=Es.getAttrExprData(a);o.length||n.length?fs.handlePromises({customTooltipModel:i,nodes:Es.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&vs.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>fs.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.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[us.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[us.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[us.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Ss(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[us.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[us.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=bs(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===Ss(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=bs(e)||[];[...i,t].forEach((e=>{const t=Ss(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=xs(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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:Ae.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ae.detectTextDirection(e.src),r=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Ms(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[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 i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case us.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case us.CUSTOM.TITLE:case us.CUSTOM.DESCRIPTION:case us.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const Cs={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Ms(t,e,r,n)}}};const Ts={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[us.CUSTOM.TITLE]:!0,[us.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=Es.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===us.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===us.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Re.getMeasure(e,t))),e,o)}};function Os({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(Ts.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:As}=us;function Rs({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:u}){const c={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Es,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=()=>{var e,n;const r=!(null===(e=c.properties)||void 0===e||null===(n=e.qHyperCubeDef)||void 0===n||!n.qDimensions.some((e=>{var t,n;return null===(t=e.qCalcCondition)||void 0===t||null===(n=t.qCond)||void 0===n?void 0:n.qv})));return!(!t.tooltip||t.tooltip.auto||r)};return{setProperties:e=>{c.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&E(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=Os({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===As.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===As.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>Es.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>Es.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const i=Es.getDataNodes(o,r),{attrExps:a}=Es.getAttrExprData(t);return fs.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(n=e.chart)&&void 0!==n&&null!==(i=n.object)&&void 0!==i&&i.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e,n,i},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>vs.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Es.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>vs.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>vs.hide({app:n,customTooltipModel:d}),destroy:()=>vs.destroyVisualization({customTooltipModel:d})}}}function ws({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===ls.TYPE.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:Cs.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Ns({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:Cs.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function Is({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===ls.TYPE.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const ks={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Ls={OPTIONS:ks,DEFAULT:ks.MINI_CHART};function Ps({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Ds({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const qs=e=>({miniChart:e===Ls.OPTIONS.MINI_CHART.value,bar:e===Ls.OPTIONS.BAR.value,none:e===Ls.OPTIONS.NONE.value}),zs=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return qs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return qs(Ls.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return qs(!n&&(r||!r&&i)?Ls.OPTIONS.NONE.value:Ls.OPTIONS.MINI_CHART.value)};function $s({layoutService:e,override:t}){const n=zs({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ls.OPTIONS.MINI_CHART.value,n.bar=t.value===Ls.OPTIONS.BAR.value,n.none=t.value===Ls.OPTIONS.NONE.value),n}function _s({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,h=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[y,v]=Ds({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:f,relative:g,thumb:S?f-y*p:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function js({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=Ds({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(m-d)*c}}}function Bs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=_s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=js({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Fs="data-scrollbar-handle";function Hs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Fs)||""}const Vs="scrollbarResize",Us=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=_s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Vs}`,options:{event:Vs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Vs]=this[Vs]||{},Us(t)&&Hs({e:t})&&(this[Vs].panningEvent=t.srcEvent),!!this[Vs].panningEvent))}},events:{[`${Vs}start`](n){n.preventDefault(),this[Vs]=this[Vs]||{},this[Vs].panningEvent&&t.component(e).emit("dragStart",this[Vs].panningEvent)},[`${Vs}move`](n){if(n.preventDefault(),this[Vs]=this[Vs]||{},!this[Vs].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Hs({e:this[Vs].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;m===h&&(m-="start"===d?u:0,h+="end"===d?u:0),r.set("zoom",{min:m,max:h}),t.component(e).emit("render")},[`${Vs}end`](n){n.preventDefault(),this[Vs]=this[Vs]||{},delete this[Vs].panningEvent,t.component(e).emit("dragEnd")},[`${Vs}cancel`](n){n.preventDefault(),this[Vs]=this[Vs]||{},delete this[Vs].panningEvent,t.component(e).emit("dragEnd")}}}}const Ws="scrollbarPan";function Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=_s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=js({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ws}`,options:{event:Ws,threshold:0,enable(r,i){return this[Ws]=this[Ws]||{},!(i&&!this[Ws].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{[`${Ws}start`](n){n.preventDefault();const a=u(n);if(this[Ws]=this[Ws]||{},this[Ws].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Ws].relative=a.relative,this[Ws].zoom=r.get("zoom"),this[Ws].zoom.span=this[Ws].zoom.max-this[Ws].zoom.min,this[Ws].zoom.fullSpan=o-n}else if(a.onThumb)this[Ws].offset=a.thumb;else{const e=c();this[Ws].offset=a.beforeThumb?0:e.thumbSize}},[`${Ws}move`](n){n.preventDefault();const a=u(n);if(this[Ws]=this[Ws]||{},o.meta.isContinuous){const e=a.relative-this[Ws].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ws].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ws].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ws}end`](n){n.preventDefault(),this[Ws]=this[Ws]||{},this[Ws].isPanning=!1,t.component(e).emit("unlockState")},[`${Ws}cancel`](n){n.preventDefault(),this[Ws]=this[Ws]||{},this[Ws].isPanning=!1,t.component(e).emit("unlockState")}}}}function Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Bs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Ks({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Js={background:"rgba(0, 0, 0, 0.1)"},Zs={top:-1,bottom:-1,width:6},Qs={width:2,background:"#595959"};var el={before:Js,after:Js,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Zs,endHandle:Zs,startHandleBorder:Qs,endHandleBorder:Qs};const tl={background:"rgba(0, 0, 0, 0.1)"},nl={top:-1,bottom:-1,width:6},rl={width:2,background:"#595959"};var il={before:tl,after:tl,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:nl,endHandle:nl,startHandleBorder:rl,endHandleBorder:rl};const ol={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},al={pointerEvents:"initial"},sl={pointerEvents:"none"};const ll="ew-resize",ul="default";function cl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function dl(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?ll:ul}function ml(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function hl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function pl(){const{size:e,start:t,end:n}=cl.call(this);this.renderer.render(this.elements(this.h,ml.call(this,e,t,n)))}function fl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?il:el;return{container:{...ol},before:{...ol,...n.before,...t.before},after:{...ol,...n.after,...t.after},thumb:{...ol,...n.thumb,...t.thumb},startHandle:{...ol,...al,...n.startHandle},endHandle:{...ol,...al,...n.endHandle},startHandleBorder:{...ol,...sl,...n.startHandleBorder},endHandleBorder:{...ol,...sl,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var gl={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){pl.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!hl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Hs({e:e});t&&(this.state.hover[t]=!0),dl.call(this),pl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),dl.call(this),pl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Hs({e:e});t&&(this.state.drag[t]=!0),dl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),dl.call(this),pl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=cl.call(this);return this.elements(e,ml.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-n},m={[i.start]:r},h={left:-3},p={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?f:h},class:"scrollbar--start-handle",[Fs]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?h:f},class:"scrollbar--end-handle",[Fs]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...c])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:fl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function yl({layoutService:e}){return e.meta.isContinuous&&$s({layoutService:e}).miniChart}function vl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(ls.TYPE.LINE),l=[...Ns({forceCreate:!0,key:ss.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Ns({key:ss.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Ns({key:ss.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...ws({key:ss.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...ws({key:ss.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...Is({key:ss.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Is({key:ss.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return yl(e)&&(l.push(...Ns({key:ss.COLLECTION.REDUCED,source:ss.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Ns({key:ss.COLLECTION.REDUCED_PRIMARY,source:ss.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Ns({key:ss.COLLECTION.REDUCED_SECONDARY,source:ss.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...ws({key:ss.COLLECTION.REDUCED_STACKED_PRIMARY,source:ss.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===ls.TYPE.BAR)),colorService:i})),l.push(...ws({key:ss.COLLECTION.REDUCED_STACKED_SECONDARY,source:ss.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===ls.TYPE.BAR)),colorService:i}))),l}const bl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function xl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const Sl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:bl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}},El=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:bl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}};function Ml({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function Cl({viewCache:e,mainMajor:t}){return ie(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function Tl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Ol({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,d=l.getStyles(),m={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:Tl({viewState:t,viewCache:n,layoutService:o})};return{[ss.SCALE.MAJOR]:ie(!0,{},m,{ticks:{level:"outer"}}),[ss.SCALE.MAJOR_INNER]:ie(!0,{},m,{ticks:{level:"inner"}})}}function Al({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Ol({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[ss.SCALE.MAJOR]:Ml({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[ss.SCALE.MAJOR]:El({models:t,environment:i})}:{[ss.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?El({models:t,environment:i}):Sl({models:t,environment:i})};return yl(t)?{...a,[ss.SCALE.REDUCED]:Cl({viewCache:r,mainMajor:a[ss.SCALE.MAJOR]})}:a}function Rl({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function wl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!yl({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function Nl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Al({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[ss.SCALE.MINOR.PRIMARY]:Rl({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[ss.SCALE.MINOR.SECONDARY]:Rl({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[ss.SCALE.MINOR.REDUCED_PRIMARY]:wl({layoutService:o,tickModel:s,dockService:c,environment:i}),[ss.SCALE.MINOR.REDUCED_SECONDARY]:wl({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var Il={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const kl=["all","labels"];function Ll({models:e,flags:t}){const{layoutService:n,dockService:r,seriesModel:i,themeService:o,styleModel:a}=e,s=n.getLayoutValue("measureAxes");if(!s||!s.length)return[];const l=o.getStyles(),u=a.query.axis.label.getStyle(),{measureAxes:c}=i.meta;return c.filter((e=>{const t=e.isPrimary?0:1;return kl.some((e=>s[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?ss.COMPONENT.AXIS.MINOR.PRIMARY:ss.COMPONENT.AXIS.MINOR.SECONDARY,renderer:as(t),scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:Il.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}}})))}var Pl={INACTIVE:.5},Dl={LOWER:3,UPPER:13};const ql=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return Me.getAdjustedMaxGlyphCount(t,r,0,"qText")};function zl({models:e,environment:t,flags:n}){const{layoutService:r,dockService:i,styleModel:o}=e,a="rtl"===t.options.direction,s=r.getLayoutValue("dimensionAxis"),l=o.query.axis.label.getStyle(),u=ql({layoutService:r}),{orientation:c}=i.meta.major,d="horizontal"===c?s.label:"auto";return{type:"axis",key:ss.COMPONENT.AXIS.MAJOR,renderer:as(n),scale:ss.SCALE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Il.AXIS.MAJOR[c.toUpperCase()]},settings:{labels:{mode:s.label,tiltAngle:a?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===d?void 0:i.meta.minor.size/4,maxGlyphCount:u,tiltThreshold:u>Dl.LOWER&&u<Dl.UPPER?1:void 0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:Pl.INACTIVE}}}]}}}function $l({models:e,flags:t}){const{dockService:n,styleModel:r}=e,{orientation:i}=n.meta.major,o=r.query.axis.label.getStyle();return{type:"axis",key:ss.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:as(t),scale:ss.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:Il.AXIS.MAJOR[i.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.fontFamily,fontSize:o.fontSize,fill:o.fill},line:{show:!1}}}}function _l({models:e,environment:t,flags:n}){const{layoutService:r}=e,i=r.getLayoutValue("dimensionAxis");if(!i)return[];const{show:o}=i;return"none"===o||"title"===o?[]:r.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i}=e,o="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),u=i.query.axis.label.getStyle(),c=o?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Il.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(u.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:o?"end":"start",label:{align:s,justify:c},guideLine:{major:{justify:c},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[ie(!0,{},d,{key:ss.COMPONENT.AXIS.TIME_INNER,scale:ss.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),ie(!0,{},d,{key:ss.COMPONENT.AXIS.TIME_OUTER,scale:ss.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):r.meta.isContinuous?[$l({models:e,flags:n})]:[zl({models:e,environment:t,flags:n})]}const jl=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Bl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function Fl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:Pl.INACTIVE},...n}}}]}}var Hl={MAX:"max",MIN:"min"};function Vl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Ul=(e,t)=>`${e}-${t.id}`,Yl=4,Wl=12,Xl=4;function Gl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${Xl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(ss.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(Yl,Math.min(Wl,l));o.size=`${"bar"===i?2*u:u}px`}return o.size}}const{isDark:Kl}=Rt;const Jl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:m}=n.options,{isContinuous:h}=i.meta,p="rtl"===r.options.direction,{orientation:f}=s.meta.major,g="horizontal"===f,y=(n.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return Vl(t,y)},b=Ul(ss.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[g?"x":"y"]:{scale:ss.SCALE.MAJOR,fn:Bl({layoutService:i,seriesModel:o,rtl:p,orientation:f}),ref:h?"major":void 0},[g?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===m?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?Kl(t)?function(e){return Je(e).brighter(.5).toString()}(t):function(e){return Je(e).darker().toString()}(t):t},size:Gl({chart:e,layoutService:i,dockService:s,markerKey:b,markerType:m}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:m,horizontal:g,rtl:p})},brush:Fl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:Pl.INACTIVE}}})}};function Zl({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(ss.SCALE.MAJOR),u=s(ss.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=d.map(m),p=Math.min(...h),f=Math.max(...h)-p,g=0===f?1:f,y=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/g)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(y[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const b=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function Ql({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const m=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Zl({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return c;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?Zl({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(ss.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(ss.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,m=(t?Math.max(0,c):c)-d,h=0===m?1:m,p=s.domain(),f=[];for(let e=0;e<p.length-1;e++){const t=p[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/h))});const i=p[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:c,rtl:a})}const eu=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=Bl({layoutService:r,seriesModel:i,rtl:s,orientation:l});return{key:Ul(ss.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:ss.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Ql({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:Fl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Pl.INACTIVE},inactive:{opacity:Pl.INACTIVE}})}};var tu={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function nu({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const ru=3,iu=20;function ou({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:m}=a.meta.major,h="horizontal"===m,p="SPARK"===a.meta.chart.mode,f=i.getColor(),{POINT:g}=tu,y=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=nu({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){const t=e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{});return t}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),v="rtl"===n.options.direction,b=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=r.meta,S=({end:e})=>{const{value:t}=e;return Vl(t,b)};return{type:"point",key:Ul(ss.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?g.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:ss.SCALE.MAJOR,fn:Bl({layoutService:r,seriesModel:o,rtl:v,orientation:m}),ref:"major"},sizeLimits:{minPx:ru,maxPx:iu},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:f,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:p?y({item:e,items:t.items})?1:0:d||y({item:e,items:t.items})?1:0}},brush:Fl({layoutService:r,active:{r:e=>e.r+tu.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;const i=[ss.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ss.COMPONENT.AXIS_OVERLAY.TIME_INNER,ss.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0));return i?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const au=(e,{dataset:t})=>{const{value:n,label:r,source:i}=e.end,o=t(i.key).field(i.field);return fe.shouldUseFormat(o.raw())?o.formatter()(n):r};function su({chart:e,models:t,environment:n,flags:r,series:i,lineSeries:o}){const{layoutService:a,dockService:s,styleModel:l,primaryExtremumModel:u,secondaryExtremumModel:c}=t,{id:d}=i,m="rtl"===n.options.direction,h=a.getLayoutValue("dataPoint");if(!h)return!1;if(!h.show||!h.showLineLabels)return!1;const p=(i.isPrimary?u:c).query.getExtrema(),f=l.query.point.label.getStyle();return{type:"point-label",key:`${ss.COMPONENT.POINT_LABEL}-${d}`,renderer:as(r),layout:{displayOrder:2,minimumLayoutMode:Il.VALUE_LABEL},settings:{orientation:s.meta.major.orientation,rtl:m,connect:i.options.showAsConnections,label:t=>au(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${ss.COMPONENT.POINT}-${d}`,allPoints:o.map((e=>`${ss.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Vl(e.value,p))(e.data),labelSpace:{use:()=>{const t=e.component(ss.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,fill:f.fill}}}const lu=({chart:e,dock:t})=>{let n=t;const r=e.component(`${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}`),i=e.component(`${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.PRIMARY}`),o=e.component(`${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.SECONDARY}`);return r?n=`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}`:i?n=`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.PRIMARY}`:o&&(n=`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.SECONDARY}`),n},uu=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}`&&e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.PRIMARY}`&&e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MAX}-${ls.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MIN}`&&e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MIN}-${ls.AXIS.PRIMARY}`&&e!==`@${ss.COMPONENT.SLICED_HAT}-${Hl.MIN}-${ls.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function cu({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const m=u?"left":"right";return{type:"label-space",key:ss.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Il.LABEL_SPACE,dock:lu({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${ss.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(ss.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),h=e.scale(ss.SCALE.MINOR.SECONDARY)(m.implicit.line.max),p=c||u?h:1-h,f=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&p<n?10:0}}}const du={min:"Min",max:"Max"};function mu(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function hu(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function pu(e,t,n){return mu(e,t,n)||hu(e,t,n)}function fu(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function gu(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function yu(e,t){return fu(e,t)||gu(e,t)}function vu({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${du[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Hl.MAX?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Hl.MAX?!fu(r,e):!gu(r,e)}({extrema:e,type:t}))}var bu=Object.freeze({__proto__:null,isMaxOutOfBounds:fu,isMinOutOfBounds:gu,isOutOfBounds:yu,isSegmentMaxOutOfBounds:mu,isSegmentMinOutOfBounds:hu,isSegmentOutOfBounds:pu,shouldShowOob:vu});const xu={min:"Min",max:"Max"},Su=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:h,themeService:p,fieldModel:f}=t,g="rtl"===o.options.direction,{dock:y,opposite:v,orientation:b}=s.meta.major,x=l.query.getExtrema(),S=u.query.getExtrema(),E=a===Hl.MAX,{isBarSeriesGrouped:M}=m.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Hl.MAX?n:r;const o=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`),s=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.SECONDARY}`),l=e.component(ss.COMPONENT.LABEL_SPACE),u=e.component(`${ss.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.PRIMARY}`),d=e.component(`${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.SECONDARY}`);return o?i=`@${ss.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`:s?i=`@${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.SECONDARY}`:u||c||d?l&&t===Hl.MAX?i=`@${ss.COMPONENT.LABEL_SPACE}`:u?i=`@${ss.COMPONENT.BAR_OOB}-${t}`:c?i=`@${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.PRIMARY}`:d&&(i=`@${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.SECONDARY}`):l&&t===Hl.MAX&&(i=`@${ss.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:v,dock:y}),T=Bl({layoutService:m,seriesModel:h,rtl:g,orientation:b}),O=r.concat(n);if(!O.length)return!1;const A=E?x.implicit.bar.max:x.implicit.bar.min,R=Number(A.toFixed(13));if(!M&&i.length&&bu[`is${xu[a]}OutOfBounds`](R,x))return!1;if(!x.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const w=E?"max":"min",N=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),I=Math[w](Number(S.implicit.line[w].toFixed(13)),Number(S.implicit.marker[w].toFixed(13))),k=O.filter((e=>e.isPrimary)),L=O.filter((e=>!e.isPrimary)),P=k.length>0,D=L.length>0,{major:q,majorNumeric:z}=f.main,$=e=>"NaN"!==e.qNum?e.qNum:0,_=m.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${ss.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:Il.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:n})=>({field:q,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:_},end:{field:e,value:n.showAsZeros?$:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:k,secondarySeries:L,orientation:b,rtl:g,major:{scale:ss.SCALE.MAJOR,fn:T},markerOffset:uu({dockPosition:C,orientation:b,rtl:g})},brush:Fl({layoutService:m}),show:()=>{if(E){if(P&&N>c.query.getMax())return!0;if(D&&I>d.query.getMax())return!0}if(!E){if(P&&N<c.query.getMin())return!0;if(D&&I<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color}}},Eu={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Mu({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${ss.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=Eu[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=Eu[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Cu=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Tu(e){return Math.min(Math.max(0,e),1)}const Ou=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m}=t,{isContinuous:h,isBarSeriesStacked:p,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:g}=o.meta,y=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY,b=i?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=p?{scale:b,start:{ref:"start",fn:e=>{const t=y(e);return Tu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:y(e))(e);return Tu(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=y(e);return Tu(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?y(e):e.datum.end.value;return Tu(e.scale(n))}}},S=(i?d:m).query.getExtrema(),E=p?({start:e,end:t})=>pu(e.value,t.value,S):({end:e})=>yu(e.value,S);return{type:"box",key:`${ss.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(p)return;const e=l.query.series(ls.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:p?i?ss.COLLECTION.STACKED_PRIMARY:ss.COLLECTION.STACKED_SECONDARY:i?ss.COLLECTION.PRIMARY:ss.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:ss.SCALE.MAJOR,fn:jl({layoutService:o,axis:v}),ref:h?{start:"major",end:"major"}:void 0},minor:x,box:{width:Cu({isContinuous:h,isBarSeriesGrouped:f,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:g}),minWidthPx:h?Mu({chart:e,models:t,viewState:n,viewCache:r,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Fl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:Pl.INACTIVE}}})}},Au=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=i?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${ss.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?ss.COLLECTION.STACKED_TOTAL_PRIMARY:ss.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:ss.SCALE.MAJOR,fn:jl({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Cu({isContinuous:m,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:m?Mu({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Ru(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Rt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}const wu="vertical",Nu="horizontal";function Iu(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return t===wu&&i<0?o="down":t===Nu&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const ku=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Lu=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function Pu(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const Du=({models:e,environment:t,flags:n,isPrimary:r})=>{const{layoutService:i,seriesModel:o,styleModel:a,themeService:s}=e,{meta:l}=i,u="rtl"===t.options.direction,c=s.getStyles(),d=a.query.bar.label.getStyle(),m=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),h=r?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY;if(!(r?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!ku(m,l))return!1;let p;!l.isBarSeriesStacked&&(p=l.isBarSeriesStacked?1:0);const f={label:e=>au(e.data,e),simplifiedPlacements:Pu(p,0===p?1:0,l.isBarSeriesStacked?.5:1,l.isContinuous),style:c.label.value},g=[Ru(e,f)],y={component:`${ss.COMPONENT.BAR}-${h}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Iu(t.data.end.value,e.dockService.meta.minor.orientation,u,0),labels:g,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily}}},v=[y];return{type:"labels",key:`${ss.COMPONENT.BAR_LABEL}-${h}`,renderer:as(n),layout:{minimumLayoutMode:Il.VALUE_LABEL},settings:{sources:v}}};function qu(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function zu({chart:e,models:t,environment:n,flags:r,isPrimary:i}){const{meta:o}=t.layoutService,a="rtl"===n.options.direction,s=t.themeService.getStyles(),l=t.styleModel.query.bar.label.getStyle(),u=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=i?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY;if(0===(i?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Lu(u,o))return!1;const d=l.useContrastColor,m=e.formatter(i?ss.FORMATTER.PRIMARY:ss.FORMATTER.SECONDARY)||(e=>e),h=e=>0===e?"":m(e),p={label:e=>h(e.data.sumOfPositives.value),simplifiedPlacements:qu("outside",true,d,o.isContinuous),style:s.label.value},f={label:e=>h(e.data.sumOfNegatives.value),simplifiedPlacements:qu("opposite",true,d,o.isContinuous),style:s.label.value},g=[Ru(t,p),Ru(t,f)];return{type:"labels",key:`${ss.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:as(r),layout:{displayOrder:2,minimumLayoutMode:Il.VALUE_LABEL},settings:{sources:[{component:`${ss.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Iu(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,a),labels:g,fontSize:parseInt(l.fontSize,10),fontFamily:l.fontFamily}}}]}}}var $u=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const _u={min:"Min",max:"Max"},ju=1e-12;function Bu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?Au({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Ou({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():u.query.getExtrema(),v=n===Hl.MAX,b=o?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${_u[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!$u[`has${_u[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${_u[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let x="end";m&&(x=v?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`),a=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start}),M={type:"box-sliced-hat",key:`${ss.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:ie({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<ju?t:e}(e.datum[x].value);return v?n>t:n<t},width:Cu({isContinuous:h,isBarSeriesGrouped:p,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:Fl({layoutService:a})};return M}const Fu={min:"Min",max:"Max"},Hu={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Vu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:d,start:m}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,p=h?Au({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Ou({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),f=o?l.query.getExtrema():u.query.getExtrema(),g=n===Hl.MAX?f.implicit.bar.max:f.implicit.bar.min,y=Number(g.toFixed(13)),v=o?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY;if(!p)return!1;if(!bu[`is${Fu[n]}OutOfBounds`](y,f))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Hl.MAX?n:r;const a=e.component(ss.COMPONENT.LABEL_SPACE),s=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`),l=e.component(`${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.SECONDARY}`),u=e.component(`${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.PRIMARY}`),c=e.component(`${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.SECONDARY}`);return s?o=`@${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.PRIMARY}`:l?o=`@${ss.COMPONENT.SLICED_HAT}-${t}-${ls.AXIS.SECONDARY}`:u&&c&&!i?o=`@${ss.COMPONENT.BAR_OOB}-${t}-${ls.AXIS.PRIMARY}`:a&&t===Hl.MAX&&(o=`@${ss.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:m,isPrimary:o});let x="end";h&&(x=n===Hl.MAX?"sumOfPositives":"sumOfNegatives");const S={type:"box-out-of-bounds",key:`${ss.COMPONENT.BAR_OOB}-${n}-${v}`,layout:{dock:b},data:p.data,settings:{orientation:p.settings.orientation,major:p.settings.major,minor:p.settings.minor,dockValue:Ee.getDockValue(n===Hl.MAX?d:m),oob:ie({},p.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=h&&0===e.datum[x].value,i=bu[`is${Fu[n]}OutOfBounds`](e.datum[x].value,f,n),o=(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Hu[n]].value;return 0!==i&&bu[`is${Fu[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:x,extrema:f}))&&i;return o}})},brush:Fl({layoutService:a})};return S}function Uu(e){return Math.min(Math.max(0,e),1)}const Yu=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(r?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY),h=r?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY,p=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Hl.MAX;if(!vu({extrema:p,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e),v={type:"box",key:`${ss.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(ls.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?ss.COLLECTION.STACKED_TOTAL_PRIMARY:ss.COLLECTION.STACKED_TOTAL_SECONDARY:r?ss.COLLECTION.PRIMARY:ss.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:ss.SCALE.MAJOR,fn:jl({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Uu(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Uu(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Uu(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Uu(e.scale(t))}}},box:{width:Cu({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=f?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:m.max();return f?n>m.max():n<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return v};function Wu(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Xu=({chart:e,models:t,type:n,environment:r,flags:i,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,seriesModel:d,themeService:m}=t,h=m.getStyles(),p=c.query.bar.label.getStyle(),{meta:f}=a,{isBarSeriesStacked:g}=f,y=e.formatter(o?ss.FORMATTER.PRIMARY:ss.FORMATTER.SECONDARY),v=a.getLayoutValue("dataPoint.showBarLabels",!1),b="horizontal"===s.meta.major.orientation,x="rtl"===r.options.direction;if(!(o?d.meta.primaryBarSeriesCount:d.meta.secondaryBarSeriesCount)||!g&&!ku(v,f)||g&&!Lu(v,f))return!1;const S=o?l.query.getExtrema():u.query.getExtrema();if(!S.meta.hasExplicit)return!1;const E=n===Hl.MAX?S.implicit.bar.max:S.implicit.bar.min;if(!(n===Hl.MAX?fu(E,S):gu(E,S)))return!1;let M=e=>au(e.data,e);f.isBarSeriesStacked&&(M=n===Hl.MAX?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(fu(e.data.sumOfPositives.value,S)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return y?y(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(gu(e.data.sumOfNegatives.value,S)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const C={label:M,simplifiedPlacements:Wu("outside",true,f.isContinuous,b,x),style:h.label.value},T={label:M,simplifiedPlacements:Wu("opposite",true,f.isContinuous,b,x),style:h.label.value},O=[Ru(t,C),Ru(t,T)],A=o?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY,R="horizontal"===s.meta.major.orientation?"down":"right",w=[{component:`${ss.COMPONENT.GHOST_BAR_OOB}-${n}-${A}`,selector:"rect",strategy:{type:"bar",settings:{direction:R,labels:O,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily}}}];return{key:`${ss.COMPONENT.BAR_OOB_LABEL}-${n}-${A}`,type:"labels",renderer:as(i),layout:{minimumLayoutMode:Il.VALUE_LABEL},settings:{sources:w}}},Gu=({chart:e,models:t,viewState:n,viewCache:r})=>[Ou({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Ou({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Ku=({chart:e,models:t,viewState:n,viewCache:r})=>[Au({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Au({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Ju=({chart:e,models:t,environment:n,flags:r})=>{const{isBarSeriesStacked:i}=t.layoutService.meta;if(i){return[zu({chart:e,models:t,environment:n,flags:r,isPrimary:!0}),zu({chart:e,models:t,environment:n,flags:r,isPrimary:!1})]}return[Du({models:t,environment:n,flags:r,isPrimary:!0}),Du({models:t,environment:n,flags:r,isPrimary:!1})]},Zu=({chart:e,models:t,viewCache:n,viewState:r})=>[Bu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Bu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Bu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Bu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Qu=({chart:e,models:t,viewCache:n,viewState:r})=>[Vu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Vu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Vu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Vu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],ec=({chart:e,models:t})=>[Yu({chart:e,models:t,type:"max",isPrimary:!0}),Yu({chart:e,models:t,type:"min",isPrimary:!0}),Yu({chart:e,models:t,type:"max",isPrimary:!1}),Yu({chart:e,models:t,type:"min",isPrimary:!1})],tc=({chart:e,models:t,environment:n,flags:r})=>[Xu({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!0}),Xu({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!0}),Xu({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!1}),Xu({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!1})],nc=({chart:e,environment:t,flags:n,models:r,viewState:i,viewCache:o})=>{const{seriesModel:a}=r,s=a.query.series(ls.TYPE.BAR).slice(-1),l=a.query.series(ls.TYPE.LINE),u=a.query.series(ls.TYPE.MARKER);return[...Gu({chart:e,models:r,viewState:i,viewCache:o}),...Ku({chart:e,models:r,viewState:i,viewCache:o}),...l.map((e=>eu({models:r,environment:t,series:e}))),...l.map((e=>ou({models:r,series:e,environment:t}))),...u.map((n=>Jl({chart:e,models:r,series:n,environment:t}))),...l.map((i=>su({chart:e,models:r,environment:t,flags:n,series:i,lineSeries:l}))),...Ju({chart:e,models:r,environment:t,flags:n}),...Zu({chart:e,models:r,viewCache:o,viewState:i}),...Qu({chart:e,models:r,viewCache:o,viewState:i}),...ec({chart:e,models:r}),...tc({chart:e,models:r,environment:t,flags:n}),Su({chart:e,models:r,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"max"}),Su({chart:e,models:r,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"min"}),cu({chart:e,models:r,environment:t,lineSeries:l})]},rc={NONE:0,WIDE:1,MEDIUM:2,NARROW:3};function ic({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i}=e,{auto:o,spacing:a}=r.getLayoutValue("gridLine",{});if(!o&&a===rc.NONE)return!1;const s=i.getStyles(),l=n.meta.primarySeries.length>0;return{key:ss.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Il.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===rc.WIDE)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===rc.NARROW,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY}}function oc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:ss.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Il.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:ss.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function ac({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:i}=t.meta;if(!r)return[];const o=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:Il.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[ie(!0,{},a,{key:"time-inner-grid",x:{scale:ss.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),ie(!0,{},a,{key:"time-outer-grid",x:{scale:ss.SCALE.MAJOR}})]:[ie(!0,{},a,{key:"continuous-grid",x:{scale:ss.SCALE.MAJOR},minorTicks:{show:!0}})]}function sc({models:e}){return[ic({models:e}),oc({models:e}),...ac({models:e})]}function lc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,styleModel:l}=e,u=o.query.getProperties(),c=r.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:m}=i.meta.major,h=l.query.axis.title.getStyle();return{type:"data-title",key:ss.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Il.AXIS_TITLE.MAJOR[m.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}const uc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function cc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:u}=e,c=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const m=u.query.axis.title.getStyle(),{measureAxes:h}=o.meta;return h.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,h={type:"data-title",key:u?ss.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:ss.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:Il.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:uc(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,color:m.color}};return d&&(h.settings.padding="0",h.settings.minWidth="auto"),h}))}function dc({models:e,environment:t,actions:n}){return[lc({models:e,environment:t,actions:n}),...cc({models:e,environment:t,actions:n})]}function mc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=$s({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Ds({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(h.settings.injections=()=>[Ps({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Ls.OPTIONS.BAR.value},deviceType:t.deviceType})}function hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Ou({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY;return a.key=`${ss.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?ss.COLLECTION.REDUCED_STACKED_PRIMARY:ss.COLLECTION.REDUCED_STACKED_SECONDARY:i?ss.COLLECTION.REDUCED_PRIMARY:ss.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?ss.SCALE.MINOR.REDUCED_PRIMARY:ss.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=ss.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function pc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(ls.TYPE.LINE).map((r=>{const i=eu({models:t,environment:e,series:r});return i.key=Ul(ss.COMPONENT.MINI_CHART.LINE,r),i.data.collection=ss.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?ss.SCALE.MINOR.REDUCED_PRIMARY:ss.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=ss.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function fc({models:e,environment:t}){return e.seriesModel.query.series(ls.TYPE.MARKER).map((n=>{const r=Jl({models:e,environment:t,series:n});return r.key=Ul(ss.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=ss.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?ss.SCALE.MINOR.REDUCED_PRIMARY:ss.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=ss.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function gc({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return yl(t)?[hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...pc({environment:i,models:t}),...fc({models:t,environment:i})]:[]}function yc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=Il.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:ss.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:ss.SCALE.MAJOR_INNER,layout:{dock:`@${ss.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:ss.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:ss.SCALE.MAJOR,layout:{dock:`@${ss.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:ss.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:ss.SCALE.MAJOR,layout:{dock:`@${ss.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function vc({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:m}=n,h="rtl"===d.direction,p=u.query.series(ls.TYPE.BAR).filter((e=>e.isPrimary)),f=u.query.series(ls.TYPE.BAR).filter((e=>!e.isPrimary)),g=u.query.series(ls.TYPE.LINE),y=u.query.series(ls.TYPE.MARKER),v=u.query.all(),b=v.some((e=>e.isPrimary)),x=v.some((e=>!e.isPrimary)),S=b&&x,E={resolveUIColor:o.getPaletteColor},M=b?is({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:ss.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:ss.FORMATTER.PRIMARY,theme:m,localeInfo:c,rtl:h,key:ss.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?is({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:ss.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:ss.FORMATTER.SECONDARY,theme:m,localeInfo:c,rtl:h,key:ss.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&es({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:ss.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ss.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Il.REFERENCE_LINE}),!!x&&es({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:ss.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ss.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Il.REFERENCE_LINE}),es({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:ss.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:ss.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:p.length?`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`:f.length?`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`:g.length?`${ss.COMPONENT.LINE}-${g[0].id}`:y.length?`${ss.COMPONENT.MARKER}-${y[0].id}`:`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`,minimumLayoutMode:Il.REFERENCE_LINE}),...M,...C,...is({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dock:a.meta.major.opposite,scale:ss.SCALE.MAJOR,style:s.getStyles(),theme:m,localeInfo:c,rtl:h,key:ss.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function bc(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var xc=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(bc)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=n.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function Sc({environment:e,models:t}){const{flags:n,translator:r,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,u=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let i,o;for(let a=0,s=xc.length;a<s;a++){i=xc[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!u)return!1;const{fontFamily:c}=l.getStyles(),d=function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:se[e].alignment},settings:{label:i.get(`Object.Disclaimer.${e}`),rtl:o},style:r}}(u.key,{translator:r},{rtl:"rtl"===i.direction},{fontFamily:c});return d}function Ec({layoutService:e}){return!!yl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:ss.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Mc(e){return(null==e?void 0:e.type)||ls.TYPE.BAR}function Cc({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,m=n.getLayoutValue("color",{}),h=e=>e.filter((e=>Mc(e)===ls.TYPE.LINE)).map((e=>({key:Ul(ss.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,f=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:ss.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!f[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Tc({models:{fieldModel:e}}){return{[ss.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[ss.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var Oc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Ac}=Oc;function Rc({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Ac}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:wc}=Oc,Nc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=wc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Rc({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Ic}=Oc,{MAX_NUM_POINTS:kc,DEFAULT_NUM_POINTS:Lc,DEFAULT_NUM_LINES:Pc}=Oc,{DEFAULT_NUM_POINTS:Dc}=Oc,qc=({layoutService:e,largeDataService:t})=>{if(!Rc({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Dc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:i=Pc,maxNumPoints:o=Lc,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Nc({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,u=Math.floor(r[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Pc||o>Lc)?Math.min(u,Math.ceil(kc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Ic}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})},zc=({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:qc({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Nc({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)};function $c({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Rc({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>qc({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Nc({layoutService:t,largeDataService:n}),fetch:(i,o)=>zc({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function _c(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function jc({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function Bc(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function Fc(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=Bc(),o=Bc();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Hc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Vc(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Fc(e,t,n.qMatrix),i=Hc(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const Uc=2**.5,Yc=1/Uc,Wc=1e-6,Xc=Yc**44;function Gc(e){return e.qIsOtherCell}function Kc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Gc)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Gc)||t++})),t}(n)}const Jc={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Zc={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};const Qc="…";function ed(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function td(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const m={x:c+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}${Qc}`).width,p=Math.max(0,m.width-u.width),f=Math.max(0,m.height-u.height),g=o*p,y=a*f;return{show:m.width>=Math.min(h,u.width),text:l,dx:g,dy:y,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=ed(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:ed(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function nd(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=ed(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:ed(i,n.minorGuideLine.strokeWidth),x2:o,y2:ed(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function rd(e){return e.filter((e=>e.show)).map((e=>ie({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var id={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=ed(1,t.line.strokeWidth);return{show:n.line.show,x1:ed(0,t.line.strokeWidth),y1:r,x2:ed(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=td(n,this),this.state.minor=nd(r,this)},render(){return[...rd([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ie({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...rd(this.state.major.map((e=>e.guideLine))),...rd(this.state.minor.map((e=>e.guideLine)))];var e}};function od(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function ad(e){return e.qTags.indexOf("$qualified")>-1}function sd({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];od(o,a)?(ad(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function ld({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}const ud=16;function cd({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+ud}))),r.clamp(n),i.rangeAndWidth}}}const dd=6;function md({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=dd,canFitHalfDayTicks:n=>n>=t*e.count()}}function hd({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=cd,queryFactory:s=md}={attributesFactory:cd,queryFactory:md}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function pd({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=hd,mapper:a=sd,resolver:s=ld}={metaFactory:hd,mapper:sd,resolver:ld}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=m.resolve(t);return n.set(r,i),i}}}const fd=86400,gd=864e5;function yd(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(gd*(e-Math.floor(e)))))}const vd=yd(0).getTime();function bd(e){return(e.getTime()-vd)/fd/1e3}var xd=new Date,Sd=new Date;function Ed(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Ed((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&&(i.count=function(t,r){return xd.setTime(+t),Sd.setTime(+r),e(xd),e(Sd),Math.floor(n(xd,Sd))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Md=36e5,Cd=Ed((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),Td=Cd;Cd.range;var Od=Ed((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()})),Ad=Od;Od.range;var Rd=Ed((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Md)}),(function(e,t){return(t-e)/Md}),(function(e){return e.getUTCHours()})),wd=Rd;Rd.range;var Nd=Ed((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})),Id=Nd;function kd(e){return Ed((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}))}Nd.range;var Ld=kd(0),Pd=kd(1),Dd=kd(2),qd=kd(3),zd=kd(4),$d=kd(5),_d=kd(6);Ld.range,Pd.range,Dd.range,qd.range,zd.range,$d.range,_d.range;var jd=Ed((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()})),Bd=jd;jd.range;var Fd=Ed((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()}));Fd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ed((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 Hd=Fd;Fd.range;const Vd={second:1,minute:2,hour:3,day:4,month:5,year:6};function Ud({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Hd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Td.count(e,t),l=Ad.count(e,t),u=wd.count(e,t),c=Id.count(e,t),d=Ld.count(e,t),m=Bd.count(e,t),h=Hd.count(e,t),p=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:Hd.every(1),formatter:r.year.formatter,offset:e=>Hd.offset(e,-1),floor:Hd.floor};if(s<=p)v.type=Vd.second,v.desc="second",v.count=s,v.interval=Td.every(1),v.formatter=r.second.formatter,v.offset=e=>Td.offset(e,-1),v.floor=Td.floor;else if(s/2<=p)v.type=Vd.second,v.desc="every other second",v.count=s/2,v.interval=Td.every(2),v.formatter=r.second.formatter,v.offset=e=>Td.offset(e,-2),v.floor=Td.floor;else if(s/5<=p)v.type=Vd.second,v.desc="every 5 second",v.count=s/5,v.interval=Td.every(5),v.formatter=r.second.formatter,v.offset=e=>Td.offset(e,-5),v.floor=Td.floor;else if(s/15<=p)v.type=Vd.second,v.desc="every 15 second",v.count=s/15,v.interval=Td.every(15),v.formatter=r.second.formatter,v.offset=e=>Td.offset(e,-15),v.floor=Td.floor;else if(s/30<=p)v.type=Vd.second,v.desc="every 30 second",v.count=s/30,v.interval=Td.every(30),v.formatter=r.second.formatter,v.offset=e=>Td.offset(e,-30),v.floor=Td.floor;else if(l<=f)v.type=Vd.minute,v.desc="minute",v.count=l,v.interval=Ad.every(1),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-1),v.floor=Ad.floor;else if(l/2<=f)v.type=Vd.minute,v.desc="every 2 minute",v.count=l/2,v.interval=Ad.every(2),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-2),v.floor=Ad.floor;else if(l/5<=f)v.type=Vd.minute,v.desc="every 5 minute",v.count=l/5,v.interval=Ad.every(5),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-5),v.floor=Ad.floor;else if(l/10<=f)v.type=Vd.minute,v.desc="every 10 minute",v.count=l/10,v.interval=Ad.every(10),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-10),v.floor=Ad.floor;else if(l/15<=f)v.type=Vd.minute,v.desc="every 15 minute",v.count=l/15,v.interval=Ad.every(15),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-15),v.floor=Ad.floor;else if(l/30<=f)v.type=Vd.minute,v.desc="every 30 minute",v.count=l/30,v.interval=Ad.every(30),v.formatter=r.minute.formatter,v.offset=e=>Ad.offset(e,-30),v.floor=Ad.floor;else if(u<=f)v.type=Vd.hour,v.desc="hour",v.count=u,v.interval=wd.every(1),v.formatter=r.minute.formatter,v.offset=e=>wd.offset(e,-1),v.floor=wd.floor;else if(u/2<=f)v.type=Vd.hour,v.desc="every 2 hour",v.count=u/2,v.interval=wd.every(2),v.formatter=r.minute.formatter,v.offset=e=>wd.offset(e,-2),v.floor=wd.floor;else if(u/3<=f)v.type=Vd.hour,v.desc="every 3 hour",v.count=u/3,v.interval=wd.every(3),v.formatter=r.minute.formatter,v.offset=e=>wd.offset(e,-3),v.floor=wd.floor;else if(u/6<=f)v.type=Vd.hour,v.desc="every 6 hour",v.count=u/6,v.interval=wd.every(6),v.formatter=r.minute.formatter,v.offset=e=>wd.offset(e,-6),v.floor=wd.floor;else if(u/12<=f||i)v.type=Vd.hour,v.desc="every 12 hour",v.count=u/12,v.interval=wd.every(12),v.formatter=r.minute.formatter,v.offset=e=>wd.offset(e,-12),v.floor=wd.floor;else if(c<=g)v.type=Vd.day,v.desc="day",v.count=c,v.interval=Id.every(1),v.formatter=r.date.formatter,v.offset=e=>Id.offset(e,-1),v.floor=Id.floor;else if(c/2<=g)v.type=Vd.day,v.desc="every 2 day",v.count=c/2,v.interval=Id.every(2),v.formatter=r.date.formatter,v.offset=e=>Id.offset(e,-2),v.floor=Id.floor;else if(c/3<=g)v.type=Vd.day,v.desc="every 3 day",v.count=c/3,v.interval=Id.every(3),v.formatter=r.date.formatter,v.offset=e=>Id.offset(e,-3),v.floor=Id.floor;else if(d<=g)v.type=Vd.day,v.desc="week",v.count=d,v.interval=Ld.every(1),v.formatter=r.date.formatter,v.offset=e=>Ld.offset(e,-1),v.floor=Id.floor;else if(d/2<=g)v.type=Vd.day,v.desc="every 2 week",v.count=d/2,v.interval=Ld.every(2),v.formatter=r.date.formatter,v.offset=e=>Ld.offset(e,-2),v.floor=Id.floor;else if(m<=g)v.type=Vd.month,v.desc="month",v.count=m,v.interval=Bd.every(1),v.formatter=r.date.formatter,v.offset=e=>Bd.offset(e,-1),v.floor=Id.floor;else if(m/3<=g)v.type=Vd.month,v.desc="quarter",v.count=m/3,v.interval=Bd.every(3),v.formatter=r.date.formatter,v.offset=e=>Bd.offset(e,-3),v.floor=Id.floor;else if(m/6<=g)v.type=Vd.month,v.desc="half year",v.count=m/6,v.interval=Bd.every(6),v.formatter=r.date.formatter,v.offset=e=>Bd.offset(e,-6),v.floor=Id.floor;else if(h<=y)v.type=Vd.year,v.desc="year",v.count=h,v.interval=Hd.every(1),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-1),v.floor=Hd.floor;else if(h/2<=y)v.type=Vd.year,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-2),v.floor=Hd.floor;else if(h/5<=y)v.type=Vd.year,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-5),v.floor=Hd.floor;else if(h/10<=y)v.type=Vd.year,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-10),v.floor=Hd.floor;else{const e=Math.floor(h/y);v.type=Vd.year,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Hd.offset(t,-e),v.floor=Hd.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:c.formatter}}));let h=[];if(!o&&c.type<=Vd.hour){const n=t.getFormat("date"),r=e.ticks(Id.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Id.offset(r[0],-1)),h=(r.length?r:[Id.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:m,outer:h}}const Yd=86400,Wd=1440,Xd={};function Gd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Kd(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=Vo().domain([yd(l),yd(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let m;m="d3"===d.type?(e,i)=>Ud({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:yd(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Xd[[t,n,r,r,o]])return Xd[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=yd(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,m=t/(i-r),h=m/1440,p=m/Yd,f=366*m,g=3*m*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/f;let S,E,M,C=0,T=0,O=null,A=null,R=null,w=null,N=null,I=null;const k={outer:[],inner:[]};for(y<1?(O=1,T=1/Yd):y<2?(O=2,T=1/Yd*2):y<5?(O=5,T=1/Yd*5):y<10?(O=10,T=1/Yd*10):y<30?(O=30,T=1/Yd*30):v<1?(A=1,T=1/Wd):v<2?(A=2,T=1/Wd*2):v<5?(A=5,T=1/Wd*5):v<10?(A=10,T=1/Wd*10):v<30?(A=30,T=1/Wd*30):v<60?(R=1,T=1/24):v<120?(R=2,T=2/24):v<360?(R=6,T=.25):v<720?(R=12,T=.5):b<1/90?(T=1,w=1):b<2/90?(T=2,w=2):b<7/90?(T=7,w=7):b<31/90?(N=1,T=31):b<1?(N=3,T=90):x<1?(I=1,T=366):x<2?(I=2,T=732):x<5?(I=5,T=1826.25):(I=10,T=3652.5),E=Math.floor((d+n%1)/T);C<i;){M=E+1,S=I?Gd("year",[l+E*I,0,1],[l+M*I,0,1],a.year.formatter):N?Gd("month",[l,u+E*N,1],[l,u+M*N,1],a.date.formatter):w?Gd("day",[l,u,c+E*w],[l,u,c+M*w],a.date.formatter):R?Gd("hour",[l,u,c,0+E*R],[l,u,c,0+M*R],a.minute.formatter):A?Gd("minute",[l,u,c,0,0+E*A],[l,u,c,0,0+M*A],a.minute.formatter):Gd("second",[l,u,c,0,0,0+E*O],[l,u,c,0,0,0+M*O],a.second.formatter),C=bd(S.start),k.inner.push(S);const e=Math.floor(C);if(!(o||I||N||w)){const t={type:"day",start:yd(e),end:yd(e+1),formatter:a.date.formatter,qStart:e};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===t.qStart||k.outer.push(t)}E++}return k.min=r,k.max=i,Xd[[t,n,r,r,o]]=k,k}(n,e,d.min,l,u,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===i?bd(t.start):"end"===i?bd(t.end):(bd(t.start)+bd(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:bd(t.start),end:bd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const Jd=41000.2343433,Zd=/t+/i,Qd=16,em=60;const tm={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function nm(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const rm="continuousPan";var im={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Jc,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=$c,snapshotFetcherFactory:u=jc,cacheFetcherFactory:c=_c,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=u({layoutService:t,viewCache:i}),p=c({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=y,r=v,Math.max(Wc,(r-n)*Xc))),g=t.meta.isSnapshot?h:m,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Hc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Vc(y,v,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Hc(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Vc(e,t,n))).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>Vc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ie({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ie({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Kc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=T(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),h=m-(r>0?Yc:Uc)*m,p=c+h*u,f=d-h*(1-u),g=p<a?a-p:0,y=f>s?f-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(f+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:rm,pointers:1,threshold:10,enable(r,i){return this.started===rm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{[`${rm}start`](n){n.preventDefault(),this.started=rm;const{min:i,max:o}=r.get("zoom");this[rm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${rm}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[rm],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${rm}end`](e){e.preventDefault(),this.started=!1},[`${rm}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Zc,timeAxis:id},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=ie(!0,{},t[i],o)})),r}(t,tm,n),{qAxis:i}=r,o=Lr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,c,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,n.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(nm(a,m),a.instance(e)),m.normInvert=e=>(nm(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:em,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:em,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:em,formatter:void 0},year:{type:"year",pattern:"YYYY",width:em,formatter:void 0}};return i&&Zd.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(Jd)).width+Qd)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=yd(t[0].data.start),i=yd(t[n-1].data.start);return Id.count(r,i)/n>=1?o.date:wd.count(r,i)/n>0?o.minute:Ad.count(r,i)/n>0?o.second:o.date},t}(r);return c=Kd(o.copy(),r,h),u=pd({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>h.getFormatFromTicks(d).formatter,m}}};const om=e=>e.meta.seriesComponentKeys[0],am=(e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}};function sm({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=im,{layoutService:s,seriesModel:l}=t,u=om(l),c=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===ss.COMPONENT.LEGEND_CATEGORICAL));am(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===u));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const lm="continuousPinchZoom";function um({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=im.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,h="rtl"===n.options.direction,p=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Ks({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:c,layoutService:l,dockService:u,rtl:h}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...p.gestures]},y=[sm({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...c.interactions.gestures),y.push(c.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0,diff:0},s=im.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:lm,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[`${lm}start`](e){a.last=e.scale,e.preventDefault()},[`${lm}move`](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:h})),[g,...y]}const cm=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},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}}}),dm="lasso",mm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:dm,enable(e,n){if(this.started===dm||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==dm&&(i.actions.select.emit("start",dm),this.chart.component(e).emit("lassoStart",t),this.started=dm)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",dm),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const hm=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else h&&m.emit("hide")}}}};const pm=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const fm=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function gm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=fm(e,t,"range");return{interactions:[e.onEdited?pm(e,t):null,r].filter(Boolean),components:[n]}}const ym=/axis|legend/,vm=e=>e.some((e=>ym.test(e.type)));function bm({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`,`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`,...n.query.series(ls.TYPE.MARKER).map((e=>Ul(ss.COMPONENT.MARKER,e))),...n.query.series(ls.TYPE.LINE).map((e=>Ul(ss.COMPONENT.POINT,e))),ss.COMPONENT.AXIS.MAJOR,ss.COMPONENT.AXIS_OVERLAY.TIME_INNER,ss.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ss.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ss.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[ss.COMPONENT.AXIS.MAJOR,ss.COMPONENT.AXIS_OVERLAY.TIME_INNER,ss.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ss.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ss.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>vm(e)?0:3,debouncer:T,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[hm(e,t)],components:[]}}(s,l)}function xm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,ss.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[fm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[ss.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Sm={components:[],interactions:[]};function Em({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&gm({eventName:"minorRange",key:"minor-range-brush",targets:[ss.COMPONENT.AXIS.MINOR.PRIMARY,`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`,...i.query.series(ls.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>Ul(ss.COMPONENT.MARKER,e))),...i.query.series(ls.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>Ul(ss.COMPONENT.POINT,e)))],fillTargets:[ss.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:ss.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Sm,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&gm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[ss.COMPONENT.AXIS.MINOR.SECONDARY,`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`,...i.query.series(ls.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>Ul(ss.COMPONENT.MARKER,e))),...i.query.series(ls.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>Ul(ss.COMPONENT.POINT,e)))],fillTargets:[ss.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:ss.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Sm,a=xm({actions:e,models:n})||Sm,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[ss.COMPONENT.AXIS_OVERLAY.TIME_INNER,ss.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[ss.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return gm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`,`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`,...o.query.series(ls.TYPE.MARKER).map((e=>Ul(ss.COMPONENT.MARKER,e))),...o.query.series(ls.TYPE.LINE).map((e=>Ul(ss.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?ss.SCALE.MAJOR_INNER:ss.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(ss.FORMATTER.PRIMARY),o=t.scale(ss.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Sm,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=`${ss.SCALE.COLOR}Range`,{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&gm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Sm;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Mm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};const o={key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=cm(n);return{interactions:[mm(n,t)],components:[r]}}(o,{actions:e})}function Cm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:u,pluginService:c}=n,d=n.layoutService.getLayout(),{options:m}=r,h=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:d,options:m}),p=(f={logicalSize:h,minCenterRatio:0},{layoutModes:ce.getLayoutModes(),center:void 0!==f.minCenterRatio?{minWidthRatio:f.minCenterRatio,minHeightRatio:f.minCenterRatio}:void 0,logicalSize:f.logicalSize?{align:.5,preserveAspectRatio:!0,...f.logicalSize}:void 0});var f;const g=function({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o,actions:a}){var s;const{colorService:l,layoutService:u,dockService:c,tooltipService:d}=t,m=Sc({environment:n,models:t});return"center"===(null==m||null===(s=m.layout)||void 0===s?void 0:s.dock)?[m]:[...sc({models:t}),...Ll({models:t,flags:r}),...nc({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o}),Cc({models:t,environment:n}),..._l({models:t,environment:n,flags:r}),...dc({models:t,environment:n,actions:a}),Xo({viewState:i,viewCache:o,layoutService:u,dockService:c}),...yc({models:t}),...vc({chart:e,models:t,environment:n}),mc({models:t,environment:n,viewState:i,viewCache:o}),...l.custom.legendComponents(),Ec(t),...gc({chart:e,models:t,viewState:i,viewCache:o,environment:n}),...d.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s}),y=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=bm({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=Em({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Mm({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:s,chart:t,models:n,isUnsupportedFeature:l}),v=c.extendComponents([...g,...y.components]);return{collections:vl({models:n}),scales:Nl({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),components:v,formatters:Tc({models:n}),interactions:um({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:p,palettes:u.getPalettes()}}const Tm=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})=>{const{width:d,height:m}=i(),[,h]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:h,layoutService:p,refLineModel:f}=n;function g(){t.update({settings:Cm({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})})}h.update({width:d,height:m}),i.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:u});const y=p.getDataPages();p.setDataPages([]),g(),p.setDataPages(y),p.meta.isContinuous||await o.command.initialize(),g()}),[d,m]);if(h)throw h},Om=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:ss.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Am=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:ss.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],Rm=[ss.COMPONENT.AXIS_TITLE.MAJOR,ss.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,ss.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,ss.COMPONENT.GRID_LINE,ss.COMPONENT.ZERO_LINE],wm=({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u})=>{(({chart:e,models:t,viewState:n,viewCache:i})=>{const{event:{onZoomIntercept:o,onZoomChange:a}}=im;r((()=>{if(!t||!n||!i)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:u}=t,{miniComponentKeys:c}=u.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...Rm,...c]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",o({viewCache:i})))}),[t,n,i])})({chart:t,models:n,viewState:s,viewCache:l}),(({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l})=>{const[,u]=o((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:o,colorService:u,discreteModel:c}=n;function d(o=!1){t.update({settings:Cm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),data:o&&[Om({models:n}),...Am({models:n}),...u.getData()]})}const m=o.getDataPages();o.setDataPages([]),d(!0),o.setDataPages(m),o.meta.isContinuous||await c.command.initialize(),d(!1)}),[null==t?void 0:t.update,n,r]);if(u)throw u})({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u})},Nm={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Im(e){return Nm[e]||e}function km(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Im(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=Im(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),u&&c()},off(){u=!1,d()},on(){u=!0,0===l.length&&c()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function Lm(){return Lm=Object.assign?Object.assign.bind():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},Lm.apply(this,arguments)}var Pm={exports:{}};function Dm(){}function qm(){}qm.resetWarningCache=Dm;Pm.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var 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:qm,resetWarningCache:Dm};return n.PropTypes=n,n}();var zm=X(Pm.exports),$m={black:"#000",white:"#fff"},_m={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"},jm={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"},Bm={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"},Fm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Hm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Vm={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Um={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"};function Ym(){return Ym=Object.assign?Object.assign.bind():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},Ym.apply(this,arguments)}function Wm(e){return Wm="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},Wm(e)}function Xm(e){return e&&"object"===Wm(e)&&e.constructor===Object}function Gm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Ym({},e):e;return Xm(e)&&Xm(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Xm(t[i])&&i in e?r[i]=Gm(e[i],t[i],n):r[i]=t[i])})),r}function Km(e){var t=function(e,t){if("object"!==Wm(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Wm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Wm(t)?t:String(t)}function Jm(e,t,n){return(t=Km(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zm(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function Qm(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 Math.min(Math.max(t,e),n)}function eh(e){if(e.type)return e;if("#"===e.charAt(0))return eh(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Zm(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function th(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 nh(e){var t="hsl"===(e=eh(e)).type?eh(function(e){var t=(e=eh(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*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])),th({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 rh(e,t){return e=eh(e),t=Qm(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,th(e)}function ih(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function oh(e,t){if(null==e)return{};var n,r,i=ih(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ah=["xs","sm","md","lg","xl"];function sh(e,t,n){var r;return Ym({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),Ym({paddingLeft:t(2),paddingRight:t(2)},n,Jm({},e.up("sm"),Ym({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Jm(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Jm(r,e.up("sm"),{minHeight:64}),r)},n)}var lh={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:$m.white,default:Um[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},uh={text:{primary:$m.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:Um[800],default:"#303030"},action:{active:$m.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function ch(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=eh(e),t=Qm(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 th(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=eh(e),t=Qm(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 th(e)}(e.main,o)))}function dh(e){var t=e.primary,n=void 0===t?{light:Bm[300],main:Bm[500],dark:Bm[700]}:t,r=e.secondary,i=void 0===r?{light:jm.A200,main:jm.A400,dark:jm.A700}:r,o=e.error,a=void 0===o?{light:_m[300],main:_m[500],dark:_m[700]}:o,s=e.warning,l=void 0===s?{light:Vm[300],main:Vm[500],dark:Vm[700]}:s,u=e.info,c=void 0===u?{light:Fm[300],main:Fm[500],dark:Fm[700]}:u,d=e.success,m=void 0===d?{light:Hm[300],main:Hm[500],dark:Hm[700]}:d,h=e.type,p=void 0===h?"light":h,f=e.contrastThreshold,g=void 0===f?3:f,y=e.tonalOffset,v=void 0===y?.2:y,b=oh(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=nh(e),r=nh(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,uh.text.primary)>=g?uh.text.primary:lh.text.primary;return t}var S=function(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;if(!(e=Ym({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Zm(4,t));if("string"!=typeof e.main)throw new Error(Zm(5,JSON.stringify(e.main)));return ch(e,"light",n,v),ch(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},E={dark:uh,light:lh};return Gm(Ym({common:$m,type:p,primary:S(n),secondary:S(i,"A400","A200","A700"),error:S(a),warning:S(l),info:S(c),success:S(m),grey:Um,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:v},E[p]),b)}function mh(e){return Math.round(1e5*e)/1e5}function hh(e){return mh(e)}var ph={textTransform:"uppercase"},fh='"Roboto", "Helvetica", "Arial", sans-serif';function gh(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?fh:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,m=void 0===d?500:d,h=n.fontWeightBold,p=void 0===h?700:h,f=n.htmlFontSize,g=void 0===f?16:f,y=n.allVariants,v=n.pxToRem,b=oh(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=v||function(e){return"".concat(e/g*x,"rem")},E=function(e,t,n,r,o){return Ym({fontFamily:i,fontWeight:e,fontSize:S(t),lineHeight:n},i===fh?{letterSpacing:"".concat(mh(r/t),"em")}:{},o,y)},M={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(c,48,1.167,0),h4:E(c,34,1.235,.25),h5:E(c,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(c,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(c,16,1.5,.15),body2:E(c,14,1.43,.15),button:E(m,14,1.75,.4,ph),caption:E(c,12,1.66,.4),overline:E(c,12,2.66,1,ph)};return Gm(Ym({htmlFontSize:g,pxToRem:S,round:hh,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:p},M),b,{clone:!1})}function yh(){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 vh=["none",yh(0,2,1,-1,0,1,1,0,0,1,3,0),yh(0,3,1,-2,0,2,2,0,0,1,5,0),yh(0,3,3,-2,0,3,4,0,0,1,8,0),yh(0,2,4,-1,0,4,5,0,0,1,10,0),yh(0,3,5,-1,0,5,8,0,0,1,14,0),yh(0,3,5,-1,0,6,10,0,0,1,18,0),yh(0,4,5,-2,0,7,10,1,0,2,16,1),yh(0,5,5,-3,0,8,10,1,0,3,14,2),yh(0,5,6,-3,0,9,12,1,0,3,16,2),yh(0,6,6,-3,0,10,14,1,0,4,18,3),yh(0,6,7,-4,0,11,15,1,0,4,20,3),yh(0,7,8,-4,0,12,17,2,0,5,22,4),yh(0,7,8,-4,0,13,19,2,0,5,24,4),yh(0,7,9,-4,0,14,21,2,0,5,26,4),yh(0,8,9,-5,0,15,22,2,0,6,28,5),yh(0,8,10,-5,0,16,24,2,0,6,30,5),yh(0,8,11,-5,0,17,26,2,0,6,32,5),yh(0,9,11,-5,0,18,28,2,0,7,34,6),yh(0,9,12,-6,0,19,29,2,0,7,36,6),yh(0,10,13,-6,0,20,31,3,0,8,38,7),yh(0,10,13,-6,0,21,33,3,0,8,40,7),yh(0,10,14,-6,0,22,35,3,0,8,42,7),yh(0,11,14,-7,0,23,36,3,0,9,44,8),yh(0,11,15,-7,0,24,38,3,0,9,46,8)],bh={borderRadius:4};function xh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sh(e,t){if(e){if("string"==typeof e)return xh(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)?xh(e,t):void 0}}function Eh(e){return function(e){if(Array.isArray(e))return xh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sh(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 Mh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Sh(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 Ch(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Th={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)"},Oh={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ah(e){return"".concat(Math.round(e),"ms")}var Rh={easing:Th,duration:Oh,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?Oh.standard:n,i=t.easing,o=void 0===i?Th.easeInOut:i,a=t.delay,s=void 0===a?0:a;return oh(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Ah(r)," ").concat(o," ").concat("string"==typeof s?s:Ah(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))}},wh={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Nh(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=oh(e,["breakpoints","mixins","palette","spacing","typography"]),d=dh(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=oh(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var r=ah.indexOf(t);return r===ah.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[ah[r+1]]?n[ah[r+1]]:t)-a/100).concat(i,")")}return Ym({keys:ah,values:n,up:l,down:function(e){var t=ah.indexOf(e)+1,r=n[ah[t]];return t===ah.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}(n),h=Ch(s),p=Gm({breakpoints:m,direction:"ltr",mixins:sh(m,h,i),overrides:{},palette:d,props:{},shadows:vh,typography:gh(d,u),spacing:h,shape:bh,transitions:Rh,zIndex:wh},c),f=arguments.length,g=new Array(f>1?f-1:0),y=1;y<f;y++)g[y-1]=arguments[y];return p=g.reduce((function(e,t){return Gm(e,t)}),p)}var Ih="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",kh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Lh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==kh.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ih]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}function Ph(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var Dh="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},qh="object"===("undefined"==typeof window?"undefined":Dh(window))&&"object"===("undefined"==typeof document?"undefined":Dh(document))&&9===document.nodeType;function zh(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,Km(r.key),r)}}function $h(e,t,n){return t&&zh(e.prototype,t),n&&zh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _h(e,t){return _h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_h(e,t)}function jh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_h(e,t)}function Bh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Fh={}.constructor;function Hh(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Hh);if(e.constructor!==Fh)return e;var t={};for(var n in e)t[n]=Hh(e[n]);return t}function Vh(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Hh(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var Uh=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Yh=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Uh(e[n]," ");else t=Uh(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Wh(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function Xh(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Gh(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=Wh(n),l=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];for(var m in d){var h=d[m];null!=h&&(r&&(r+=l),r+=Xh(m+":"+u+Yh(h)+";",o))}}else for(var p in a){var f=a[p];null!=f&&(r&&(r+=l),r+=Xh(p+":"+u+Yh(f)+";",o))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(r&&(r+=l),r+=Xh(g+":"+u+Yh(y)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),Xh(""+e+u+"{"+r,--o)+Xh("}",o)):r}var Kh=/([[\].#*$><+~=|^:(),"'`\s])/g,Jh="undefined"!=typeof CSS&&CSS.escape,Zh=function(e){return Jh?Jh(e):e.replace(Kh,"\\$1")},Qh=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),ep=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(Bh(Bh(i)),s),i.selectorText="."+Zh(i.id)),i}jh(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Yh(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Ym({},e,{allowEmpty:!0}):e;return Gh(this.selectorText,this.style,n)},$h(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Qh),tp={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new ep(e,t,n)}},np={indent:1,children:!0},rp=/@([\w-]+)/,ip=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(rp);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Rp(Ym({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=np);var t=Wh(e).linebreak;if(null==e.indent&&(e.indent=np.indent),null==e.children&&(e.children=np.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),op=/@container|@media|@supports\s+/,ap={onCreateRule:function(e,t,n){return op.test(e)?new ip(e,t,n):null}},sp={indent:1,children:!0},lp=/@keyframes\s+([\w-]+)/,up=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(lp);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:Zh(a(this,o)),this.rules=new Rp(Ym({},n,{parent:this})),t)this.rules.add(s,t[s],Ym({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=sp);var t=Wh(e).linebreak;if(null==e.indent&&(e.indent=sp.indent),null==e.children&&(e.children=sp.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),cp=/@keyframes\s+/,dp=/\$([\w-]+)/g,mp=function(e,t){return"string"==typeof e?e.replace(dp,(function(e,n){return n in t?t[n]:e})):e},hp=function(e,t,n){var r=e[t],i=mp(r,n);i!==r&&(e[t]=i)},pp={onCreateRule:function(e,t,n){return"string"==typeof e&&cp.test(e)?new up(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&hp(e,"animation-name",n.keyframes),"animation"in e&&hp(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return mp(e,r.keyframes);default:return e}}},fp=function(e){function t(){return e.apply(this,arguments)||this}return jh(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Ym({},e,{allowEmpty:!0}):e;return Gh(this.key,this.style,n)},t}(Qh),gp={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new fp(e,t,n):null}},yp=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Wh(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Gh(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Gh(this.at,this.style,e)},e}(),vp=/@font-face/,bp={onCreateRule:function(e,t,n){return vp.test(e)?new yp(e,t,n):null}},xp=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Gh(this.key,this.style,e)},e}(),Sp={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new xp(e,t,n):null}},Ep=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Mp={"@charset":!0,"@import":!0,"@namespace":!0},Cp={onCreateRule:function(e,t,n){return e in Mp?new Ep(e,t,n):null}},Tp=[tp,ap,pp,gp,bp,Sp,Cp],Op={process:!0},Ap={force:!0,process:!0},Rp=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,c=Ym({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+Zh(this.classes[d]));var m=Vh(d,t,c);if(!m)return null;this.register(m);var h=void 0===c.index?this.index.length:c.index;return this.index.splice(h,0,m),m},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=Ym({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof ep?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof up&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof ep?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof up&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Op);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,Ap)}for(var c in s){var d=t.style[c],m=s[c];null==d&&d!==m&&t.prop(c,null,Ap)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Wh(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),wp=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Ym({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Rp(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Np=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Ip=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=ih(t,["attached"]),i=Wh(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},$h(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),kp=new Ip,Lp="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Pp="2f1acc6c3a606b082e5eef5e54414ffb";null==Lp[Pp]&&(Lp[Pp]=0);var Dp=Lp[Pp]++,qp=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+Dp+i+t:o+n.key+"-"+Dp+(i?"-"+i:"")+"-"+t}},zp=function(e){var t;return function(){return t||(t=e()),t}},$p=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},_p=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Yh(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},jp=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Bp=function(e,t){return e.selectorText=t,e.selectorText===t},Fp=zp((function(){return document.querySelector("head")}));function Hp(e){var t=kp.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=Fp(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var Vp=zp((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Up=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Yp=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Wp=function(){function e(e){this.getPropertyValue=$p,this.setProperty=_p,this.removeProperty=jp,this.setSelector=Bp,this.hasInsertedRules=!1,this.cssRules=[],e&&kp.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=Vp();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Hp(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else Fp().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=Yp(n,t);if(!1===(i=Up(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=Yp(n,t),l=Up(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof wp&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Xp=0,Gp=function(){function e(e){this.id=Xp++,this.version="10.10.0",this.plugins=new Np,this.options={id:{minify:!1},createGenerateId:qp,Renderer:qh?Wp:null,plugins:[]},this.generateId=qp({minify:!1});for(var t=0;t<Tp.length;t++)this.plugins.use(Tp[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Ym({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===kp.index?0:kp.index+1);var r=new wp(e,Ym({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),kp.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=Ym({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Vh(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Kp=function(e){return new Gp(e)},Jp="object"==typeof CSS&&null!=CSS&&"number"in CSS;function Zp(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=Zp(r);o&&(t||(t={}),t[n]=o)}}return t}
8
8
  /**
9
9
  * A better abstraction over CSS.
10
10
  *
11
11
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
12
12
  * @website https://github.com/cssinjs/jss
13
13
  * @license MIT
14
- */Xp();var Jp=Date.now(),Zp="fnValues"+Jp,Qp="fnStyle"+ ++Jp,ef=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Fh(e,{},n);return r[Qp]=t,r},onProcessStyle:function(e,t){if(Zp in t||Qp in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Zp]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Qp];o&&(i.style=o(e)||{});var a=i[Zp];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},tf="@global",nf="@global ",rf=function(){function e(e,t,n){for(var r in this.type="global",this.at=tf,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Op(Vm({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),of=function(){function e(e,t,n){this.type="global",this.at=tf,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(nf.length);this.rule=n.jss.createRule(r,t,Vm({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),af=/\s*,\s*/g;function sf(e,t){for(var n=e.split(af),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function lf(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===tf)return new rf(e,t,n);if("@"===e[0]&&e.substr(0,nf.length)===nf)return new of(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[tf]:null;if(i){for(var o in i)t.addRule(o,i[o],Vm({},n,{selector:sf(o,e.selector)}));delete r[tf]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,tf.length)===tf){var o=sf(i.substr(tf.length),e.selector);t.addRule(o,r[i],Vm({},n,{selector:o})),delete r[i]}}(e,t))}}}var uf=/\s*,\s*/g,cf=/&/g,df=/\$([\w-]+)/g;function mf(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(uf),r=e.split(uf),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(cf,a):a+" "+l}return i}function n(e,t,n){if(n)return Vm({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=Vm({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),m="@"===c[0];if(d||m){if(a=n(l,u,a),d){var h=t(c,l.selector);s||(s=e(u,o)),h=h.replace(df,s);var p=l.key+"-"+c;"replaceRule"in u?u.replaceRule(p,r[c],Vm({},a,{selector:h})):u.addRule(p,r[c],Vm({},a,{selector:h}))}else m&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var hf=/[A-Z]/g,pf=/^ms-/,ff={};function gf(e){return"-"+e.toLowerCase()}function yf(e){if(ff.hasOwnProperty(e))return ff[e];var t=e.replace(hf,gf);return ff[e]=pf.test(t)?"-"+t:t}function vf(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:yf(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(vf):t.fallbacks=vf(e.fallbacks)),t}var bf=Gp&&CSS?CSS.px:"px",xf=Gp&&CSS?CSS.ms:"ms",Sf=Gp&&CSS?CSS.percent:"%";function Ef(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Mf=Ef({"animation-delay":xf,"animation-duration":xf,"background-position":bf,"background-position-x":bf,"background-position-y":bf,"background-size":bf,border:bf,"border-bottom":bf,"border-bottom-left-radius":bf,"border-bottom-right-radius":bf,"border-bottom-width":bf,"border-left":bf,"border-left-width":bf,"border-radius":bf,"border-right":bf,"border-right-width":bf,"border-top":bf,"border-top-left-radius":bf,"border-top-right-radius":bf,"border-top-width":bf,"border-width":bf,"border-block":bf,"border-block-end":bf,"border-block-end-width":bf,"border-block-start":bf,"border-block-start-width":bf,"border-block-width":bf,"border-inline":bf,"border-inline-end":bf,"border-inline-end-width":bf,"border-inline-start":bf,"border-inline-start-width":bf,"border-inline-width":bf,"border-start-start-radius":bf,"border-start-end-radius":bf,"border-end-start-radius":bf,"border-end-end-radius":bf,margin:bf,"margin-bottom":bf,"margin-left":bf,"margin-right":bf,"margin-top":bf,"margin-block":bf,"margin-block-end":bf,"margin-block-start":bf,"margin-inline":bf,"margin-inline-end":bf,"margin-inline-start":bf,padding:bf,"padding-bottom":bf,"padding-left":bf,"padding-right":bf,"padding-top":bf,"padding-block":bf,"padding-block-end":bf,"padding-block-start":bf,"padding-inline":bf,"padding-inline-end":bf,"padding-inline-start":bf,"mask-position-x":bf,"mask-position-y":bf,"mask-size":bf,height:bf,width:bf,"min-height":bf,"max-height":bf,"min-width":bf,"max-width":bf,bottom:bf,left:bf,top:bf,right:bf,inset:bf,"inset-block":bf,"inset-block-end":bf,"inset-block-start":bf,"inset-inline":bf,"inset-inline-end":bf,"inset-inline-start":bf,"box-shadow":bf,"text-shadow":bf,"column-gap":bf,"column-rule":bf,"column-rule-width":bf,"column-width":bf,"font-size":bf,"font-size-delta":bf,"letter-spacing":bf,"text-decoration-thickness":bf,"text-indent":bf,"text-stroke":bf,"text-stroke-width":bf,"word-spacing":bf,motion:bf,"motion-offset":bf,outline:bf,"outline-offset":bf,"outline-width":bf,perspective:bf,"perspective-origin-x":Sf,"perspective-origin-y":Sf,"transform-origin":Sf,"transform-origin-x":Sf,"transform-origin-y":Sf,"transform-origin-z":Sf,"transition-delay":xf,"transition-duration":xf,"vertical-align":bf,"flex-basis":bf,"shape-margin":bf,size:bf,gap:bf,grid:bf,"grid-gap":bf,"row-gap":bf,"grid-row-gap":bf,"grid-column-gap":bf,"grid-template-rows":bf,"grid-template-columns":bf,"grid-auto-rows":bf,"grid-auto-columns":bf,"box-shadow-x":bf,"box-shadow-y":bf,"box-shadow-blur":bf,"box-shadow-spread":bf,"font-line-height":bf,"text-shadow-x":bf,"text-shadow-y":bf,"text-shadow-blur":bf});function Cf(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Cf(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Cf(i,t[i],n);else for(var o in t)t[o]=Cf(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Mf[e];return!a||0===t&&a===bf?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Tf(e){void 0===e&&(e={});var t=Ef(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Cf(r,e[r],t);return e},onChangeValue:function(e,n){return Cf(n,e,t)}}}var Of="",Af="",Rf="",wf="",Nf=Ph&&"ontouchstart"in document.documentElement;if(Ph){var If={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},kf=document.createElement("p").style;for(var Lf in If)if(Lf+"Transform"in kf){Of=Lf,Af=If[Lf];break}"Webkit"===Of&&"msHyphens"in kf&&(Of="ms",Af=If.ms,wf="edge"),"Webkit"===Of&&"-apple-trailing-word"in kf&&(Rf="apple")}var Pf={js:Of,css:Af,vendor:Rf,browser:wf,isTouch:Nf};var Df={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Pf.js?"-webkit-"+e:Pf.css+e)}},qf={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Pf.js?Pf.css+"print-"+e:e)}},zf=/[-\s]+(.)?/g;function $f(e,t){return t?t.toUpperCase():""}function _f(e){return e.replace(zf,$f)}function jf(e){return _f("-"+e)}var Bf,Ff={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Pf.js){var n="mask-image";if(_f(n)in t)return e;if(Pf.js+jf(n)in t)return Pf.css+e}return e}},Hf={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Pf.vendor||Pf.isTouch?e:Pf.css+e)}},Vf={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Pf.css+e)}},Uf={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Pf.css+e)}},Yf={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Pf.js||"ms"===Pf.js&&"edge"!==Pf.browser?Pf.css+e:e)}},Wf={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Pf.js||"ms"===Pf.js||"apple"===Pf.vendor?Pf.css+e:e)}},Xf={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Pf.js?"WebkitColumn"+jf(e)in t&&Pf.css+"column-"+e:"Moz"===Pf.js&&("page"+jf(e)in t&&"page-"+e))}},Gf={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Pf.js)return e;var n=e.replace("-inline","");return Pf.js+jf(n)in t&&Pf.css+n}},Kf={supportedProperty:function(e,t){return _f(e)in t&&e}},Jf={supportedProperty:function(e,t){var n=jf(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Pf.js+n in t?Pf.css+e:"Webkit"!==Pf.js&&"Webkit"+n in t&&"-webkit-"+e}},Zf={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Pf.js?""+Pf.css+e:e)}},Qf={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Pf.js?Pf.css+"scroll-chaining":e)}},eg={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},tg={supportedProperty:function(e,t){var n=eg[e];return!!n&&(Pf.js+jf(n)in t&&Pf.css+n)}},ng={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},rg=Object.keys(ng),ig=function(e){return Pf.css+e},og={supportedProperty:function(e,t,n){var r=n.multiple;if(rg.indexOf(e)>-1){var i=ng[e];if(!Array.isArray(i))return Pf.js+jf(i)in t&&Pf.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Pf.js+jf(i[0])in t))return!1;return i.map(ig)}return!1}},ag=[Df,qf,Ff,Hf,Vf,Uf,Yf,Wf,Xf,Gf,Kf,Jf,Zf,Qf,tg,og],sg=ag.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),lg=ag.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,xh(t.noPrefill)),e}),[]),ug={};if(Ph){Bf=document.createElement("p");var cg=window.getComputedStyle(document.documentElement,"");for(var dg in cg)isNaN(dg)||(ug[cg[dg]]=cg[dg]);lg.forEach((function(e){return delete ug[e]}))}function mg(e,t){if(void 0===t&&(t={}),!Bf)return e;if(null!=ug[e])return ug[e];"transition"!==e&&"transform"!==e||(t[e]=e in Bf.style);for(var n=0;n<sg.length&&(ug[e]=sg[n](e,Bf.style,t),!ug[e]);n++);try{Bf.style[e]=""}catch(e){return!1}return ug[e]}var hg,pg={},fg={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},gg=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function yg(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?mg(t):", "+mg(n);return r||(t||n)}function vg(e,t){var n=t;if(!hg||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=pg[r])return pg[r];try{hg.style[e]=n}catch(e){return pg[r]=!1,!1}if(fg[e])n=n.replace(gg,yg);else if(""===hg.style[e]&&("-ms-flex"===(n=Pf.css+n)&&(hg.style[e]="-ms-flexbox"),hg.style[e]=n,""===hg.style[e]))return pg[r]=!1,!1;return hg.style[e]="",pg[r]=n,pg[r]}function bg(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=mg(n);o&&o!==n&&(i=!0);var a=!1,s=vg(o,Vh(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Pf.js?e:"@"+Pf.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return vg(t,Vh(e))||e}}}function xg(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}}function Sg(){return{plugins:[ef(),lf(),mf(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=vf(e[t]);return e}return vf(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=yf(t);return t===r?e:(n.prop(r,e),null)}},Tf(),"undefined"==typeof window?null:bg(),xg()]}}function Eg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=Vm({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Ph&&(hg=document.createElement("p"));var Mg={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Cg=Mg,Tg=_.createContext(null);function Og(){return _.useContext(Tg)}var Ag,Rg=Xp(Sg()),wg={disableGeneration:!1,generateClassName:Ih(),jss:Rg,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Ng=_.createContext(wg);function Ig(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=rh(e,["children","injectFirst","disableGeneration"]),s=Vm({},_.useContext(Ng),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Ag){var l=document.head;Ag=document.createComment("mui-inject-first"),l.insertBefore(Ag,l.firstChild)}s.jss=Xp({plugins:Sg().plugins,insertionPoint:Ag})}return _.createElement(Ng.Provider,{value:s},t)}var kg=-1e9;var Lg={};function Pg(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=Cg.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Cg.set(i.sheetsManager,o,r,s));var l=Vm({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=Cg.get(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,Vm({link:!1},l))).attach(),i.sheetsCache&&Cg.set(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=Kp(d)}if(s.dynamicStyles){var m=i.jss.createStyleSheet(s.dynamicStyles,Vm({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=Eg({baseClasses:s.staticSheet.classes,newClasses:m.classes}),u&&u.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Dg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?Lg:o,s=rh(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=Vm({},i);return Object.keys(o).forEach((function(e){a[e]=Wm(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:kg+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Og()||a,r=Vm({},_.useContext(Ng),s),o=_.useRef(),u=_.useRef();!function(e,t){var n,r=_.useRef([]),i=_.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),_.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Pg(i,e),u.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Cg.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Cg.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),_.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),u.current=!0}));var c=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Eg({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function qg(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qg(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function zg(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qg(e))&&(r&&(r+=" "),r+=t);return r}var $g={exports:{}},_g={};
14
+ */Kp();var Qp=Date.now(),ef="fnValues"+Qp,tf="fnStyle"+ ++Qp,nf=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Vh(e,{},n);return r[tf]=t,r},onProcessStyle:function(e,t){if(ef in t||tf in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[ef]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[tf];o&&(i.style=o(e)||{});var a=i[ef];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},rf="@global",of="@global ",af=function(){function e(e,t,n){for(var r in this.type="global",this.at=rf,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Rp(Ym({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),sf=function(){function e(e,t,n){this.type="global",this.at=rf,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(of.length);this.rule=n.jss.createRule(r,t,Ym({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),lf=/\s*,\s*/g;function uf(e,t){for(var n=e.split(lf),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function cf(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===rf)return new af(e,t,n);if("@"===e[0]&&e.substr(0,of.length)===of)return new sf(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[rf]:null;if(i){for(var o in i)t.addRule(o,i[o],Ym({},n,{selector:uf(o,e.selector)}));delete r[rf]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,rf.length)===rf){var o=uf(i.substr(rf.length),e.selector);t.addRule(o,r[i],Ym({},n,{selector:o})),delete r[i]}}(e,t))}}}var df=/\s*,\s*/g,mf=/&/g,hf=/\$([\w-]+)/g;function pf(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(df),r=e.split(df),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(mf,a):a+" "+l}return i}function n(e,t,n){if(n)return Ym({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=Ym({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),m="@"===c[0];if(d||m){if(a=n(l,u,a),d){var h=t(c,l.selector);s||(s=e(u,o)),h=h.replace(hf,s);var p=l.key+"-"+c;"replaceRule"in u?u.replaceRule(p,r[c],Ym({},a,{selector:h})):u.addRule(p,r[c],Ym({},a,{selector:h}))}else m&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var ff=/[A-Z]/g,gf=/^ms-/,yf={};function vf(e){return"-"+e.toLowerCase()}function bf(e){if(yf.hasOwnProperty(e))return yf[e];var t=e.replace(ff,vf);return yf[e]=gf.test(t)?"-"+t:t}function xf(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:bf(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(xf):t.fallbacks=xf(e.fallbacks)),t}var Sf=Jp&&CSS?CSS.px:"px",Ef=Jp&&CSS?CSS.ms:"ms",Mf=Jp&&CSS?CSS.percent:"%";function Cf(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Tf=Cf({"animation-delay":Ef,"animation-duration":Ef,"background-position":Sf,"background-position-x":Sf,"background-position-y":Sf,"background-size":Sf,border:Sf,"border-bottom":Sf,"border-bottom-left-radius":Sf,"border-bottom-right-radius":Sf,"border-bottom-width":Sf,"border-left":Sf,"border-left-width":Sf,"border-radius":Sf,"border-right":Sf,"border-right-width":Sf,"border-top":Sf,"border-top-left-radius":Sf,"border-top-right-radius":Sf,"border-top-width":Sf,"border-width":Sf,"border-block":Sf,"border-block-end":Sf,"border-block-end-width":Sf,"border-block-start":Sf,"border-block-start-width":Sf,"border-block-width":Sf,"border-inline":Sf,"border-inline-end":Sf,"border-inline-end-width":Sf,"border-inline-start":Sf,"border-inline-start-width":Sf,"border-inline-width":Sf,"border-start-start-radius":Sf,"border-start-end-radius":Sf,"border-end-start-radius":Sf,"border-end-end-radius":Sf,margin:Sf,"margin-bottom":Sf,"margin-left":Sf,"margin-right":Sf,"margin-top":Sf,"margin-block":Sf,"margin-block-end":Sf,"margin-block-start":Sf,"margin-inline":Sf,"margin-inline-end":Sf,"margin-inline-start":Sf,padding:Sf,"padding-bottom":Sf,"padding-left":Sf,"padding-right":Sf,"padding-top":Sf,"padding-block":Sf,"padding-block-end":Sf,"padding-block-start":Sf,"padding-inline":Sf,"padding-inline-end":Sf,"padding-inline-start":Sf,"mask-position-x":Sf,"mask-position-y":Sf,"mask-size":Sf,height:Sf,width:Sf,"min-height":Sf,"max-height":Sf,"min-width":Sf,"max-width":Sf,bottom:Sf,left:Sf,top:Sf,right:Sf,inset:Sf,"inset-block":Sf,"inset-block-end":Sf,"inset-block-start":Sf,"inset-inline":Sf,"inset-inline-end":Sf,"inset-inline-start":Sf,"box-shadow":Sf,"text-shadow":Sf,"column-gap":Sf,"column-rule":Sf,"column-rule-width":Sf,"column-width":Sf,"font-size":Sf,"font-size-delta":Sf,"letter-spacing":Sf,"text-decoration-thickness":Sf,"text-indent":Sf,"text-stroke":Sf,"text-stroke-width":Sf,"word-spacing":Sf,motion:Sf,"motion-offset":Sf,outline:Sf,"outline-offset":Sf,"outline-width":Sf,perspective:Sf,"perspective-origin-x":Mf,"perspective-origin-y":Mf,"transform-origin":Mf,"transform-origin-x":Mf,"transform-origin-y":Mf,"transform-origin-z":Mf,"transition-delay":Ef,"transition-duration":Ef,"vertical-align":Sf,"flex-basis":Sf,"shape-margin":Sf,size:Sf,gap:Sf,grid:Sf,"grid-gap":Sf,"row-gap":Sf,"grid-row-gap":Sf,"grid-column-gap":Sf,"grid-template-rows":Sf,"grid-template-columns":Sf,"grid-auto-rows":Sf,"grid-auto-columns":Sf,"box-shadow-x":Sf,"box-shadow-y":Sf,"box-shadow-blur":Sf,"box-shadow-spread":Sf,"font-line-height":Sf,"text-shadow-x":Sf,"text-shadow-y":Sf,"text-shadow-blur":Sf});function Of(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Of(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Of(i,t[i],n);else for(var o in t)t[o]=Of(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Tf[e];return!a||0===t&&a===Sf?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Af(e){void 0===e&&(e={});var t=Cf(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Of(r,e[r],t);return e},onChangeValue:function(e,n){return Of(n,e,t)}}}var Rf="",wf="",Nf="",If="",kf=qh&&"ontouchstart"in document.documentElement;if(qh){var Lf={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Pf=document.createElement("p").style;for(var Df in Lf)if(Df+"Transform"in Pf){Rf=Df,wf=Lf[Df];break}"Webkit"===Rf&&"msHyphens"in Pf&&(Rf="ms",wf=Lf.ms,If="edge"),"Webkit"===Rf&&"-apple-trailing-word"in Pf&&(Nf="apple")}var qf={js:Rf,css:wf,vendor:Nf,browser:If,isTouch:kf};var zf={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===qf.js?"-webkit-"+e:qf.css+e)}},$f={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===qf.js?qf.css+"print-"+e:e)}},_f=/[-\s]+(.)?/g;function jf(e,t){return t?t.toUpperCase():""}function Bf(e){return e.replace(_f,jf)}function Ff(e){return Bf("-"+e)}var Hf,Vf={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===qf.js){var n="mask-image";if(Bf(n)in t)return e;if(qf.js+Ff(n)in t)return qf.css+e}return e}},Uf={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==qf.vendor||qf.isTouch?e:qf.css+e)}},Yf={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:qf.css+e)}},Wf={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:qf.css+e)}},Xf={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===qf.js||"ms"===qf.js&&"edge"!==qf.browser?qf.css+e:e)}},Gf={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===qf.js||"ms"===qf.js||"apple"===qf.vendor?qf.css+e:e)}},Kf={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===qf.js?"WebkitColumn"+Ff(e)in t&&qf.css+"column-"+e:"Moz"===qf.js&&("page"+Ff(e)in t&&"page-"+e))}},Jf={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===qf.js)return e;var n=e.replace("-inline","");return qf.js+Ff(n)in t&&qf.css+n}},Zf={supportedProperty:function(e,t){return Bf(e)in t&&e}},Qf={supportedProperty:function(e,t){var n=Ff(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:qf.js+n in t?qf.css+e:"Webkit"!==qf.js&&"Webkit"+n in t&&"-webkit-"+e}},eg={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===qf.js?""+qf.css+e:e)}},tg={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===qf.js?qf.css+"scroll-chaining":e)}},ng={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},rg={supportedProperty:function(e,t){var n=ng[e];return!!n&&(qf.js+Ff(n)in t&&qf.css+n)}},ig={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},og=Object.keys(ig),ag=function(e){return qf.css+e},sg={supportedProperty:function(e,t,n){var r=n.multiple;if(og.indexOf(e)>-1){var i=ig[e];if(!Array.isArray(i))return qf.js+Ff(i)in t&&qf.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(qf.js+Ff(i[0])in t))return!1;return i.map(ag)}return!1}},lg=[zf,$f,Vf,Uf,Yf,Wf,Xf,Gf,Kf,Jf,Zf,Qf,eg,tg,rg,sg],ug=lg.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),cg=lg.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Eh(t.noPrefill)),e}),[]),dg={};if(qh){Hf=document.createElement("p");var mg=window.getComputedStyle(document.documentElement,"");for(var hg in mg)isNaN(hg)||(dg[mg[hg]]=mg[hg]);cg.forEach((function(e){return delete dg[e]}))}function pg(e,t){if(void 0===t&&(t={}),!Hf)return e;if(null!=dg[e])return dg[e];"transition"!==e&&"transform"!==e||(t[e]=e in Hf.style);for(var n=0;n<ug.length&&(dg[e]=ug[n](e,Hf.style,t),!dg[e]);n++);try{Hf.style[e]=""}catch(e){return!1}return dg[e]}var fg,gg={},yg={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},vg=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function bg(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?pg(t):", "+pg(n);return r||(t||n)}function xg(e,t){var n=t;if(!fg||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=gg[r])return gg[r];try{fg.style[e]=n}catch(e){return gg[r]=!1,!1}if(yg[e])n=n.replace(vg,bg);else if(""===fg.style[e]&&("-ms-flex"===(n=qf.css+n)&&(fg.style[e]="-ms-flexbox"),fg.style[e]=n,""===fg.style[e]))return gg[r]=!1,!1;return fg.style[e]="",gg[r]=n,gg[r]}function Sg(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=pg(n);o&&o!==n&&(i=!0);var a=!1,s=xg(o,Yh(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===qf.js?e:"@"+qf.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return xg(t,Yh(e))||e}}}function Eg(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}}function Mg(){return{plugins:[nf(),cf(),pf(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=xf(e[t]);return e}return xf(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=bf(t);return t===r?e:(n.prop(r,e),null)}},Af(),"undefined"==typeof window?null:Sg(),Eg()]}}function Cg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=Ym({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}qh&&(fg=document.createElement("p"));var Tg={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Og=Tg,Ag=_.createContext(null);function Rg(){return _.useContext(Ag)}var wg,Ng=Kp(Mg()),Ig={disableGeneration:!1,generateClassName:Lh(),jss:Ng,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},kg=_.createContext(Ig);function Lg(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=oh(e,["children","injectFirst","disableGeneration"]),s=Ym({},_.useContext(kg),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!wg){var l=document.head;wg=document.createComment("mui-inject-first"),l.insertBefore(wg,l.firstChild)}s.jss=Kp({plugins:Mg().plugins,insertionPoint:wg})}return _.createElement(kg.Provider,{value:s},t)}var Pg=-1e9;var Dg={};function qg(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=Og.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Og.set(i.sheetsManager,o,r,s));var l=Ym({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=Og.get(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,Ym({link:!1},l))).attach(),i.sheetsCache&&Og.set(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=Zp(d)}if(s.dynamicStyles){var m=i.jss.createStyleSheet(s.dynamicStyles,Ym({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=Cg({baseClasses:s.staticSheet.classes,newClasses:m.classes}),u&&u.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function zg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?Dg:o,s=oh(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=Ym({},i);return Object.keys(o).forEach((function(e){a[e]=Gm(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:Pg+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Rg()||a,r=Ym({},_.useContext(kg),s),o=_.useRef(),u=_.useRef();!function(e,t){var n,r=_.useRef([]),i=_.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),_.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return qg(i,e),u.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Og.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Og.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),_.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),u.current=!0}));var c=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Cg({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function $g(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=$g(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function _g(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=$g(e))&&(r&&(r+=" "),r+=t);return r}var jg={exports:{}},Bg={};
15
15
  /** @license React v16.11.0
16
16
  * react-is.production.min.js
17
17
  *
@@ -20,4 +20,4 @@ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.
20
20
  * This source code is licensed under the MIT license found in the
21
21
  * LICENSE file in the root directory of this source tree.
22
22
  */
23
- Object.defineProperty(_g,"__esModule",{value:!0});var jg="function"==typeof Symbol&&Symbol.for,Bg=jg?Symbol.for("react.element"):60103,Fg=jg?Symbol.for("react.portal"):60106,Hg=jg?Symbol.for("react.fragment"):60107,Vg=jg?Symbol.for("react.strict_mode"):60108,Ug=jg?Symbol.for("react.profiler"):60114,Yg=jg?Symbol.for("react.provider"):60109,Wg=jg?Symbol.for("react.context"):60110,Xg=jg?Symbol.for("react.async_mode"):60111,Gg=jg?Symbol.for("react.concurrent_mode"):60111,Kg=jg?Symbol.for("react.forward_ref"):60112,Jg=jg?Symbol.for("react.suspense"):60113,Zg=jg?Symbol.for("react.suspense_list"):60120,Qg=jg?Symbol.for("react.memo"):60115,ey=jg?Symbol.for("react.lazy"):60116,ty=jg?Symbol.for("react.fundamental"):60117,ny=jg?Symbol.for("react.responder"):60118,ry=jg?Symbol.for("react.scope"):60119;function iy(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Bg:switch(e=e.type){case Xg:case Gg:case Hg:case Ug:case Vg:case Jg:return e;default:switch(e=e&&e.$$typeof){case Wg:case Kg:case Yg:return e;default:return t}}case ey:case Qg:case Fg:return t}}}function oy(e){return iy(e)===Gg}_g.typeOf=iy,_g.AsyncMode=Xg,_g.ConcurrentMode=Gg,_g.ContextConsumer=Wg,_g.ContextProvider=Yg,_g.Element=Bg,_g.ForwardRef=Kg,_g.Fragment=Hg,_g.Lazy=ey,_g.Memo=Qg,_g.Portal=Fg,_g.Profiler=Ug,_g.StrictMode=Vg,_g.Suspense=Jg,_g.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Hg||e===Gg||e===Ug||e===Vg||e===Jg||e===Zg||"object"==typeof e&&null!==e&&(e.$$typeof===ey||e.$$typeof===Qg||e.$$typeof===Yg||e.$$typeof===Wg||e.$$typeof===Kg||e.$$typeof===ty||e.$$typeof===ny||e.$$typeof===ry)},_g.isAsyncMode=function(e){return oy(e)||iy(e)===Xg},_g.isConcurrentMode=oy,_g.isContextConsumer=function(e){return iy(e)===Wg},_g.isContextProvider=function(e){return iy(e)===Yg},_g.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Bg},_g.isForwardRef=function(e){return iy(e)===Kg},_g.isFragment=function(e){return iy(e)===Hg},_g.isLazy=function(e){return iy(e)===ey},_g.isMemo=function(e){return iy(e)===Qg},_g.isPortal=function(e){return iy(e)===Fg},_g.isProfiler=function(e){return iy(e)===Ug},_g.isStrictMode=function(e){return iy(e)===Vg},_g.isSuspense=function(e){return iy(e)===Jg},$g.exports=_g;var ay=$g.exports,sy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ly={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},uy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cy={};function dy(e){return ay.isMemo(e)?uy:cy[e.$$typeof]||sy}cy[ay.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cy[ay.Memo]=uy;var my=Object.defineProperty,hy=Object.getOwnPropertyNames,py=Object.getOwnPropertySymbols,fy=Object.getOwnPropertyDescriptor,gy=Object.getPrototypeOf,yy=Object.prototype;var vy=function e(t,n,r){if("string"!=typeof n){if(yy){var i=gy(n);i&&i!==yy&&e(t,i,r)}var o=hy(n);py&&(o=o.concat(py(n)));for(var a=dy(t),s=dy(n),l=0;l<o.length;++l){var u=o[l];if(!(ly[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=fy(n,u);try{my(t,u,c)}catch(e){}}}}return t},by=X(vy);function xy(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=rh(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(Vm({theme:e},n))}}}:{root:t},l=Dg(s,Vm({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=_.forwardRef((function(t,r){var i,o,a,s=t.children,u=t.className,c=t.clone,d=t.component,m=rh(t,["children","className","clone","component"]),h=zg(l(t).root,u),p=m;if(n&&(i=p,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),p=a),c)return _.cloneElement(s,Vm({className:zg(s.props.className,h)},p));if("function"==typeof s)return s(Vm({className:h},p));var f=d||e;return _.createElement(f,Vm({ref:r,className:h},p),s)}));return by(u,e),u}}function Sy(e){var t=e.children,n=e.theme,r=Og(),i=_.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):Vm({},e,t)}(r,n);return null!=e&&(e[wh]=null!==r),e}),[n,r]);return _.createElement(Tg.Provider,{value:i},t)}var Ey=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=rh(t,["defaultTheme","withTheme","name"]),l=a,u=Dg(e,Vm({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=_.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=rh(e,["classes","innerRef"]),c=u(Vm({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Og()||r,a&&(d=kh({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),_.createElement(n,Vm({ref:s||t,classes:c},d))}));return by(c,n),c}},My=Rh(),Cy=function(e){var t=xy(e);return function(e,n){return t(e,Vm({defaultTheme:My},n))}};function Ty(e,t){return Ey(e,Vm({defaultTheme:My},t))}function Oy(e){if("string"!=typeof e)throw new Error(Km(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ay(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Ry(e){return e&&e.ownerDocument||document}function wy(e){return Ry(e).defaultView||window}function Ny(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Iy="undefined"!=typeof window?j.useLayoutEffect:j.useEffect;function ky(e){var t=j.useRef(e);return Iy((function(){t.current=e})),j.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Ly(e,t){return j.useMemo((function(){return null==e&&null==t?null:function(n){Ny(e,n),Ny(t,n)}}),[e,t])}var Py=!0,Dy=!1,qy=null,zy={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function $y(e){e.metaKey||e.altKey||e.ctrlKey||(Py=!0)}function _y(){Py=!1}function jy(){"hidden"===this.visibilityState&&Dy&&(Py=!0)}function By(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return Py||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!zy[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function Fy(){Dy=!0,window.clearTimeout(qy),qy=window.setTimeout((function(){Dy=!1}),100)}function Hy(){return{isFocusVisible:By,onBlurVisible:Fy,ref:j.useCallback((function(e){var t,n=V.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",$y,!0),t.addEventListener("mousedown",_y,!0),t.addEventListener("pointerdown",_y,!0),t.addEventListener("touchstart",_y,!0),t.addEventListener("visibilitychange",jy,!0))}),[])}}var Vy=!1,Uy=_.createContext(null),Yy="unmounted",Wy="exited",Xy="entering",Gy="entered",Ky="exiting",Jy=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Wy,r.appearStatus=Xy):i=Gy:i=t.unmountOnExit||t.mountOnEnter?Yy:Wy,r.state={status:i},r.nextCallback=null,r}$h(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Yy?{status:Wy}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Xy&&n!==Gy&&(t=Xy):n!==Xy&&n!==Gy||(t=Ky)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Xy){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:U.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wy&&this.setState({status:Yy})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[U.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Vy?this.safeSetState({status:Gy},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Xy},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Gy},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:U.findDOMNode(this);t&&!Vy?(this.props.onExit(r),this.safeSetState({status:Ky},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Wy},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Wy},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:U.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Yy)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=nh(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(Uy.Provider,{value:null},"function"==typeof n?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);function Zy(){}Jy.contextType=Uy,Jy.propTypes={},Jy.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zy,onEntering:Zy,onEntered:Zy,onExit:Zy,onExiting:Zy,onExited:Zy},Jy.UNMOUNTED=Yy,Jy.EXITED=Wy,Jy.ENTERING=Xy,Jy.ENTERED=Gy,Jy.EXITING=Ky;var Qy=Jy;function ev(e,t){var n=Object.create(null);return e&&B.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&F(e)?t(e):e}(e)})),n}function tv(e,t,n){return null!=n[t]?n[t]:e.props[t]}function nv(e,t,n){var r=ev(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(F(a)){var s=o in t,l=o in r,u=t[o],c=F(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&F(u)&&(i[o]=H(a,{onExited:n.bind(null,a),in:u.props.in,exit:tv(a,"exit",e),enter:tv(a,"enter",e)})):i[o]=H(a,{in:!1}):i[o]=H(a,{onExited:n.bind(null,a),in:!0,exit:tv(a,"exit",e),enter:tv(a,"enter",e)})}})),i}var rv=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},iv=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(_h(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}$h(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,ev(n.children,(function(e){return H(e,{onExited:r.bind(null,e),in:!0,appear:tv(e,"appear",n),enter:tv(e,"enter",n),exit:tv(e,"exit",n)})}))):nv(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=ev(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Vm({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=nh(e,["component","childFactory"]),i=this.state.contextValue,o=rv(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?_.createElement(Uy.Provider,{value:i},o):_.createElement(Uy.Provider,{value:i},_.createElement(t,r,o))},t}(_.Component);iv.propTypes={},iv.defaultProps={component:"div",childFactory:function(e){return e}};var ov=iv;function av(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var sv=j.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,m=rh(e,["classes","className","component","square","elevation","variant"]);return j.createElement(o,Vm({className:zg(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},m))})),lv=Ty((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Vm({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(sv),uv="undefined"==typeof window?j.useEffect:j.useLayoutEffect;function cv(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=j.useState(!1),m=d[0],h=d[1],p=zg(t.ripple,t.rippleVisible,r&&t.ripplePulsate),f={width:a,height:a,top:-a/2+o,left:-a/2+i},g=zg(t.child,m&&t.childLeaving,r&&t.childPulsate),y=ky(u);return uv((function(){if(!s){h(!0);var e=setTimeout(y,c);return function(){clearTimeout(e)}}}),[y,s,c]),j.createElement("span",{className:p,style:f},j.createElement("span",{className:g}))}var dv=j.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=rh(e,["center","classes","className"]),s=j.useState([]),l=s[0],u=s[1],c=j.useRef(0),d=j.useRef(null);j.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=j.useRef(!1),h=j.useRef(null),p=j.useRef(null),f=j.useRef(null);j.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=j.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(xh(e),[j.createElement(cv,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),y=j.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var c,d,y,v=u?null:f.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,E=x.clientY;c=Math.round(S-b.left),d=Math.round(E-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var M=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(M,2)+Math.pow(C,2))}e.touches?null===p.current&&(p.current=function(){g({pulsate:o,rippleX:c,rippleY:d,rippleSize:y,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):g({pulsate:o,rippleX:c,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=j.useCallback((function(){y({},{pulsate:!0})}),[y]),b=j.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return j.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),j.createElement("span",Vm({className:zg(i.root,o),ref:f},a),j.createElement(ov,{component:null,exit:!0},l))})),mv=Ty((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(j.memo(dv)),hv=j.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,m=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,f=e.disableTouchRipple,g=void 0!==f&&f,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,x=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,T=e.onKeyUp,O=e.onMouseDown,A=e.onMouseLeave,R=e.onMouseUp,w=e.onTouchEnd,N=e.onTouchMove,I=e.onTouchStart,k=e.onDragLeave,L=e.tabIndex,P=void 0===L?0:L,D=e.TouchRippleProps,q=e.type,z=void 0===q?"button":q,$=rh(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),_=j.useRef(null);var B=j.useRef(null),F=j.useState(!1),H=F[0],U=F[1];m&&H&&U(!1);var Y=Hy(),W=Y.isFocusVisible,X=Y.onBlurVisible,G=Y.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return ky((function(r){return t&&t(r),!n&&B.current&&B.current[e](r),!0}))}j.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),_.current.focus()}}}),[]),j.useEffect((function(){H&&v&&!p&&B.current.pulsate()}),[p,v,H]);var J=K("start",O),Z=K("stop",k),Q=K("stop",R),ee=K("stop",(function(e){H&&e.preventDefault(),A&&A(e)})),te=K("start",I),ne=K("stop",w),re=K("stop",N),ie=K("stop",(function(e){H&&(X(e),U(!1)),x&&x(e)}),!1),oe=ky((function(e){_.current||(_.current=e.currentTarget),W(e)&&(U(!0),M&&M(e)),E&&E(e)})),ae=function(){var e=V.findDOMNode(_.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=j.useRef(!1),le=ky((function(e){v&&!se.current&&H&&B.current&&" "===e.key&&(se.current=!0,e.persist(),B.current.stop(e,(function(){B.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),S&&S(e))})),ue=ky((function(e){v&&" "===e.key&&B.current&&H&&!e.defaultPrevented&&(se.current=!1,e.persist(),B.current.stop(e,(function(){B.current.pulsate(e)}))),T&&T(e),S&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&S(e)})),ce=c;"button"===ce&&$.href&&(ce="a");var de={};"button"===ce?(de.type=z,de.disabled=m):("a"===ce&&$.href||(de.role="button"),de["aria-disabled"]=m);var me=Ly(r,t),he=Ly(G,_),pe=Ly(me,he),fe=j.useState(!1),ge=fe[0],ye=fe[1];j.useEffect((function(){ye(!0)}),[]);var ve=ge&&!p&&!m;return j.createElement(ce,Vm({className:zg(s.root,l,H&&[s.focusVisible,b],m&&s.disabled),onBlur:ie,onClick:S,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:pe,tabIndex:m?-1:P},de,$),a,ve?j.createElement(mv,Vm({ref:B,center:o},D)):null)})),pv=Ty({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(hv),fv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},gv=j.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,m=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,f=e.paragraph,g=void 0!==f&&f,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,x=void 0===b?fv:b,S=rh(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(g?"p":x[v]||fv[v])||"span";return j.createElement(E,Vm({className:zg(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Oy(s))],p&&i.noWrap,m&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Oy(r))],"initial"!==c&&i["display".concat(Oy(c))]),ref:t},S))})),yv=Ty((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(gv),vv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,m=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,f=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,S=e.startIcon,E=e.type,M=void 0===E?"button":E,C=e.variant,T=void 0===C?"text":C,O=rh(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=S&&j.createElement("span",{className:zg(r.startIcon,r["iconSize".concat(Oy(x))])},S),R=f&&j.createElement("span",{className:zg(r.endIcon,r["iconSize".concat(Oy(x))])},f);return j.createElement(pv,Vm({className:zg(r.root,r[T],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Oy(a))],"medium"!==x&&[r["".concat(T,"Size").concat(Oy(x))],r["size".concat(Oy(x))]],m&&r.disableElevation,c&&r.disabled,v&&r.fullWidth),component:l,disabled:c,focusRipple:!p,focusVisibleClassName:zg(r.focusVisible,g),ref:t,type:M},O),j.createElement("span",{className:r.label},A,n,R))})),bv=Ty((function(e){return{root:Vm({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:th(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:th(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:th(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(th(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:th(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(th(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:th(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(vv);var xv="undefined"!=typeof window?j.useLayoutEffect:j.useEffect,Sv=j.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=j.useState(null),l=s[0],u=s[1],c=Ly(j.isValidElement(n)?n.ref:null,t);return xv((function(){o||u(function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(r)||document.body)}),[r,o]),xv((function(){if(l&&!o)return Ny(t,l),function(){Ny(t,null)}}),[t,l,o]),xv((function(){a&&(l||o)&&a()}),[a,l,o]),o?j.isValidElement(n)?j.cloneElement(n,{ref:c}):n:l?V.createPortal(n,l):l})),Ev=Sv;function Mv(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Cv(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Tv(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(xh(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&Mv(e,r)}))}function Ov(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Av(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Ry(e);return t.body===e?wy(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Cv(o)+a,"px"),n=Ry(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Cv(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Rv=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return qh(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Mv(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Tv(t,e.mountNode,e.modalRef,r,!0);var i=Ov(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Ov(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Av(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Ov(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Mv(e.modalRef,!0),Tv(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&Mv(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function wv(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=j.useRef(),m=j.useRef(null),h=j.useRef(null),p=j.useRef(),f=j.useRef(null),g=j.useCallback((function(e){f.current=V.findDOMNode(e)}),[]),y=Ly(t.ref,g),v=j.useRef();return j.useEffect((function(){v.current=c}),[c]),!v.current&&c&&"undefined"!=typeof window&&(p.current=l().activeElement),j.useEffect((function(){if(c){var e=Ry(f.current);r||!f.current||f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex",-1),f.current.focus());var t=function(){null!==f.current&&(e.hasFocus()&&!o&&u()&&!d.current?f.current&&!f.current.contains(e.activeElement)&&f.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===f.current&&(d.current=!0,t.shiftKey?h.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,u,c]),j.createElement(j.Fragment,null,j.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),j.cloneElement(t,{ref:y}),j.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var Nv={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Iv=j.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=rh(e,["invisible","open"]);return i?j.createElement("div",Vm({"aria-hidden":!0,ref:t},o,{style:Vm({},Nv.root,r?Nv.invisible:{},o.style)})):null}));var kv=new Rv,Lv=j.forwardRef((function(e,t){var n=Og(),r=kh({name:"MuiModal",props:Vm({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Iv:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,m=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,f=r.disableEnforceFocus,g=void 0!==f&&f,y=r.disableEscapeKeyDown,v=void 0!==y&&y,b=r.disablePortal,x=void 0!==b&&b,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,T=r.hideBackdrop,O=void 0!==T&&T,A=r.keepMounted,R=void 0!==A&&A,w=r.manager,N=void 0===w?kv:w,I=r.onBackdropClick,k=r.onClose,L=r.onEscapeKeyDown,P=r.onRendered,D=r.open,q=rh(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=j.useState(!0),$=z[0],_=z[1],B=j.useRef({}),F=j.useRef(null),H=j.useRef(null),U=Ly(H,t),Y=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Ry(F.current)},X=function(){return B.current.modalRef=H.current,B.current.mountNode=F.current,B.current},G=function(){N.mount(X(),{disableScrollLock:C}),H.current.scrollTop=0},K=ky((function(){var e=function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(c)||W().body;N.add(X(),e),H.current&&G()})),J=j.useCallback((function(){return N.isTopModal(X())}),[N]),Z=ky((function(e){F.current=e,e&&(P&&P(),D&&J()?G():Mv(H.current,!0))})),Q=j.useCallback((function(){N.remove(X())}),[N]);if(j.useEffect((function(){return function(){Q()}}),[Q]),j.useEffect((function(){D?K():Y&&u||Q()}),[D,Q,Y,u,K]),!R&&!D&&(!Y||$))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Ah}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),Y&&(te.onEnter=Ay((function(){_(!1)}),s.props.onEnter),te.onExited=Ay((function(){_(!0),u&&Q()}),s.props.onExited)),j.createElement(Ev,{ref:Z,container:c,disablePortal:x},j.createElement("div",Vm({ref:U,onKeyDown:function(e){"Escape"===e.key&&J()&&(L&&L(e),v||(e.stopPropagation(),k&&k(e,"escapeKeyDown")))},role:"presentation"},q,{style:Vm({},ee.root,!D&&$?ee.hidden:{},q.style)}),O?null:j.createElement(o,Vm({open:D,onClick:function(e){e.target===e.currentTarget&&(I&&I(e),!p&&k&&k(e,"backdropClick"))}},a)),j.createElement(wv,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:E,getDoc:W,isEnabled:J,open:D},j.cloneElement(s,te))))})),Pv=Lv;function Dv(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var qv={entering:{opacity:1,transform:Dv(1)},entered:{opacity:1,transform:"none"}},zv=j.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,m=e.style,h=e.timeout,p=void 0===h?"auto":h,f=e.TransitionComponent,g=void 0===f?Qy:f,y=rh(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=j.useRef(),b=j.useRef(),x=Og()||My,S=x.unstable_strictMode&&!i,E=j.useRef(null),M=Ly(n.ref,t),C=Ly(S?E:void 0,M),T=function(e){return function(t,n){if(e){var r=Sh(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},O=T(l),A=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=av({style:m,timeout:p},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===p?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),R=T(s),w=T(d),N=T((function(e){var t,n=av({style:m,timeout:p},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===p?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=Dv(.75),u&&u(e)})),I=T(c);return j.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),j.createElement(g,Vm({appear:!0,in:o,nodeRef:S?E:void 0,onEnter:A,onEntered:R,onEntering:O,onExit:N,onExited:I,onExiting:w,addEndListener:function(e,t){var n=S?e:t;"auto"===p&&(v.current=setTimeout(n,b.current||0))},timeout:"auto"===p?null:p},y),(function(e,t){return j.cloneElement(n,Vm({style:Vm({opacity:0,transform:Dv(.75),visibility:"exited"!==e||o?void 0:"hidden"},qv[e],m,n.props.style),ref:C},t))}))}));zv.muiSupportAuto=!0;var $v=zv,_v=j.createContext({}),jv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,m=rh(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=j.useMemo((function(){return{dense:l}}),[l]);return j.createElement(_v.Provider,{value:h},j.createElement(a,Vm({className:zg(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},m),d,n))})),Bv=Ty({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(jv),Fv="undefined"==typeof window?j.useEffect:j.useLayoutEffect,Hv=j.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,m=e.ContainerComponent,h=void 0===m?"li":m,p=e.ContainerProps,f=(p=void 0===p?{}:p).className,g=rh(p,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,x=void 0!==b&&b,S=e.disableGutters,E=void 0!==S&&S,M=e.divider,C=void 0!==M&&M,T=e.focusVisibleClassName,O=e.selected,A=void 0!==O&&O,R=rh(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),w=j.useContext(_v),N={dense:v||w.dense||!1,alignItems:r},I=j.useRef(null);Fv((function(){o&&I.current&&I.current.focus()}),[o]);var k,L,P=j.Children.toArray(l),D=P.length&&(k=P[P.length-1],L=["ListItemSecondaryAction"],j.isValidElement(k)&&-1!==L.indexOf(k.type.muiName)),q=Ly(j.useCallback((function(e){I.current=V.findDOMNode(e)}),[]),t),z=Vm({className:zg(u.root,c,N.dense&&u.dense,!E&&u.gutters,C&&u.divider,x&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,D&&u.secondaryAction,A&&u.selected),disabled:x},R),$=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=zg(u.focusVisible,T),$=pv),D?($=z.component||d?$:"div","li"===h&&("li"===$?$="div":"li"===z.component&&(z.component="div")),j.createElement(_v.Provider,{value:N},j.createElement(h,Vm({className:zg(u.container,f),ref:q},g),j.createElement($,z,P),P.pop()))):j.createElement(_v.Provider,{value:N},j.createElement($,Vm({ref:q},z),P))})),Vv=Ty((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(Hv),Uv=j.forwardRef((function(e,t){var n=e.classes,r=e.className,i=rh(e,["classes","className"]),o=j.useContext(_v);return j.createElement("div",Vm({className:zg(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),Yv=Ty((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(Uv),Wv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,m=e.secondaryTypographyProps,h=rh(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=j.useContext(_v).dense,f=null!=u?u:n;null==f||f.type===yv||a||(f=j.createElement(yv,Vm({variant:p?"body2":"body1",className:r.primary,component:"span",display:"block"},c),f));var g=d;return null==g||g.type===yv||a||(g=j.createElement(yv,Vm({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},m),g)),j.createElement("div",Vm({className:zg(r.root,i,p&&r.dense,l&&r.inset,f&&g&&r.multiline),ref:t},h),f,g)})),Xv=Ty({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Wv);function Gv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Kv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Jv(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Zv(e){return"function"==typeof e?e():e}var Qv=j.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,m=e.container,h=e.elevation,p=void 0===h?8:h,f=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,T=e.PaperProps,O=void 0===T?{}:T,A=e.transformOrigin,R=void 0===A?{vertical:"top",horizontal:"left"}:A,w=e.TransitionComponent,N=void 0===w?$v:w,I=e.transitionDuration,k=void 0===I?"auto":I,L=e.TransitionProps,P=void 0===L?{}:L,D=rh(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),q=j.useRef(),z=j.useCallback((function(e){if("anchorPosition"===l)return a;var t=Zv(r),n=(t&&1===t.nodeType?t:Ry(q.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+Gv(n,i),left:n.left+Kv(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),$=j.useCallback((function(e){var t=0;if(f&&"anchorEl"===l){var n=f(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,f]),_=j.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Gv(e,R.vertical)+t,horizontal:Kv(e,R.horizontal)}}),[R.horizontal,R.vertical]),B=j.useCallback((function(e){var t=$(e),n={width:e.offsetWidth,height:e.offsetHeight},i=_(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Jv(i)};var o=z(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=wy(Zv(r)),m=d.innerHeight-y,h=d.innerWidth-y;if(a<y){var p=a-y;a-=p,i.vertical+=p}else if(u>m){var f=u-m;a-=f,i.vertical+=f}if(s<y){var g=s-y;s-=g,i.horizontal+=g}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Jv(i)}}),[r,l,z,$,_,y]),F=j.useCallback((function(){var e=q.current;if(e){var t=B(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[B]),H=j.useCallback((function(e){q.current=V.findDOMNode(e)}),[]);j.useEffect((function(){C&&F()})),j.useImperativeHandle(n,(function(){return C?{updatePosition:function(){F()}}:null}),[C,F]),j.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){F()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,F]);var U=k;"auto"!==k||N.muiSupportAuto||(U=void 0);var Y=m||(r?Ry(Zv(r)).body:void 0);return j.createElement(Pv,Vm({container:Y,open:C,ref:t,BackdropProps:{invisible:!0},className:zg(c.root,d)},D),j.createElement(N,Vm({appear:!0,in:C,onEnter:v,onEntered:b,onExit:S,onExited:E,onExiting:M,timeout:U},P,{onEntering:Ay((function(e,t){x&&x(e,t),F()}),P.onEntering)}),j.createElement(lv,Vm({elevation:p,ref:H},O,{className:zg(c.paper,O.className)}),u)))})),eb=Ty({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Qv);function tb(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function nb({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:tb(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return _.createElement("i",{style:i},_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},_.createElement("path",{d:e})))}const rb={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"},ib={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"},ob={d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"},ab={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"},sb={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 lb(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=Qo.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 ub(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),u=ie(!0,{},a),c=u.qHyperCubeDef[r][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],o||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[r][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=c,i&&i({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),lb(e,a,u)}))}const cb=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function db({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=cb(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).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 i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return e},changeTo(e,t){ub(r,e,t,"qDimensions",a)}}}function mb(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:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function hb({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=cb(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return n},changeTo(e,t){ub(i,e,t,"qMeasures",o,a)}}}function pb(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const fb={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"}}},gb={menuItem:"alternative-menu-item",titleButton:"title-button",activeTitleButton:"active-title-button"},yb=Cy(Vv)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),vb=Cy((({children:e,...t})=>_.createElement(bv,Im({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}})));function bb(e){const t=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${gb.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function n({title:e,selected:n,onClick:r}){const i=Ae.detectTextDirection(e);return _.createElement(yb,{role:"menuitem",button:!0,onClick:r,className:gb.menuItem,onKeyDown:t},_.createElement(Yv,{style:{minWidth:32}},_.createElement(nb,{d:n?ob.d:""})),_.createElement(Xv,{primaryTypographyProps:{dir:i}},e))}function r({alignTo:e,changeTo:t,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:u}){const c=a.map((e=>_.createElement(n,{key:e.id,title:e.title,onClick:()=>t(e.id)})));return _.createElement(eb,Im({anchorEl:e,open:l,onClose:s},fb[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),_.createElement(Bv,{dense:!0,dir:i,"aria-label":u,component:"nav"},_.createElement(n,{title:r,selected:!0,onClick:s}),c))}n.propTypes={title:Dm.string.isRequired,selected:Dm.bool,onClick:Dm.func.isRequired},n.defaultProps={selected:!1},r.propTypes={alignTo:Dm.any,changeTo:Dm.func.isRequired,current:Dm.string.isRequired,dir:Dm.string.isRequired,dock:Dm.string.isRequired,list:Dm.array,onClose:Dm.func.isRequired,show:Dm.bool.isRequired,instruction:Dm.string.isRequired},r.defaultProps={list:[],alignTo:null};class i extends _.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=_.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getAlternatives().then((e=>{this.setState({hasValidAlternatives:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}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.id,e),this.closePopover(e)}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${gb.titleButton}`);t&&t.classList.add(gb.activeTitleButton)}this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e});document.querySelector(`.${gb.menuItem}`).focus()}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${gb.titleButton}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${gb.activeTitleButton}`);e&&(e.classList.remove(gb.activeTitleButton),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,m=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>_.createElement(vb,{style:{display:"flex",alignItems:"center",color:m&&"rgba(89, 89, 89, 0.8)",pointerEvents:m?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>m?void 0:e.drillUp(d-n),title:t},_.createElement("span",{style:c},t),_.createElement(nb,Im({},sb,{size:"small",style:{margin:"0 8px"}}))))),p=u?this.state.hasValidAlternatives:l,f=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Ae.detectTextDirection(e.text),b=_.createElement(vb,{"aria-label":n.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:f,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${gb.titleButton} ${e.id}`,"data-id":e.id},e.locked&&_.createElement(nb,Im({},ib,{size:"small",title:n.get("Tooltip.selections.locked")})),_.createElement("span",{style:c,dir:v},e.text),t&&p&&_.createElement(nb,Im({},ab,{size:"small",style:{margin:"0 8px"}})));return _.createElement(_.Fragment,null,e.drilldown&&_.createElement(nb,Im({},rb,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),h,_.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:p?"auto":"none",height:"100%"}},b),t&&p&&_.createElement(r,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions")}))}}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&fe.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return i.propTypes={disabled:Dm.bool.isRequired,padding:Dm.string,minWidth:Dm.string,titleData:Dm.shape({breadcrumbs:Dm.arrayOf(Dm.string).isRequired,drilldown:Dm.bool.isRequired,index:Dm.number.isRequired,locked:Dm.bool.isRequired,text:Dm.string.isRequired,popoverText:Dm.string.isRequired,drillUp:Dm.func,id:Dm.string.isRequired}).isRequired,popover:Dm.shape({dir:Dm.string.isRequired,dock:Dm.string.isRequired,changeTo:Dm.func.isRequired,getAlternatives:Dm.func.isRequired}),translator:Dm.shape({get:Dm.func.isRequired}).isRequired,selections:Dm.shape({isActive:Dm.func,addListener:Dm.func,removeListener:Dm.func}),style:Dm.shape({fontSize:Dm.string,color:Dm.string,fontFamily:Dm.string}).isRequired,isDimension:Dm.bool.isRequired,hasAlternative:Dm.bool.isRequired,supportConditional:Dm.bool.isRequired},i.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:r,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:m,rtl:h,selections:p,skipAttributeExpressions:f,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!h?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),S=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,E=S&&S[l?"qDimensions":"qMeasures"]||[],M=n||r[l?"qDimensionInfo":"qMeasureInfo"],C=l?db:hb,T=l?mb:pb,O=c&&c.colorSupport&&c.modifiers&&C({altList:E,app:e,dir:h?"rtl":"ltr",dock:o(v),model:c,onChange:d,skipAttributeExpressions:f,translator:g}),A=(R=this.settings.settings).isDimension&&fe.getValue(R,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||a(this.settings.settings);var R;const w=M.map(((e,n)=>{const r="number"==typeof e.explicitColumn?e.explicitColumn:n,o=T(e,r,c),a=n===M.length-1;return _.createElement(_.Fragment,{key:e.cId},_.createElement(i,{popover:O,titleData:o,model:c,translator:g,selections:p,disabled:t(),style:this.style,isDimension:l,padding:m,minWidth:u,hasAlternative:A,supportConditional:y}),!a&&_.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return _.createElement("div",{style:x,dir:b},w)}}}const xb=function(){return Rh.apply(void 0,arguments)}({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:'"Source Sans Pro", "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 Sb=Ih({productionPrefix:"q1a48",disableGlobal:!0,seed:""});function Eb(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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",U.render(function(e,t){return _.createElement(Ig,{generateClassName:t},_.createElement(Sy,{theme:xb},e))}(e,Sb),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&U.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(U.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function Mb(){return function(e){e.renderer("react",Eb()),e.component("data-title",bb(e.renderer("svg")())),e.component("disclaimer",function(){class e extends _.Component{render(){const{label:e,spanStyle:t}=this.props;return _.createElement(_.Fragment,null,_.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:Dm.string.isRequired,spanStyle:Dm.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=`${n.height}px`,r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${n.height}px`,r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${n.width}px`,r.height=`${n.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:`* ${t}`,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return _.createElement("div",{style:a,dir:o},_.createElement(_.Fragment,null,_.createElement(e,{label:s,spanStyle:l})))}}}())}}function Cb(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:Cb(i,t,n)},i}function Tb(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),Cb(i,a,l,e.invert)}))}const Ob={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(ie({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Ab({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=ie({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const m=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),p=(c-h)/2,f=p+d.major+h/2;return{item:d,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function Rb({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=ie(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:u});return p}const wb=["oob"];const Nb={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Rb({keys:wb,data:i,defaultSettings:{oob:Ob.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Ab}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=u[c].data,g=[];if(d.oob.show){g.push(Ob.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:wb,symbol:s,dockValue:n});return d}},Ib={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},kb=["hat"];function Lb(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 Pb({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const h=ie({},e.hat,{type:"path",d:Lb(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,ie({},e.hat,{type:"path",d:Lb(m)})]}const Db={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Rb({keys:kb,data:r,defaultSettings:Ib,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Ab}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];u.hat.show&&f.push(...Pb({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:kb});return u}};var qb={UNCLASSIFIED:"unclassified",EQUAL_EQUAL:"equal-equal",EQUAL_HIGHER:"equal-higher",EQUAL_LOWER:"equal-lower",EQUAL_VOID:"equal-void",HIGHER_EQUAL:"higher-equal",HIGHER_HIGHER_ACUTE:"higher-higher-acute",HIGHER_HIGHER_OBTUSE:"higher-higher-obtuse",HIGHER_LOWER_NEGATIVE:"higher-lower-negative",HIGHER_LOWER_POSITIVE:"higher-lower-positive",HIGHER_VOID:"higher-void",LOWER_EQUAL:"lower-equal",LOWER_HIGHER_NEGATIVE:"lower-higher-negative",LOWER_HIGHER_POSITIVE:"lower-higher-positive",LOWER_LOWER_ACUTE:"lower-lower-acute",LOWER_LOWER_OBTUSE:"lower-lower-obtuse",LOWER_VOID:"lower-void",VOID_EQUAL:"void-equal",VOID_HIGHER:"void-higher",VOID_LOWER:"void-lower",VOID_VOID:"void-void"};function zb(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function $b(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function _b({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?qb.EQUAL_EQUAL:i<o?qb.EQUAL_HIGHER:qb.EQUAL_LOWER:i===o?r>i?qb.HIGHER_EQUAL:qb.LOWER_EQUAL:r>i?i<o?$b(e,t,n)>90?qb.HIGHER_HIGHER_OBTUSE:qb.HIGHER_HIGHER_ACUTE:zb(e,t)>zb(e,n)?qb.HIGHER_LOWER_POSITIVE:qb.HIGHER_LOWER_NEGATIVE:i>o?$b(e,t,n)>90?qb.LOWER_LOWER_OBTUSE:qb.LOWER_LOWER_ACUTE:zb(e,t)>zb(e,n)?qb.LOWER_HIGHER_POSITIVE:qb.LOWER_HIGHER_NEGATIVE:r===i?qb.EQUAL_VOID:r>i?qb.HIGHER_VOID:qb.LOWER_VOID:i===o?qb.VOID_EQUAL:i<o?qb.VOID_HIGHER:qb.VOID_LOWER:qb.VOID_VOID}function jb({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}const Bb={X:1,Y:0};function Fb({node:e,line:t,groupIndex:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const m=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:h}=e,{"stroke-width":p}=e.attrs,f=r.pointValue(e.data),g={x:h.x+h.width/2,y:h.y+h.height/2,width:m.width+2*Bb.X,height:m.height+2*Bb.Y},y=`${g.x}-${g.y}`,v=!s&&!l,b=s?a.height:a.width,x=(s?g.y:g.x)/b,S=(v?1-x:x)<=(b<=200?.25:.1),E={key:y,node:e,line:t,group:n,value:f,labelMeasurements:m,bounds:g,inside:jb({bounds:h,size:a}),border:p?p/2:0,classification:qb.UNCLASSIFIED,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:u.getExtreme(y),elite:S,show:c(e)};return E}function Hb({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e}),u=function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:Fb({node:e.node,line:e.line,groupIndex:u,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{})));return u.filter((e=>Object.keys(e).length))}var Vb={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Ub={[qb.EQUAL_EQUAL]:[Vb.TOP,Vb.BOTTOM],[qb.EQUAL_HIGHER]:[Vb.BOTTOM,Vb.BOTTOM_RIGHT],[qb.EQUAL_LOWER]:[Vb.TOP,Vb.TOP_RIGHT],[qb.EQUAL_VOID]:[Vb.TOP,Vb.BOTTOM],[qb.HIGHER_EQUAL]:[Vb.LEFT,Vb.BOTTOM_LEFT,Vb.TOP,Vb.TOP_RIGHT],[qb.HIGHER_HIGHER_ACUTE]:[Vb.BOTTOM,Vb.BOTTOM_LEFT,Vb.LEFT,Vb.TOP_RIGHT],[qb.HIGHER_HIGHER_OBTUSE]:[Vb.BOTTOM,Vb.TOP],[qb.HIGHER_LOWER_NEGATIVE]:[Vb.TOP,Vb.TOP_RIGHT,Vb.RIGHT],[qb.HIGHER_LOWER_POSITIVE]:[Vb.BOTTOM,Vb.BOTTOM_LEFT,Vb.LEFT],[qb.HIGHER_VOID]:[Vb.TOP],[qb.LOWER_EQUAL]:[Vb.TOP],[qb.LOWER_HIGHER_NEGATIVE]:[Vb.TOP,Vb.TOP_LEFT],[qb.LOWER_HIGHER_POSITIVE]:[Vb.BOTTOM_RIGHT],[qb.LOWER_LOWER_ACUTE]:[Vb.TOP,Vb.TOP_LEFT,Vb.LEFT,Vb.TOP_RIGHT,Vb.RIGHT],[qb.LOWER_LOWER_OBTUSE]:[Vb.TOP,Vb.BOTTOM],[qb.LOWER_VOID]:[Vb.TOP],[qb.VOID_EQUAL]:[Vb.TOP],[qb.VOID_HIGHER]:[Vb.TOP,Vb.BOTTOM],[qb.VOID_LOWER]:[Vb.TOP,Vb.BOTTOM,Vb.LEFT],[qb.VOID_VOID]:[Vb.TOP]};function Yb({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=Hb({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:i}=n;r[i]||(r[i]=[]),r[i].push(n.bounds)}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),m={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r],o=_b({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),m.getItems().forEach((e=>e.setPreferences(Ub[e.classification]))),m}function Wb({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function Xb({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function Gb({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return Xb({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Xb({line1:e,line2:a})||Xb({line1:e,line2:s})||Xb({line1:e,line2:l})}({line:t,rect:e})))}const Kb={x:0,width:0,y:0,height:0};const Jb=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Zb=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Qb=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),ex=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),tx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),nx=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),rx=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),ix=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var ox={X:2.5,Y:4};const ax=[Vb.TOP,Vb.TOP_LEFT,Vb.TOP_RIGHT],sx=[Vb.BOTTOM,Vb.BOTTOM_LEFT,Vb.BOTTOM_RIGHT];function lx({position:e}){const t={x:ox.X,width:-2*ox.X,y:0,height:0},n=ax.indexOf(e)>-1,r=sx.indexOf(e)>-1;return n&&(t.y=ox.Y,t.height=-ox.Y),r&&(t.height=-ox.Y),t}function ux({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function cx({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}const dx=15;function mx({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=dx){const a=cx({coordinates:ux({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=dx){const a=cx({coordinates:ux({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const hx=void 0;function px({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Vb).map((e=>Vb[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[Vb.TOP]:Jb,[Vb.TOP_RIGHT]:Zb,[Vb.RIGHT]:Qb,[Vb.BOTTOM_RIGHT]:ex,[Vb.BOTTOM]:tx,[Vb.BOTTOM_LEFT]:nx,[Vb.LEFT]:rx,[Vb.TOP_LEFT]:ix},o=[];for(let a=0;a<r.length;a++){const s=r[a],l=i[s]({item:e}),u=lx({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:n});if(n&&c.inside&&o.push(l),c.valid)return l}const a=()=>mx({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||hx)}return(e.extreme||e.elite)&&a()||hx}function fx({model:e,size:t,all:n}){const r={},i=e.getItems(),o=[...i.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const u=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=Kb,ignoreLines:a=!1}){const s={inside:Wb({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=Gb({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=px({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):n&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:n}=e,r=px({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,o.push(r),t.setPlacement(r))}))}var gx={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge",labelSpace:{use:()=>!1,size:10}},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:i,size:o}=r;if(i()){const r="horizontal"===t;e.edgeBleed.top=r?o:0,e.edgeBleed[n?"left":"right"]=r?0:o}return e},render(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,i=r.length?e=>r.includes(e.key):e=>e.key===t.point,o=this.chart.findShapes("circle").filter(i);if(!o.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";o.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:u,width:c,edgeBleed:d}=this.rect,m={height:u,width:c,edgeBleed:d,insideStrategy:e.insideStrategy},{style:h}=this,p=Yb({nodes:o,extract:l,style:h,measureText:this.renderer.measureText,size:m,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:p}),fx({model:p,size:m,all:e.all}),p.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:h.fontSize,fontFamily:h.fontFamily,fill:h.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},yx={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var vx={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,m=l.length&&void 0!==c;if(!d&&!m)return[];const h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))}));const l=(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])});return l}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!f.length)return[];const g="horizontal"===n,y=this.rect[g?"width":"height"],v=this.resolver.resolve({data:{items:f},settings:{major:a},scaled:{major:y}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=o/2*i,{fill:S}=this.settings.style,E=v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:S,startAngle:b,x:g?y*e.major:x,y:g?x:y*e.major,data:e.data})));return E}};function bx({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function xx({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))],i=e.findShapes("path").filter((e=>r.some((t=>t===e.key))));return i.reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function Sx({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Ex({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(os.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function Mx({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&c&&(m=[e=>e.color.value]),!m.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?Sx:Ex)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(m.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function Cx({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(os.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Tx({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(os.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Ox({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=r[e];if("gradient"!==m.type)return m;const{type:h,nil:p}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(os.SCALE.MAJOR),d=e.scale(os.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),f=p.map((e=>m(e.major.value))),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,b=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v)),x=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:m,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?Cx:Tx)({chart:t,selected:a,connection:n,gradient:m,fallback:p})}function Ax({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:h}){const p=t.getLine(l,u),{attrs:f}=p,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:m}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:Ox({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:g,attrs:f,rtl:m,count:h})))}function Rx({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:h}){const p=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:p,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const p=Mx({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.length<2)return n;const f=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:p});return f.length?(n.lines.push(...Ax({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:p,connections:f,rtl:h,count:o.items.length})),n):n}),{lines:[]}),y=[];return g.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var wx={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:xx({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=Rx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=xx({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Rx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const Nx=()=>{const e=z();return e.use($),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Nm(e))};e.interaction("hammer",Nm(Hammer))}(q)),e.use(Tb),e.use(Mb()),e.component("scrollbar",pl),e.component("point-label",gx),e.component("label-space",yx),e.component("time-axis",nm.picassoComponents.timeAxis),e.component("axis-overlay",nm.picassoComponents.axisOverlay),e.component("reference-line-labels",Va),e.component("box-sliced-hat",Db),e.component("box-out-of-bounds",Nb),e.component("data-out-of-bounds-marker",vx),e.component("scroll-hint",Yo),e.component("brush-highlighter",wx),e.scale("time",nm.picassoScales.time),e.symbol("line-point",bx),e};const Ix={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},kx=e=>void 0===e.marker?Ix.circle:Ix[e.marker],Lx=e=>void 0===e.markerFill||e.markerFill;function Px({series:e,layoutService:t}){switch(Sc(e)){case as.TYPE.MARKER:return(e=>({marker:kx(e),fill:Lx(e)}))(e);case as.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case as.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function Dx(e=as.NOPE_SERIES,t){return t?e.axis===as.AXIS.PRIMARY:e.axis===as.AXIS.PRIMARY||Sc(e)===as.TYPE.BAR}var qx={exports:{}};var zx={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const $x="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var _x=$x;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=zx,r=_x,i=(t=e.exports={}).re=[],o=t.safeRe=[],a=t.src=[],s=t.t={};let l=0;const u=(e,t,n)=>{const u=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),c=l++;r(e,c,t),s[e]=c,a[c]=t,i[c]=new RegExp(t,n?"g":void 0),o[c]=new RegExp(u,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),u("FULL",`^${a[s.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),u("LOOSE",`^${a[s.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),u("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),u("COERCERTL",a[s.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(qx,qx.exports);var jx=qx.exports;const Bx=Object.freeze({loose:!0}),Fx=Object.freeze({});var Hx=e=>e?"object"!=typeof e?Bx:e:Fx;const Vx=/^[0-9]+$/,Ux=(e,t)=>{const n=Vx.test(e),r=Vx.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var Yx={compareIdentifiers:Ux,rcompareIdentifiers:(e,t)=>Ux(t,e)};const Wx=_x,{MAX_LENGTH:Xx,MAX_SAFE_INTEGER:Gx}=zx,{safeRe:Kx,t:Jx}=jx,Zx=Hx,{compareIdentifiers:Qx}=Yx;var eS=class e{constructor(t,n){if(n=Zx(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Xx)throw new TypeError(`version is longer than ${Xx} characters`);Wx("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?Kx[Jx.LOOSE]:Kx[Jx.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Gx||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Gx||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Gx||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Gx)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Wx("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Qx(this.major,t.major)||Qx(this.minor,t.minor)||Qx(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(Wx("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return Qx(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(Wx("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return Qx(e,r)}while(++n)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===Qx(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const tS=eS;var nS=(e,t,n=!1)=>{if(e instanceof tS)return e;try{return new tS(e,t)}catch(e){if(!n)return null;throw e}};const rS=nS;var iS=(e,t)=>{const n=rS(e,t);return n?n.version:null};const oS=nS;var aS=(e,t)=>{const n=oS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const sS=eS;var lS=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new sS(e instanceof sS?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const uS=nS;var cS=(e,t)=>{const n=uS(e,null,!0),r=uS(t,null,!0),i=n.compare(r);if(0===i)return null;const o=i>0,a=o?n:r,s=o?r:n,l=!!a.prerelease.length;if(!!s.prerelease.length&&!l)return s.patch||s.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};const dS=eS;var mS=(e,t)=>new dS(e,t).major;const hS=eS;var pS=(e,t)=>new hS(e,t).minor;const fS=eS;var gS=(e,t)=>new fS(e,t).patch;const yS=nS;var vS=(e,t)=>{const n=yS(e,t);return n&&n.prerelease.length?n.prerelease:null};const bS=eS;var xS=(e,t,n)=>new bS(e,n).compare(new bS(t,n));const SS=xS;var ES=(e,t,n)=>SS(t,e,n);const MS=xS;var CS=(e,t)=>MS(e,t,!0);const TS=eS;var OS=(e,t,n)=>{const r=new TS(e,n),i=new TS(t,n);return r.compare(i)||r.compareBuild(i)};const AS=OS;var RS=(e,t)=>e.sort(((e,n)=>AS(e,n,t)));const wS=OS;var NS=(e,t)=>e.sort(((e,n)=>wS(n,e,t)));const IS=xS;var kS=(e,t,n)=>IS(e,t,n)>0;const LS=xS;var PS=(e,t,n)=>LS(e,t,n)<0;const DS=xS;var qS=(e,t,n)=>0===DS(e,t,n);const zS=xS;var $S=(e,t,n)=>0!==zS(e,t,n);const _S=xS;var jS=(e,t,n)=>_S(e,t,n)>=0;const BS=xS;var FS=(e,t,n)=>BS(e,t,n)<=0;const HS=qS,VS=$S,US=kS,YS=jS,WS=PS,XS=FS;var GS=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return HS(e,n,r);case"!=":return VS(e,n,r);case">":return US(e,n,r);case">=":return YS(e,n,r);case"<":return WS(e,n,r);case"<=":return XS(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const KS=eS,JS=nS,{safeRe:ZS,t:QS}=jx;var eE,tE,nE,rE,iE,oE,aE,sE,lE,uE,cE=(e,t)=>{if(e instanceof KS)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=ZS[QS.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),ZS[QS.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;ZS[QS.COERCERTL].lastIndex=-1}else n=e.match(ZS[QS.COERCE]);return null===n?null:JS(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function dE(){if(rE)return nE;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new i(n,null,t,e):new i(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new i(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new i(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function i(e,t,n,r){if(!(this instanceof i))return new i(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}rE=1,nE=e,e.Node=i,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,i=this.head;null!==i;)r.push(t.call(n,i.value,this)),i=i.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,i=this.tail;null!==i;)r.push(t.call(n,i.value,this)),i=i.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&i<t;i++)o=o.next;for(;null!==o&&i<n;i++,o=o.next)r.push(o.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)r.push(o.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;var a=[];for(i=0;o&&i<n;i++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(i=0;i<r.length;i++)o=t(this,o,r[i]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(tE?eE:(tE=1,eE=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return nE}function mE(){if(sE)return aE;sE=1;class e{constructor(t,n){if(n=r(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof i)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,A(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),o("comparator trim",e);let g=(e=(e=e.replace(s[l.TILDETRIM],c)).replace(s[l.CARETTRIM],d)).split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options)));a&&(g=g.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),o("range list",g);const v=new Map,b=g.map((e=>new i(e,this.options)));for(const e of b){if(p(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return n.set(t,x),x}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>g(e,n)&&t.set.some((t=>g(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}aE=e;const t=function(){if(oE)return iE;oE=1;const e=dE(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),i=Symbol("allowStale"),o=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),u=Symbol("cache"),c=Symbol("updateAgeOnGet"),d=()=>1,m=(e,t,n)=>{const r=e[u].get(t);if(r){const t=r.value;if(h(e,t)){if(f(e,r),!e[i])return}else n&&(e[c]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},h=(e,t)=>{if(!t||!t.maxAge&&!e[o])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[o]&&n>e[o]},p=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;f(e,r),r=t}},f=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[u].delete(r.key),e[l].removeNode(t)}};class g{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const y=(e,t,n,r)=>{let o=n.value;h(e,o)&&(f(e,n),e[i]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};return iE=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[i]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[c]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,p(this)}get max(){return this[t]}set allowStale(e){this[i]=!!e}get allowStale(){return this[i]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[o]=e,p(this)}get maxAge(){return this[o]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),p(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[u]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!h(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,i,c){if((c=c||this[o])&&"number"!=typeof c)throw new TypeError("maxAge must be a number");const d=c?Date.now():0,m=this[r](i,e);if(this[u].has(e)){if(m>this[t])return f(this,this[u].get(e)),!1;const r=this[u].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=c,r.value=i,this[n]+=m-r.length,r.length=m,this.get(e),p(this),!0}const h=new g(e,i,m,d,c);return h.length>this[t]?(this[a]&&this[a](e,i),!1):(this[n]+=h.length,this[l].unshift(h),this[u].set(e,this[l].head),p(this),!0)}has(e){if(!this[u].has(e))return!1;const t=this[u].get(e).value;return!h(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[l].tail;return e?(f(this,e),e.value):null}del(e){f(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[u].forEach(((e,t)=>m(this,t,!1)))}},iE}(),n=new t({max:1e3}),r=Hx,i=hE(),o=_x,a=eS,{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=jx,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=zx,p=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(o("comp",e,t),e=S(e,t),o("caret",e),e=b(e,t),o("tildes",e),e=M(e,t),o("xrange",e),e=T(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},M=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const u=v(i),c=u||v(a),d=c||v(s),m=d;return"="===r&&m&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&m?(c&&(a=0),s=0,">"===r?(r=">=",c?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},T=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),O=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=e=>(t,n,r,i,o,a,s,l,u,c,d,m,h)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(u)?"":v(c)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return aE}function hE(){if(uE)return lE;uE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}lE=t;const n=Hx,{safeRe:r,t:i}=jx,o=GS,a=_x,s=eS,l=mE();return lE}const pE=mE();var fE=(e,t,n)=>{try{t=new pE(t,n)}catch(e){return!1}return t.test(e)};const gE=mE();var yE=(e,t)=>new gE(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const vE=eS,bE=mE();var xE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new bE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new vE(r,n)))})),r};const SE=eS,EE=mE();var ME=(e,t,n)=>{let r=null,i=null,o=null;try{o=new EE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new SE(r,n)))})),r};const CE=eS,TE=mE(),OE=kS;var AE=(e,t)=>{e=new TE(e,t);let n=new CE("0.0.0");if(e.test(n))return n;if(n=new CE("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new CE(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!OE(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!OE(n,i)||(n=i)}return n&&e.test(n)?n:null};const RE=mE();var wE=(e,t)=>{try{return new RE(e,t).range||"*"}catch(e){return null}};const NE=eS,IE=hE(),{ANY:kE}=IE,LE=mE(),PE=fE,DE=kS,qE=PS,zE=FS,$E=jS;var _E=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new NE(e,r),t=new LE(t,r),n){case">":i=DE,o=zE,a=qE,s=">",l=">=";break;case"<":i=qE,o=$E,a=DE,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(PE(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===kE&&(e=new IE(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const jE=_E;var BE=(e,t,n)=>jE(e,t,">",n);const FE=_E;var HE=(e,t,n)=>FE(e,t,"<",n);const VE=mE();var UE=(e,t,n)=>(e=new VE(e,n),t=new VE(t,n),e.intersects(t,n));const YE=fE,WE=xS;const XE=mE(),GE=hE(),{ANY:KE}=GE,JE=fE,ZE=xS,QE=[new GE(">=0.0.0-0")],eM=[new GE(">=0.0.0")],tM=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===KE){if(1===t.length&&t[0].semver===KE)return!0;e=n.includePrerelease?QE:eM}if(1===t.length&&t[0].semver===KE){if(n.includePrerelease)return!0;t=eM}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=nM(i,t,n):"<"===t.operator||"<="===t.operator?o=rM(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=ZE(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!JE(e,String(i),n))return null;if(o&&!JE(e,String(o),n))return null;for(const r of t)if(!JE(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=nM(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!JE(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=rM(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!JE(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!m&&!d))},nM=(e,t,n)=>{if(!e)return t;const r=ZE(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},rM=(e,t,n)=>{if(!e)return t;const r=ZE(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var iM=(e,t,n={})=>{if(e===t)return!0;e=new XE(e,n),t=new XE(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=tM(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const oM=jx,aM=zx,sM=eS,lM=Yx,uM=(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>WE(e,t,n)));for(const e of a){YE(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t};var cM=X({parse:nS,valid:iS,clean:aS,inc:lS,diff:cS,major:mS,minor:pS,patch:gS,prerelease:vS,compare:xS,rcompare:ES,compareLoose:CS,compareBuild:OS,sort:RS,rsort:NS,gt:kS,lt:PS,eq:qS,neq:$S,gte:jS,lte:FS,cmp:GS,coerce:cE,Comparator:hE(),Range:mE(),satisfies:fE,toComparators:yE,maxSatisfying:xE,minSatisfying:ME,minVersion:AE,validRange:wE,outside:_E,gtr:BE,ltr:HE,intersects:UE,simplifyRange:uM,subset:iM,SemVer:sM,re:oM.re,src:oM.src,tokens:oM.t,SEMVER_SPEC_VERSION:aM.SEMVER_SPEC_VERSION,RELEASE_TYPES:aM.RELEASE_TYPES,compareIdentifiers:lM.compareIdentifiers,rcompareIdentifiers:lM.rcompareIdentifiers}),dM={BAR_IN_SECONDARY_AXIS:"0.23.1"};const mM=e=>!e||cM.lt(cM.coerce(e),cM.coerce(dM.BAR_IN_SECONDARY_AXIS)),hM=({layoutService:e})=>{const t=!mM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[as.TYPE.BAR]:0,[as.TYPE.LINE]:0,[as.TYPE.MARKER]:0};return({series:r=as.NOPE_SERIES},i)=>{const o=Dx(r,t),a=Sc(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?os.SCALE.MINOR.PRIMARY:os.SCALE.MINOR.SECONDARY,collection:o?os.COLLECTION.PRIMARY:os.COLLECTION.SECONDARY,options:Px({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>Sc(e)===t)).length,i=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!i.length&&i[0],!!o.length&&o[0]].filter((e=>!!e)),s=r(n,as.TYPE.BAR),l=r(i,as.TYPE.BAR),u=r(o,as.TYPE.BAR),c=e=>n.filter((t=>Sc(t)===e)),d=c(as.TYPE.LINE).map((e=>Hl(os.COMPONENT.POINT,e))),m=c(as.TYPE.MARKER).map((e=>({key:Hl(os.COMPONENT.MARKER,e),type:e.options.marker}))),h=m.map((e=>e.key)),p=[];l>0&&p.push(`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`),u>0&&p.push(`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`);const f=[...p,...d,...h],{MINI_CHART:g}=os.COMPONENT,y=c(as.TYPE.LINE).map((e=>Hl(g.LINE,e))),v=c(as.TYPE.MARKER).map((e=>Hl(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${as.AXIS.PRIMARY}`,`${g.BAR}-${as.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:b,markers:m},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:c,isPrimary:Dx}}};function pM({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function fM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Se).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=o?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:pM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function gM({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):fM({genericObjectModel:e,layoutService:t})}const yM=e=>"number"==typeof e&&!Number.isNaN(e);function vM({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>Sc(e.series)===as.TYPE.BAR)),a=i.filter((e=>Sc(e.series)===as.TYPE.LINE)),s=i.filter((e=>Sc(e.series)===as.TYPE.MARKER));return{min:Math.min(...i.filter((e=>yM(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>yM(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>yM(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>yM(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>yM(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>yM(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>yM(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>yM(e.qMax))).map((e=>e.qMax)))}}}}function bM({isPrimary:e,layoutService:t,seriesModel:n}){const r=vM({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(as.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function xM({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,i=n.query.series(as.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!r||i<2?vM({isPrimary:e,layoutService:t,seriesModel:n}):bM({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Sc(e)===as.TYPE.BAR)),d=Number((c?Math.min(n,0):n).toFixed(13)),m=Number((c?Math.max(r,0):r).toFixed(13)),h=Number((c?Math.min(s.min,0):s.min).toFixed(13)),p=Number((c?Math.max(s.max,0):s.max).toFixed(13)),f=Number((c?Math.min(l.min,0):l.min).toFixed(13)),g=Number((c?Math.max(l.max,0):l.max).toFixed(13)),y=Number((c?Math.min(u.min,0):u.min).toFixed(13)),v=Number((c?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p:0,o.implicit.line.min=Number.isFinite(f)?f:0,o.implicit.line.max=Number.isFinite(g)?g:0,o.implicit.marker.min=Number.isFinite(y)?y:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}const SM=.2;function EM({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function MM({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=kr().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=r.domain();return 0!==e&&0!==a&&(o.start=r(e)>n),0!==t&&0!==s&&(o.stop=r(t)<1-n),o}({min:e,max:t,threshold:r,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const CM=50,TM=100,OM=200,AM=125,RM=e=>{switch(e){case.5:return CM;case 1:return TM;case 2:return OM;default:return e*AM}};function wM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=function({config:{measureAxesRef:e},layoutService:t,size:n}){const r=t.getLayoutValue(`${e}.spacing`,1),i=RM(r);return Math.max(1,Math.round(n/i))}({config:e,layoutService:n,size:o}),u=MM({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},m="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[m],p=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(p),t=e.some(((t,n)=>e.indexOf(t)!==n));return!t&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!f();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}const NM=.3;function IM({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function kM({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}const LM=10;function PM({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=MM({min:r,max:i,count:LM,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(LM),l=function({ticks:e}){const t=Math.round(e.length*NM),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?IM:kM;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c),m=d.some(((e,t)=>d.indexOf(e)!==t));return m&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function DM({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function qM({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=wM({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return EM({extrema:i,ticks:u.ticks})?u:PM({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:u,count:1}),h=[...DM({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return{min:c,max:d,values:h}}function zM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-t*SM*Math.sign(t),max:n+n*SM*Math.sign(n)}}({extrema:o});return qM({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function $M({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=z.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return zM({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function _M({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return be.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function jM({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:as.TYPE.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===as.TYPE.LINE?2:t!==as.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==as.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function BM({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function FM({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u,styleModel:c}){let d;const{theme:m,translator:h}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=A({picasso:s,model:o,app:n,translator:h,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:os.SCALE.COLOR}},config:{auto:BM,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,u={eventName:"legend-c",key:os.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",styleOverrides:{title:s.query.legend.title.getStyle(),label:s.query.legend.label.getStyle()},rtl:"rtl"===l.direction,settings:jM({layoutService:n,seriesModel:r,colorService:o})},{components:c,interactions:d}=o.getLegend(u,{actions:a,navigationDisabled:!a.interact.enabled()}),m=o.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=m[`${os.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:u,chart:r,environment:i,colorService:d,seriesModel:l,layoutService:a,actions:e,styleModel:c});p.wrappedScales=o,p.legendComponents=t,p.legendInteractions=n}}}),d}const HM="REJECTED",VM=()=>{},UM=1e4,YM={MULTIPLIER:2,MINIMUM:20,MAXIMUM:200},WM=50,XM=10,GM=100;var KM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-XM<=t.qTop,i=n.qLeft+n.qWidth+XM>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+XM>=t.qTop+t.qHeight,a=n.qLeft-XM<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var JM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-XM<=t.qTop,i=n.qTop+n.qHeight+XM>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var ZM={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const QM="pages";const eC="discretePan",tC=10;function nC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:eC,pointers:1,threshold:tC,enable(r,i){return this.started===eC||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{[`${eC}start`](e){e.preventDefault(),this.started=eC;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-tC:tC},[`${eC}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${eC}end`](e){e.preventDefault(),this.started=!1},[`${eC}cancel`](e){e.preventDefault(),this.started=!1}}}}function rC({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=Math.sign(-a)*GM;r.scroll(s)}}function iC({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(UM/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(YM.MAXIMUM,n));return{width:e,height:Math.max(YM.MINIMUM,Math.min(n*YM.MULTIPLIER,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function oC(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(HM),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(HM),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(HM),n=null)},i}const aC={command:{update:()=>{}}};function sC({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=aC,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:iC({layoutService:r}),request:u({layoutService:r,definitionPath:o}),process:oC(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==HM)throw e}))}),WM);return function(e,{onProcessing:t=VM,onDataPage:n=VM}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var lC={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var uC={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function cC(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function dC(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function mC(e){return dC(e.qMatrix,(e=>e[0].qElemNumber))-1}var hC={inTotal:function({layoutService:e}){const t=cC(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=cC(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=cC(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=mC(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const pC=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1),fC=(e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n};function gC(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return pC(e,n);const r=fC(t.qMatrix,n);return r.successful?r.count:pC(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return pC(e,n);return dC(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var yC={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=gC(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:u}=n,c=gC(t).area(e(),l,a.qArea),d=mC(a),m=a.qArea.qHeight+d,h=u===o?(r.inView-m)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+m/r.inView]}};function vC({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=m;switch(f){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:u,fontSize:c,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:u,fontSize:c,text:"M"});if(!t)return m>o;const h=(90-d)*(Math.PI/180);return m>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:m,label:y})?v/d:l:v/d}}function bC({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:u}){const{inTotal:c,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?lC:n?r?hC:yC:uC}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,f=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=c({layoutService:r});return{inTotal:l,inView:vC({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(UM/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,f(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&u?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=f(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function xC({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:h}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const p=bC({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:h}),f=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=f(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:r})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",p.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=g({pixelOffset:u,items:a});m.preventSet("viewRange",p.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=p.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:c.start,items:a})),m.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function SC({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:h,areaBuffer:p,processDataPage:f=(()=>{})}={}}){const g=C(),y=function({qMode:e}){switch(e){case"S":default:return KM;case"K":return JM;case"T":return ZM}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(QM,[]),{add:t=>{const n=e.get(QM);n.length=0,n.push(t)},getCurrent:()=>e.get(QM)[0],getAll:()=>e.get(QM),contains:n=>t(e.get(QM)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=sC({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,processDataPage:f}),S=xC({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:h,areaBuffer:b,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),T=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[nC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:rC({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:S});return{interactions:T,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var EC={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function MC({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:e,defaultValue:t})=>n&&Object.hasOwnProperty.call(n,e)?n[e]:t}function CC({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:i,LINE:o,POINT:a}=Ql,s=n.getStyles(),l=MC({layoutService:e,key:"bar"}),u=MC({layoutService:e,key:"line"}),c=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?i.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>l({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!c(),getStrokeWidth:()=>c(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:i.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y,v,b,x,S,E;return{fill:null!==(e=null===(t=d("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,useContrastColor:null===(a=null===(l=d("bar"))||void 0===l||null===(u=l.bar)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.useContrastColor)||void 0===a||a,fontSize:null!==(h=null===(p=d("bar"))||void 0===p||null===(f=p.bar)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.value)||void 0===y?void 0:y.fontSize)&&void 0!==h?h:s.label.value.numFontSize,fontFamily:null!==(v=null===(b=d("bar"))||void 0===b||null===(x=b.bar)||void 0===x||null===(S=x.label)||void 0===S||null===(E=S.value)||void 0===E?void 0:E.fontFamily)&&void 0!==v?v:s.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>u({property:"lineCurve",defaultValue:o.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>u({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?o.WIDTH.FULL.DEFAULT:o.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=u({property:"lineType",defaultValue:o.TYPE.SOLID});return e&&o.TYPE[e.toUpperCase()]}},point:{getSize:()=>u({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT}),label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y;return{fill:null!==(e=null===(t=d("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=d("line"))||void 0===l||null===(u=l.line)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(h=null===(p=d("line"))||void 0===p||null===(f=p.line)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.value)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(i=null===(o=d("axis"))||void 0===o||null===(a=o.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.axis.title.fontSize,color:null!==(u=null===(c=d("axis"))||void 0===c||null===(m=c.axis)||void 0===m||null===(h=m.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y;return{fill:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.name)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=d("axis"))||void 0===l||null===(u=l.axis)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.name)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(h=null===(p=d("axis"))||void 0===p||null===(f=p.axis)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.name)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:s.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.title.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.title.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.legend.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.label)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.label.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.label)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.label.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.label)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.legend.label.color}}}}}}}function TC({dataset:e,data:t,valueData:n}){var r;const{source:i,label:o,value:a}=n,s=e(i.key).field(i.field);return fe.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a):o}function OC({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,propertiesModel:l,custom:u}){const c=s.getStyles(),d=({data:e})=>e.major.value,m=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:h}=os.COMPONENT,{PRIMARY:p,SECONDARY:f}=as.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=os.COMPONENT,{PRIMARY:a,SECONDARY:s}=as.AXIS,{orientation:l}=e.meta.chart,u="vertical"===l,c=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:m}=l,h=m===n.MAJOR?d.data.value:d.data.major.value;if(u){const t=e.findShapes("container").find((e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===h&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const p=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===h));if(u&&p)return{key:p.key,bounds:p.bounds};const f=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===h)),g=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===h));if(u&&f&&!g.find((e=>e.data.end.source.field!==f.data.end.source.field)))return{key:f.key,bounds:f.bounds};const y=p||f;return!(u||!y||g.find((e=>e.data.end.source.field!==y.data.end.source.field)))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:i,seriesModel:o});return R({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:os.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...o.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...o.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...o.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[os.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${h}-max-${p}`,`${h}-max-${f}`,`${h}-min-${p}`,`${h}-min-${f}`,`${os.COMPONENT.BAR_OOB}-max-${p}`,`${os.COMPONENT.BAR_OOB}-max-${f}`,`${os.COMPONENT.BAR_OOB}-min-${p}`,`${os.COMPONENT.BAR_OOB}-min-${f}`,`${os.COMPONENT.DATA_OOB_MARKER}-max`,`${os.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:d,filter:m},placement:g},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:m},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),d||(c.push(r.color({nodes:t,property:os.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return r.measure({label:i.dataset.title(s,l),value:TC({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>r.raw({value:u.createImageRow({value:t,h:e})})))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:os.COMPONENT.LEGEND_TOOLTIP,component:os.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:AC}=nm,RC=({picasso:e,chart:t,environment:m,flags:h,viewState:p,viewCache:f,actions:g,selectionService:y})=>{const v=a(),{width:b,height:x}=i(),[S,M]=n(),[C,T]=n(),O=s(),A=l(),R=u(),L=c(),P=d();r((()=>{if(!(v&&null!=t&&t.update&&m&&p))return;const n=w({source:v,metaAdditionsFn:function({layout:e}){var t,n,r;const i=E(e,"qHyperCube.qMeasureInfo",[]),o=i.some((({series:e=as.NOPE_SERIES})=>Sc(e)===as.TYPE.LINE)),a=be.continuous(e,(()=>o&&he.isTime(!0,e))),s=!mM(E(e,"version","")),l=i.filter((({series:e=as.NOPE_SERIES})=>Sc(e)===as.TYPE.BAR)),u=l.length,c=l.filter((({series:e=as.NOPE_SERIES})=>e.axis!==as.AXIS.SECONDARY)).length,d=l.filter((({series:e=as.NOPE_SERIES})=>e.axis===as.AXIS.SECONDARY)).length,m=s?c>1||d>1:u>1,h=("grouped"!==E(e,"barGrouping.grouping")||a)&&m,p=!h&&u>1,f=s&&h&&(c>0&&d>1||c>1&&d>0),g=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:he.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:he.isTime(a,e),isSnapshot:be.snapshot(e),isBarSeriesStacked:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f,isGrouped:p||f,isGroupedByMeasure:p||f,isDimensionLocked:g,groupSize:f?2:u,hasLineSeries:o}}}),{options:r,translator:i}=m,{direction:o,viewState:a={}}=r,s="rtl"===o,{legendScrollOffset:l,scrollOffset:u}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;p.preventSet("scrollOffset",u),p.preventSet("legendScrollOffset",l),p.preventSet("title",n.getLayoutValue("title"));const c=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=gM({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:O,layoutService:n}),d=N({chart:t,layoutService:n,config:{logicalSize:{width:b,height:x},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=hM({layoutService:n,flags:h}),C=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return SC({chart:e,actions:s,componentKey:rm(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:EC,options:{axisKey:os.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:d,seriesModel:S,viewState:p,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,T=n.meta.isContinuous?AC({model:O,layoutService:n,viewState:p,viewCache:f}):void 0,D=I({theme:m.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),q=CC({layoutService:n,dockService:d,themeService:D,flags:h}),z=FM({actions:g,appLayoutModel:R,appModel:A,chart:t,environment:m,flags:h,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:S,viewState:p,styleModel:q}),$=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`,o=n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:o}}({layoutService:n,seriesModel:S}),_=xM({isPrimary:!0,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:T,flags:h}),j=xM({isPrimary:!1,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:T,flags:h}),B=$M({config:{measureAxesRef:"measureAxes.0",formatter:os.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:_,dockService:d,seriesModel:S,themeService:D}),F=$M({config:{measureAxesRef:"measureAxes.1",formatter:os.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:j,dockService:d,seriesModel:S,themeService:D}),H=_M({genericObjectModel:O,layoutService:n}),V=Os({flags:h,layout:v,app:A,model:O,picasso:e,chart:t,translator:i,localeInfo:R.qLocaleInfo,embed:P,options:r}),U=OC({chart:t,actions:g,translator:i,rtl:s,dockService:d,seriesModel:S,colorService:z,themeService:D,propertiesModel:H,custom:V}),Y=is({layoutService:n,discreteModel:C}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:os.SCALE.MAJOR,MAJOR_INNER:os.SCALE.MAJOR_INNER,MINOR:{PRIMARY:os.SCALE.MINOR.PRIMARY,SECONDARY:os.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${os.COMPONENT.BAR}-${as.AXIS.PRIMARY}`,BAR_SECONDARY:`${os.COMPONENT.BAR}-${as.AXIS.SECONDARY}`,AXIS:{MAJOR:os.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:os.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:os.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:os.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:os.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:os.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:os.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:os.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:os.COLLECTION.MAIN}}}}(n),X=k({picassoInstance:e,plugins:L,pluginArgs:W});M({selectionService:y,genericObjectModel:O,appModel:A,dockService:d,styleModel:q,layoutService:n,fieldModel:$,seriesModel:S,reducedModel:c,primaryExtremumModel:_,secondaryExtremumModel:j,primaryTickModel:B,secondaryTickModel:F,propertiesModel:H,colorService:z,themeService:D,appLayoutModel:R,tooltipService:U,flags:h,...C&&{discreteModel:C},...T&&{continuousModel:T},refLineModel:Y,pluginService:X})}),[v,O,A,R,m,null==t?void 0:t.update,p]);const[,D]=o((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:i,propertiesModel:o,continuousModel:a,discreteModel:s,pluginService:l}=S,u=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),i=!e.meta.isSnapshot&&(null==m||null===(t=m.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return i&&p.preventSet("zoom",i),r}:()=>Promise.resolve(),c=t.initialize().then((()=>{const e=t.getSettings().field;y&&y.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([l.initialize(),n.command.initialize(),O?o.command.initialize():Promise.resolve(),c,u(),g.scroll.attachDiscreteModel(s)]).then((()=>Promise.all([r.command.initialize(),i.command.initialize()]).then((()=>T(S)))))}),[S]);if(D)throw D;return C};const wC={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"}}]};const NC={query:{getCanScroll:()=>!0}};function IC({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function kC({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===os.COMPONENT.LEGEND_CATEGORICAL}),r()}function LC({chart:e,actions:t}){const i=b(),o=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!i)return null;const n=e.scale(os.SCALE.MAJOR),r=P({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:IC},selectionEvents:{start:kC}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&o&&s.setLayout(o)}),[o]),s}const PC={version:"1.26.4",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var DC=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=Sc(n[e].qDef.series),i===as.TYPE.BAR?r[0]=1:i===as.TYPE.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},qC=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===as.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===as.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function zC(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&Sc(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===as.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function $C(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:DC(t),added(e,t){xs.addCallbackCustomTooltip(t)},moved(e,t){xs.moveCallbackCustomTooltip(t,e)},removed(e,t){xs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){xs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:qC(t),added({qDef:e},t){var n;zC(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:as.TYPE.LINE,axis:as.AXIS.SECONDARY}:e.series={type:as.TYPE.BAR,axis:as.AXIS.PRIMARY})},moved(e,t){zC(t)}}}}function _C(e){const t=$C(e);return{properties:PC,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&ie(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const jC=({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,os.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),u.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,os.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const BC=(e,t,n,r)=>{const i=`${t}.fontFamily`,o=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function FC(e,t,n){const r=D({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...BC("bar.label.value","label.value",r,t),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:BC("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:BC("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:BC("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:BC("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:BC("legend.label","legend.label",r,t)}}}:void 0}};const i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",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"}]},o={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${i.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>Sc(e.qDef.series)===as.TYPE.LINE));return!be.continuous(n.layout,r&&he.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01},s={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},l={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},u={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},c={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>Sc(e.qDef.series)===as.TYPE.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:i.defaultValue,strokeColor:o.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:s.defaultValue,lineThickness:l.defaultValue,lineType:u.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:i,barStrokeColor:o,barWidth:a}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:s,lineThickness:l,lineType:u,lineCurve:c}}}}}}}const HC={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function VC(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=as.NOPE_SERIES})=>Sc(e)===as.TYPE.LINE));return be.continuous(e,(()=>t&&he.isTime(!0,e)))}function UC(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function YC(e){var t,n,r;return UC(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function WC(e){var t,n;return UC(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function XC(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function GC(e){return WC(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function KC(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...XC(n),...GC(e)]:GC(e)}(t,n,e)))}function JC(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||VC(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Sc(null===(t=e.qDef)||void 0===t?void 0:t.series)===as.TYPE.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Sc(null===(t=e.qDef)||void 0===t?void 0:t.series)===as.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>UC(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:YC},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:WC}}}}}}}}}}}}const ZC=10,QC=!0;function eT(e,t,n){let r;const i=n||0;var o,a;t?r=t.getMeasureLayouts():r=null!==(o=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==o?o:[];return r.filter((e=>{const{series:t}=e||{};return 0===i?Dx(t,QC):!Dx(t,QC)}))}function tT(e,t){return t.getMeasures().filter((e=>Sc(e.qDef.series)===as.TYPE.LINE)).length>0}function nT(e,t,n){const r=t.getMeasures().filter((e=>Sc(e.qDef.series)===as.TYPE.BAR));return r.filter((e=>e.qDef.series.axis!==as.AXIS.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===as.AXIS.SECONDARY)).length>n}const rT=(e,t,n,r)=>{const i="vertical"===t.layout.orientation||VC(t.layout)?"y":"x",o=eT(e,t,r).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function iT(e){var t,n,r,i,o;const{translator:a,flags:s,anything:l}=e,u=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,c=null==e||null===(r=e.anything)||void 0===r||null===(i=r.sense)||void 0===i||null===(o=i.isUnsupportedFeature)||void 0===o?void 0:o.call(i,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>KC(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>UC(e)))}}},m=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const h=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!m(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!m(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),p=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>UC(e)))||!s.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||h(e,t))},f={items:{disclaimer:{show:(e,t)=>p(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!p(e,t)}}},g={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&nT(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&tT(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>a.get(eT(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&eT(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&eT(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},y={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?HC:void 0,simpleLabels:g,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:FC(s,u,a),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>nT(0,t,1)&&!VC(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>VC(n.layout),convertFunctions:(v="vertical",{get:(e,t,n)=>VC(n.layout)?v:e(t.type),set(e,t,n,r){t(n.type,VC(r.layout)?v:e,v)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!VC(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>tT(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>tT(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>nT(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:f,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||VC(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let i;return i=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),i},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||VC(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!VC(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:ZC,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=ZC:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!c}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>rT(e,t,a,0),show:(e,t)=>eT(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>rT(e,t,a,0),show:(e,t)=>eT(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&Dx(null==e?void 0:e.series,QC)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&eT(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||VC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&eT(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>eT(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.0.autoMinMax",!1),M(i,"measureAxes.0.minMax","min"),M(i,"measureAxes.0.min",0)):M(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>rT(e,t,a,1),show:(e,t)=>eT(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>rT(e,t,a,1),show:(e,t)=>eT(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!Dx(null==e?void 0:e.series,QC)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&eT(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||VC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&eT(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>eT(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.1.autoMinMax",!1),M(i,"measureAxes.1.minMax","min"),M(i,"measureAxes.1.min",0)):M(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var v;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(y.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});const b={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,i;if(null!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;return!VC(n.layout)}}}},measures:JC(e)}},x={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>Dx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,QC)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!Dx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,QC)},dimRefLines:{uses:"dimReflines"}}};return{type:"items",component:"accordion",items:{data:b,sorting:{uses:"sortingWithDisclaimer"},addons:x,settings:y}}}function oT(e){return e.qHyperCubeDef.qMeasures.filter((e=>Sc(e.qDef.series)===as.TYPE.LINE)).length>0}function aT(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>oT(e)||!VC(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>Sc(e.qDef.series)===as.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===as.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===as.AXIS.SECONDARY)).length>1:n.length>1}(e,!mM(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!VC(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!VC(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>oT(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>oT(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>UC(e)))}}}}}}const sT={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function lT(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=sT[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function uT(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});lT(r,o,t,n,"bar"),lT(r,o,t,n,"line"),lT(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function cT(e){const t={},{tooltip:n}=e;if(n){var r,i;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const dT=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function mT(e){return{definition:iT(e),softDefinition:aT(),support:{snapshot:dT,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:uT,extendMetrics:cT,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:$C(e),defaultPropertyValues:a,hypercubePath:i,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&ie(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),KC(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return mM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=as.NOPE_SERIES),void 0===t.series.type&&(t.series.type=as.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===as.TYPE.BAR?as.AXIS.PRIMARY:as.AXIS.SECONDARY),t.series.type===as.TYPE.BAR&&t.series.axis===as.AXIS.SECONDARY&&(t.series.axis=as.AXIS.PRIMARY)})),e.version=dM.BAR_IN_SECONDARY_AXIS),e}(e)}}}}}}));
23
+ Object.defineProperty(Bg,"__esModule",{value:!0});var Fg="function"==typeof Symbol&&Symbol.for,Hg=Fg?Symbol.for("react.element"):60103,Vg=Fg?Symbol.for("react.portal"):60106,Ug=Fg?Symbol.for("react.fragment"):60107,Yg=Fg?Symbol.for("react.strict_mode"):60108,Wg=Fg?Symbol.for("react.profiler"):60114,Xg=Fg?Symbol.for("react.provider"):60109,Gg=Fg?Symbol.for("react.context"):60110,Kg=Fg?Symbol.for("react.async_mode"):60111,Jg=Fg?Symbol.for("react.concurrent_mode"):60111,Zg=Fg?Symbol.for("react.forward_ref"):60112,Qg=Fg?Symbol.for("react.suspense"):60113,ey=Fg?Symbol.for("react.suspense_list"):60120,ty=Fg?Symbol.for("react.memo"):60115,ny=Fg?Symbol.for("react.lazy"):60116,ry=Fg?Symbol.for("react.fundamental"):60117,iy=Fg?Symbol.for("react.responder"):60118,oy=Fg?Symbol.for("react.scope"):60119;function ay(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hg:switch(e=e.type){case Kg:case Jg:case Ug:case Wg:case Yg:case Qg:return e;default:switch(e=e&&e.$$typeof){case Gg:case Zg:case Xg:return e;default:return t}}case ny:case ty:case Vg:return t}}}function sy(e){return ay(e)===Jg}Bg.typeOf=ay,Bg.AsyncMode=Kg,Bg.ConcurrentMode=Jg,Bg.ContextConsumer=Gg,Bg.ContextProvider=Xg,Bg.Element=Hg,Bg.ForwardRef=Zg,Bg.Fragment=Ug,Bg.Lazy=ny,Bg.Memo=ty,Bg.Portal=Vg,Bg.Profiler=Wg,Bg.StrictMode=Yg,Bg.Suspense=Qg,Bg.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Ug||e===Jg||e===Wg||e===Yg||e===Qg||e===ey||"object"==typeof e&&null!==e&&(e.$$typeof===ny||e.$$typeof===ty||e.$$typeof===Xg||e.$$typeof===Gg||e.$$typeof===Zg||e.$$typeof===ry||e.$$typeof===iy||e.$$typeof===oy)},Bg.isAsyncMode=function(e){return sy(e)||ay(e)===Kg},Bg.isConcurrentMode=sy,Bg.isContextConsumer=function(e){return ay(e)===Gg},Bg.isContextProvider=function(e){return ay(e)===Xg},Bg.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hg},Bg.isForwardRef=function(e){return ay(e)===Zg},Bg.isFragment=function(e){return ay(e)===Ug},Bg.isLazy=function(e){return ay(e)===ny},Bg.isMemo=function(e){return ay(e)===ty},Bg.isPortal=function(e){return ay(e)===Vg},Bg.isProfiler=function(e){return ay(e)===Wg},Bg.isStrictMode=function(e){return ay(e)===Yg},Bg.isSuspense=function(e){return ay(e)===Qg},jg.exports=Bg;var ly=jg.exports,uy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},my={};function hy(e){return ly.isMemo(e)?dy:my[e.$$typeof]||uy}my[ly.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},my[ly.Memo]=dy;var py=Object.defineProperty,fy=Object.getOwnPropertyNames,gy=Object.getOwnPropertySymbols,yy=Object.getOwnPropertyDescriptor,vy=Object.getPrototypeOf,by=Object.prototype;var xy=function e(t,n,r){if("string"!=typeof n){if(by){var i=vy(n);i&&i!==by&&e(t,i,r)}var o=fy(n);gy&&(o=o.concat(gy(n)));for(var a=hy(t),s=hy(n),l=0;l<o.length;++l){var u=o[l];if(!(cy[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=yy(n,u);try{py(t,u,c)}catch(e){}}}}return t},Sy=X(xy);function Ey(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=oh(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(Ym({theme:e},n))}}}:{root:t},l=zg(s,Ym({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=_.forwardRef((function(t,r){var i,o,a,s=t.children,u=t.className,c=t.clone,d=t.component,m=oh(t,["children","className","clone","component"]),h=_g(l(t).root,u),p=m;if(n&&(i=p,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),p=a),c)return _.cloneElement(s,Ym({className:_g(s.props.className,h)},p));if("function"==typeof s)return s(Ym({className:h},p));var f=d||e;return _.createElement(f,Ym({ref:r,className:h},p),s)}));return Sy(u,e),u}}function My(e){var t=e.children,n=e.theme,r=Rg(),i=_.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):Ym({},e,t)}(r,n);return null!=e&&(e[Ih]=null!==r),e}),[n,r]);return _.createElement(Ag.Provider,{value:i},t)}var Cy=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=oh(t,["defaultTheme","withTheme","name"]),l=a,u=zg(e,Ym({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=_.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=oh(e,["classes","innerRef"]),c=u(Ym({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Rg()||r,a&&(d=Ph({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),_.createElement(n,Ym({ref:s||t,classes:c},d))}));return Sy(c,n),c}},Ty=Nh(),Oy=function(e){var t=Ey(e);return function(e,n){return t(e,Ym({defaultTheme:Ty},n))}};function Ay(e,t){return Cy(e,Ym({defaultTheme:Ty},t))}function Ry(e){if("string"!=typeof e)throw new Error(Zm(7));return e.charAt(0).toUpperCase()+e.slice(1)}function wy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Ny(e){return e&&e.ownerDocument||document}function Iy(e){return Ny(e).defaultView||window}function ky(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ly="undefined"!=typeof window?j.useLayoutEffect:j.useEffect;function Py(e){var t=j.useRef(e);return Ly((function(){t.current=e})),j.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Dy(e,t){return j.useMemo((function(){return null==e&&null==t?null:function(n){ky(e,n),ky(t,n)}}),[e,t])}var qy=!0,zy=!1,$y=null,_y={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function jy(e){e.metaKey||e.altKey||e.ctrlKey||(qy=!0)}function By(){qy=!1}function Fy(){"hidden"===this.visibilityState&&zy&&(qy=!0)}function Hy(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return qy||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!_y[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function Vy(){zy=!0,window.clearTimeout($y),$y=window.setTimeout((function(){zy=!1}),100)}function Uy(){return{isFocusVisible:Hy,onBlurVisible:Vy,ref:j.useCallback((function(e){var t,n=V.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",jy,!0),t.addEventListener("mousedown",By,!0),t.addEventListener("pointerdown",By,!0),t.addEventListener("touchstart",By,!0),t.addEventListener("visibilitychange",Fy,!0))}),[])}}var Yy=!1,Wy=_.createContext(null),Xy="unmounted",Gy="exited",Ky="entering",Jy="entered",Zy="exiting",Qy=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Gy,r.appearStatus=Ky):i=Jy:i=t.unmountOnExit||t.mountOnEnter?Xy:Gy,r.state={status:i},r.nextCallback=null,r}jh(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Xy?{status:Gy}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ky&&n!==Jy&&(t=Ky):n!==Ky&&n!==Jy||(t=Zy)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ky){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:U.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gy&&this.setState({status:Xy})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[U.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Yy?this.safeSetState({status:Jy},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Ky},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Jy},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:U.findDOMNode(this);t&&!Yy?(this.props.onExit(r),this.safeSetState({status:Zy},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Gy},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Gy},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:U.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Xy)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=ih(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(Wy.Provider,{value:null},"function"==typeof n?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);function ev(){}Qy.contextType=Wy,Qy.propTypes={},Qy.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ev,onEntering:ev,onEntered:ev,onExit:ev,onExiting:ev,onExited:ev},Qy.UNMOUNTED=Xy,Qy.EXITED=Gy,Qy.ENTERING=Ky,Qy.ENTERED=Jy,Qy.EXITING=Zy;var tv=Qy;function nv(e,t){var n=Object.create(null);return e&&B.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&F(e)?t(e):e}(e)})),n}function rv(e,t,n){return null!=n[t]?n[t]:e.props[t]}function iv(e,t,n){var r=nv(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(F(a)){var s=o in t,l=o in r,u=t[o],c=F(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&F(u)&&(i[o]=H(a,{onExited:n.bind(null,a),in:u.props.in,exit:rv(a,"exit",e),enter:rv(a,"enter",e)})):i[o]=H(a,{in:!1}):i[o]=H(a,{onExited:n.bind(null,a),in:!0,exit:rv(a,"exit",e),enter:rv(a,"enter",e)})}})),i}var ov=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},av=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Bh(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}jh(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,nv(n.children,(function(e){return H(e,{onExited:r.bind(null,e),in:!0,appear:rv(e,"appear",n),enter:rv(e,"enter",n),exit:rv(e,"exit",n)})}))):iv(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=nv(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Ym({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=ih(e,["component","childFactory"]),i=this.state.contextValue,o=ov(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?_.createElement(Wy.Provider,{value:i},o):_.createElement(Wy.Provider,{value:i},_.createElement(t,r,o))},t}(_.Component);av.propTypes={},av.defaultProps={component:"div",childFactory:function(e){return e}};var sv=av;function lv(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var uv=j.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,m=oh(e,["classes","className","component","square","elevation","variant"]);return j.createElement(o,Ym({className:_g(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},m))})),cv=Ay((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Ym({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(uv),dv="undefined"==typeof window?j.useEffect:j.useLayoutEffect;function mv(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=j.useState(!1),m=d[0],h=d[1],p=_g(t.ripple,t.rippleVisible,r&&t.ripplePulsate),f={width:a,height:a,top:-a/2+o,left:-a/2+i},g=_g(t.child,m&&t.childLeaving,r&&t.childPulsate),y=Py(u);return dv((function(){if(!s){h(!0);var e=setTimeout(y,c);return function(){clearTimeout(e)}}}),[y,s,c]),j.createElement("span",{className:p,style:f},j.createElement("span",{className:g}))}var hv=j.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=oh(e,["center","classes","className"]),s=j.useState([]),l=s[0],u=s[1],c=j.useRef(0),d=j.useRef(null);j.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=j.useRef(!1),h=j.useRef(null),p=j.useRef(null),f=j.useRef(null);j.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=j.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(Eh(e),[j.createElement(mv,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),y=j.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var c,d,y,v=u?null:f.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,E=x.clientY;c=Math.round(S-b.left),d=Math.round(E-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var M=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(M,2)+Math.pow(C,2))}e.touches?null===p.current&&(p.current=function(){g({pulsate:o,rippleX:c,rippleY:d,rippleSize:y,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):g({pulsate:o,rippleX:c,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=j.useCallback((function(){y({},{pulsate:!0})}),[y]),b=j.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return j.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),j.createElement("span",Ym({className:_g(i.root,o),ref:f},a),j.createElement(sv,{component:null,exit:!0},l))})),pv=Ay((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(j.memo(hv)),fv=j.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,m=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,f=e.disableTouchRipple,g=void 0!==f&&f,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,x=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,T=e.onKeyUp,O=e.onMouseDown,A=e.onMouseLeave,R=e.onMouseUp,w=e.onTouchEnd,N=e.onTouchMove,I=e.onTouchStart,k=e.onDragLeave,L=e.tabIndex,P=void 0===L?0:L,D=e.TouchRippleProps,q=e.type,z=void 0===q?"button":q,$=oh(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),_=j.useRef(null);var B=j.useRef(null),F=j.useState(!1),H=F[0],U=F[1];m&&H&&U(!1);var Y=Uy(),W=Y.isFocusVisible,X=Y.onBlurVisible,G=Y.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Py((function(r){return t&&t(r),!n&&B.current&&B.current[e](r),!0}))}j.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),_.current.focus()}}}),[]),j.useEffect((function(){H&&v&&!p&&B.current.pulsate()}),[p,v,H]);var J=K("start",O),Z=K("stop",k),Q=K("stop",R),ee=K("stop",(function(e){H&&e.preventDefault(),A&&A(e)})),te=K("start",I),ne=K("stop",w),re=K("stop",N),ie=K("stop",(function(e){H&&(X(e),U(!1)),x&&x(e)}),!1),oe=Py((function(e){_.current||(_.current=e.currentTarget),W(e)&&(U(!0),M&&M(e)),E&&E(e)})),ae=function(){var e=V.findDOMNode(_.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=j.useRef(!1),le=Py((function(e){v&&!se.current&&H&&B.current&&" "===e.key&&(se.current=!0,e.persist(),B.current.stop(e,(function(){B.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),S&&S(e))})),ue=Py((function(e){v&&" "===e.key&&B.current&&H&&!e.defaultPrevented&&(se.current=!1,e.persist(),B.current.stop(e,(function(){B.current.pulsate(e)}))),T&&T(e),S&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&S(e)})),ce=c;"button"===ce&&$.href&&(ce="a");var de={};"button"===ce?(de.type=z,de.disabled=m):("a"===ce&&$.href||(de.role="button"),de["aria-disabled"]=m);var me=Dy(r,t),he=Dy(G,_),pe=Dy(me,he),fe=j.useState(!1),ge=fe[0],ye=fe[1];j.useEffect((function(){ye(!0)}),[]);var ve=ge&&!p&&!m;return j.createElement(ce,Ym({className:_g(s.root,l,H&&[s.focusVisible,b],m&&s.disabled),onBlur:ie,onClick:S,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:pe,tabIndex:m?-1:P},de,$),a,ve?j.createElement(pv,Ym({ref:B,center:o},D)):null)})),gv=Ay({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(fv),yv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},vv=j.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,m=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,f=e.paragraph,g=void 0!==f&&f,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,x=void 0===b?yv:b,S=oh(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(g?"p":x[v]||yv[v])||"span";return j.createElement(E,Ym({className:_g(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Ry(s))],p&&i.noWrap,m&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Ry(r))],"initial"!==c&&i["display".concat(Ry(c))]),ref:t},S))})),bv=Ay((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(vv),xv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,m=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,f=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,S=e.startIcon,E=e.type,M=void 0===E?"button":E,C=e.variant,T=void 0===C?"text":C,O=oh(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=S&&j.createElement("span",{className:_g(r.startIcon,r["iconSize".concat(Ry(x))])},S),R=f&&j.createElement("span",{className:_g(r.endIcon,r["iconSize".concat(Ry(x))])},f);return j.createElement(gv,Ym({className:_g(r.root,r[T],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Ry(a))],"medium"!==x&&[r["".concat(T,"Size").concat(Ry(x))],r["size".concat(Ry(x))]],m&&r.disableElevation,c&&r.disabled,v&&r.fullWidth),component:l,disabled:c,focusRipple:!p,focusVisibleClassName:_g(r.focusVisible,g),ref:t,type:M},O),j.createElement("span",{className:r.label},A,n,R))})),Sv=Ay((function(e){return{root:Ym({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:rh(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:rh(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:rh(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(rh(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:rh(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(rh(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:rh(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(xv);var Ev="undefined"!=typeof window?j.useLayoutEffect:j.useEffect,Mv=j.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=j.useState(null),l=s[0],u=s[1],c=Dy(j.isValidElement(n)?n.ref:null,t);return Ev((function(){o||u(function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(r)||document.body)}),[r,o]),Ev((function(){if(l&&!o)return ky(t,l),function(){ky(t,null)}}),[t,l,o]),Ev((function(){a&&(l||o)&&a()}),[a,l,o]),o?j.isValidElement(n)?j.cloneElement(n,{ref:c}):n:l?V.createPortal(n,l):l})),Cv=Mv;function Tv(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ov(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Av(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Eh(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&Tv(e,r)}))}function Rv(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function wv(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Ny(e);return t.body===e?Iy(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Ov(o)+a,"px"),n=Ny(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Ov(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Nv=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return $h(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Tv(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Av(t,e.mountNode,e.modalRef,r,!0);var i=Rv(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Rv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=wv(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Rv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Tv(e.modalRef,!0),Av(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&Tv(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Iv(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=j.useRef(),m=j.useRef(null),h=j.useRef(null),p=j.useRef(),f=j.useRef(null),g=j.useCallback((function(e){f.current=V.findDOMNode(e)}),[]),y=Dy(t.ref,g),v=j.useRef();return j.useEffect((function(){v.current=c}),[c]),!v.current&&c&&"undefined"!=typeof window&&(p.current=l().activeElement),j.useEffect((function(){if(c){var e=Ny(f.current);r||!f.current||f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex",-1),f.current.focus());var t=function(){null!==f.current&&(e.hasFocus()&&!o&&u()&&!d.current?f.current&&!f.current.contains(e.activeElement)&&f.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===f.current&&(d.current=!0,t.shiftKey?h.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,u,c]),j.createElement(j.Fragment,null,j.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),j.cloneElement(t,{ref:y}),j.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var kv={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Lv=j.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=oh(e,["invisible","open"]);return i?j.createElement("div",Ym({"aria-hidden":!0,ref:t},o,{style:Ym({},kv.root,r?kv.invisible:{},o.style)})):null}));var Pv=new Nv,Dv=j.forwardRef((function(e,t){var n=Rg(),r=Ph({name:"MuiModal",props:Ym({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Lv:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,m=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,f=r.disableEnforceFocus,g=void 0!==f&&f,y=r.disableEscapeKeyDown,v=void 0!==y&&y,b=r.disablePortal,x=void 0!==b&&b,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,T=r.hideBackdrop,O=void 0!==T&&T,A=r.keepMounted,R=void 0!==A&&A,w=r.manager,N=void 0===w?Pv:w,I=r.onBackdropClick,k=r.onClose,L=r.onEscapeKeyDown,P=r.onRendered,D=r.open,q=oh(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=j.useState(!0),$=z[0],_=z[1],B=j.useRef({}),F=j.useRef(null),H=j.useRef(null),U=Dy(H,t),Y=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Ny(F.current)},X=function(){return B.current.modalRef=H.current,B.current.mountNode=F.current,B.current},G=function(){N.mount(X(),{disableScrollLock:C}),H.current.scrollTop=0},K=Py((function(){var e=function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(c)||W().body;N.add(X(),e),H.current&&G()})),J=j.useCallback((function(){return N.isTopModal(X())}),[N]),Z=Py((function(e){F.current=e,e&&(P&&P(),D&&J()?G():Tv(H.current,!0))})),Q=j.useCallback((function(){N.remove(X())}),[N]);if(j.useEffect((function(){return function(){Q()}}),[Q]),j.useEffect((function(){D?K():Y&&u||Q()}),[D,Q,Y,u,K]),!R&&!D&&(!Y||$))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:wh}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),Y&&(te.onEnter=wy((function(){_(!1)}),s.props.onEnter),te.onExited=wy((function(){_(!0),u&&Q()}),s.props.onExited)),j.createElement(Cv,{ref:Z,container:c,disablePortal:x},j.createElement("div",Ym({ref:U,onKeyDown:function(e){"Escape"===e.key&&J()&&(L&&L(e),v||(e.stopPropagation(),k&&k(e,"escapeKeyDown")))},role:"presentation"},q,{style:Ym({},ee.root,!D&&$?ee.hidden:{},q.style)}),O?null:j.createElement(o,Ym({open:D,onClick:function(e){e.target===e.currentTarget&&(I&&I(e),!p&&k&&k(e,"backdropClick"))}},a)),j.createElement(Iv,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:E,getDoc:W,isEnabled:J,open:D},j.cloneElement(s,te))))})),qv=Dv;function zv(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var $v={entering:{opacity:1,transform:zv(1)},entered:{opacity:1,transform:"none"}},_v=j.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,m=e.style,h=e.timeout,p=void 0===h?"auto":h,f=e.TransitionComponent,g=void 0===f?tv:f,y=oh(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=j.useRef(),b=j.useRef(),x=Rg()||Ty,S=x.unstable_strictMode&&!i,E=j.useRef(null),M=Dy(n.ref,t),C=Dy(S?E:void 0,M),T=function(e){return function(t,n){if(e){var r=Mh(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},O=T(l),A=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=lv({style:m,timeout:p},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===p?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),R=T(s),w=T(d),N=T((function(e){var t,n=lv({style:m,timeout:p},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===p?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=zv(.75),u&&u(e)})),I=T(c);return j.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),j.createElement(g,Ym({appear:!0,in:o,nodeRef:S?E:void 0,onEnter:A,onEntered:R,onEntering:O,onExit:N,onExited:I,onExiting:w,addEndListener:function(e,t){var n=S?e:t;"auto"===p&&(v.current=setTimeout(n,b.current||0))},timeout:"auto"===p?null:p},y),(function(e,t){return j.cloneElement(n,Ym({style:Ym({opacity:0,transform:zv(.75),visibility:"exited"!==e||o?void 0:"hidden"},$v[e],m,n.props.style),ref:C},t))}))}));_v.muiSupportAuto=!0;var jv=_v,Bv=j.createContext({}),Fv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,m=oh(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=j.useMemo((function(){return{dense:l}}),[l]);return j.createElement(Bv.Provider,{value:h},j.createElement(a,Ym({className:_g(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},m),d,n))})),Hv=Ay({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Fv),Vv="undefined"==typeof window?j.useEffect:j.useLayoutEffect,Uv=j.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,m=e.ContainerComponent,h=void 0===m?"li":m,p=e.ContainerProps,f=(p=void 0===p?{}:p).className,g=oh(p,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,x=void 0!==b&&b,S=e.disableGutters,E=void 0!==S&&S,M=e.divider,C=void 0!==M&&M,T=e.focusVisibleClassName,O=e.selected,A=void 0!==O&&O,R=oh(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),w=j.useContext(Bv),N={dense:v||w.dense||!1,alignItems:r},I=j.useRef(null);Vv((function(){o&&I.current&&I.current.focus()}),[o]);var k,L,P=j.Children.toArray(l),D=P.length&&(k=P[P.length-1],L=["ListItemSecondaryAction"],j.isValidElement(k)&&-1!==L.indexOf(k.type.muiName)),q=Dy(j.useCallback((function(e){I.current=V.findDOMNode(e)}),[]),t),z=Ym({className:_g(u.root,c,N.dense&&u.dense,!E&&u.gutters,C&&u.divider,x&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,D&&u.secondaryAction,A&&u.selected),disabled:x},R),$=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=_g(u.focusVisible,T),$=gv),D?($=z.component||d?$:"div","li"===h&&("li"===$?$="div":"li"===z.component&&(z.component="div")),j.createElement(Bv.Provider,{value:N},j.createElement(h,Ym({className:_g(u.container,f),ref:q},g),j.createElement($,z,P),P.pop()))):j.createElement(Bv.Provider,{value:N},j.createElement($,Ym({ref:q},z),P))})),Yv=Ay((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(Uv),Wv=j.forwardRef((function(e,t){var n=e.classes,r=e.className,i=oh(e,["classes","className"]),o=j.useContext(Bv);return j.createElement("div",Ym({className:_g(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),Xv=Ay((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(Wv),Gv=j.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,m=e.secondaryTypographyProps,h=oh(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=j.useContext(Bv).dense,f=null!=u?u:n;null==f||f.type===bv||a||(f=j.createElement(bv,Ym({variant:p?"body2":"body1",className:r.primary,component:"span",display:"block"},c),f));var g=d;return null==g||g.type===bv||a||(g=j.createElement(bv,Ym({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},m),g)),j.createElement("div",Ym({className:_g(r.root,i,p&&r.dense,l&&r.inset,f&&g&&r.multiline),ref:t},h),f,g)})),Kv=Ay({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Gv);function Jv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Zv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Qv(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function eb(e){return"function"==typeof e?e():e}var tb=j.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,m=e.container,h=e.elevation,p=void 0===h?8:h,f=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,T=e.PaperProps,O=void 0===T?{}:T,A=e.transformOrigin,R=void 0===A?{vertical:"top",horizontal:"left"}:A,w=e.TransitionComponent,N=void 0===w?jv:w,I=e.transitionDuration,k=void 0===I?"auto":I,L=e.TransitionProps,P=void 0===L?{}:L,D=oh(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),q=j.useRef(),z=j.useCallback((function(e){if("anchorPosition"===l)return a;var t=eb(r),n=(t&&1===t.nodeType?t:Ny(q.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+Jv(n,i),left:n.left+Zv(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),$=j.useCallback((function(e){var t=0;if(f&&"anchorEl"===l){var n=f(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,f]),_=j.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Jv(e,R.vertical)+t,horizontal:Zv(e,R.horizontal)}}),[R.horizontal,R.vertical]),B=j.useCallback((function(e){var t=$(e),n={width:e.offsetWidth,height:e.offsetHeight},i=_(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Qv(i)};var o=z(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=Iy(eb(r)),m=d.innerHeight-y,h=d.innerWidth-y;if(a<y){var p=a-y;a-=p,i.vertical+=p}else if(u>m){var f=u-m;a-=f,i.vertical+=f}if(s<y){var g=s-y;s-=g,i.horizontal+=g}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Qv(i)}}),[r,l,z,$,_,y]),F=j.useCallback((function(){var e=q.current;if(e){var t=B(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[B]),H=j.useCallback((function(e){q.current=V.findDOMNode(e)}),[]);j.useEffect((function(){C&&F()})),j.useImperativeHandle(n,(function(){return C?{updatePosition:function(){F()}}:null}),[C,F]),j.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){F()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,F]);var U=k;"auto"!==k||N.muiSupportAuto||(U=void 0);var Y=m||(r?Ny(eb(r)).body:void 0);return j.createElement(qv,Ym({container:Y,open:C,ref:t,BackdropProps:{invisible:!0},className:_g(c.root,d)},D),j.createElement(N,Ym({appear:!0,in:C,onEnter:v,onEntered:b,onExit:S,onExited:E,onExiting:M,timeout:U},P,{onEntering:wy((function(e,t){x&&x(e,t),F()}),P.onEntering)}),j.createElement(cv,Ym({elevation:p,ref:H},O,{className:_g(c.paper,O.className)}),u)))})),nb=Ay({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(tb);function rb(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function ib({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:rb(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return _.createElement("i",{style:i},_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},_.createElement("path",{d:e})))}const ob={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"},ab={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"},sb={d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"},lb={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"},ub={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 cb(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=ea.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 db(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),u=ie(!0,{},a),c=u.qHyperCubeDef[r][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],o||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[r][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=c,i&&i({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),cb(e,a,u)}))}const mb=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function hb({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=mb(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).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 i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return e},changeTo(e,t){db(r,e,t,"qDimensions",a)}}}function pb(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:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function fb({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=mb(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return n},changeTo(e,t){db(i,e,t,"qMeasures",o,a)}}}function gb(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const yb={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"}}},vb={menuItem:"alternative-menu-item",titleButton:"title-button",activeTitleButton:"active-title-button"},bb=Oy(Yv)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),xb=Oy((({children:e,...t})=>_.createElement(Sv,Lm({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}})));function Sb(e){const t=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${vb.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function n({title:e,selected:n,onClick:r}){const i=Ae.detectTextDirection(e);return _.createElement(bb,{role:"menuitem",button:!0,onClick:r,className:vb.menuItem,onKeyDown:t},_.createElement(Xv,{style:{minWidth:32}},_.createElement(ib,{d:n?sb.d:""})),_.createElement(Kv,{primaryTypographyProps:{dir:i}},e))}function r({alignTo:e,changeTo:t,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:u}){const c=a.map((e=>_.createElement(n,{key:e.id,title:e.title,onClick:()=>t(e.id)})));return _.createElement(nb,Lm({anchorEl:e,open:l,onClose:s},yb[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),_.createElement(Hv,{dense:!0,dir:i,"aria-label":u,component:"nav"},_.createElement(n,{title:r,selected:!0,onClick:s}),c))}n.propTypes={title:zm.string.isRequired,selected:zm.bool,onClick:zm.func.isRequired},n.defaultProps={selected:!1},r.propTypes={alignTo:zm.any,changeTo:zm.func.isRequired,current:zm.string.isRequired,dir:zm.string.isRequired,dock:zm.string.isRequired,list:zm.array,onClose:zm.func.isRequired,show:zm.bool.isRequired,instruction:zm.string.isRequired},r.defaultProps={list:[],alignTo:null};class i extends _.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=_.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getAlternatives().then((e=>{this.setState({hasValidAlternatives:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}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.id,e),this.closePopover(e)}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${vb.titleButton}`);t&&t.classList.add(vb.activeTitleButton)}this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e});document.querySelector(`.${vb.menuItem}`).focus()}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${vb.titleButton}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${vb.activeTitleButton}`);e&&(e.classList.remove(vb.activeTitleButton),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,m=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>_.createElement(xb,{style:{display:"flex",alignItems:"center",color:m&&"rgba(89, 89, 89, 0.8)",pointerEvents:m?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>m?void 0:e.drillUp(d-n),title:t},_.createElement("span",{style:c},t),_.createElement(ib,Lm({},ub,{size:"small",style:{margin:"0 8px"}}))))),p=u?this.state.hasValidAlternatives:l,f=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Ae.detectTextDirection(e.text),b=_.createElement(xb,{"aria-label":n.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:f,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${vb.titleButton} ${e.id}`,"data-id":e.id},e.locked&&_.createElement(ib,Lm({},ab,{size:"small",title:n.get("Tooltip.selections.locked")})),_.createElement("span",{style:c,dir:v},e.text),t&&p&&_.createElement(ib,Lm({},lb,{size:"small",style:{margin:"0 8px"}})));return _.createElement(_.Fragment,null,e.drilldown&&_.createElement(ib,Lm({},ob,{size:"small",title:n.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),h,_.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:p?"auto":"none",height:"100%"}},b),t&&p&&_.createElement(r,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions")}))}}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&fe.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return i.propTypes={disabled:zm.bool.isRequired,padding:zm.string,minWidth:zm.string,titleData:zm.shape({breadcrumbs:zm.arrayOf(zm.string).isRequired,drilldown:zm.bool.isRequired,index:zm.number.isRequired,locked:zm.bool.isRequired,text:zm.string.isRequired,popoverText:zm.string.isRequired,drillUp:zm.func,id:zm.string.isRequired}).isRequired,popover:zm.shape({dir:zm.string.isRequired,dock:zm.string.isRequired,changeTo:zm.func.isRequired,getAlternatives:zm.func.isRequired}),translator:zm.shape({get:zm.func.isRequired}).isRequired,selections:zm.shape({isActive:zm.func,addListener:zm.func,removeListener:zm.func}),style:zm.shape({fontSize:zm.string,color:zm.string,fontFamily:zm.string}).isRequired,isDimension:zm.bool.isRequired,hasAlternative:zm.bool.isRequired,supportConditional:zm.bool.isRequired},i.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:r,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:m,rtl:h,selections:p,skipAttributeExpressions:f,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!h?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),S=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,E=S&&S[l?"qDimensions":"qMeasures"]||[],M=n||r[l?"qDimensionInfo":"qMeasureInfo"],C=l?hb:fb,T=l?pb:gb,O=c&&c.colorSupport&&c.modifiers&&C({altList:E,app:e,dir:h?"rtl":"ltr",dock:o(v),model:c,onChange:d,skipAttributeExpressions:f,translator:g}),A=(R=this.settings.settings).isDimension&&fe.getValue(R,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||a(this.settings.settings);var R;const w=M.map(((e,n)=>{const r="number"==typeof e.explicitColumn?e.explicitColumn:n,o=T(e,r,c),a=n===M.length-1;return _.createElement(_.Fragment,{key:e.cId},_.createElement(i,{popover:O,titleData:o,model:c,translator:g,selections:p,disabled:t(),style:this.style,isDimension:l,padding:m,minWidth:u,hasAlternative:A,supportConditional:y}),!a&&_.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return _.createElement("div",{style:x,dir:b},w)}}}const Eb=function(){return Nh.apply(void 0,arguments)}({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:'"Source Sans Pro", "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 Mb=Lh({productionPrefix:"q2994",disableGlobal:!0,seed:""});function Cb(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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",U.render(function(e,t){return _.createElement(Lg,{generateClassName:t},_.createElement(My,{theme:Eb},e))}(e,Mb),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&U.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(U.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function Tb(){return function(e){e.renderer("react",Cb()),e.component("data-title",Sb(e.renderer("svg")())),e.component("disclaimer",function(){class e extends _.Component{render(){const{label:e,spanStyle:t}=this.props;return _.createElement(_.Fragment,null,_.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:zm.string.isRequired,spanStyle:zm.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=`${n.height}px`,r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${n.height}px`,r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${n.width}px`,r.height=`${n.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:`* ${t}`,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return _.createElement("div",{style:a,dir:o},_.createElement(_.Fragment,null,_.createElement(e,{label:s,spanStyle:l})))}}}())}}function Ob(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:Ob(i,t,n)},i}function Ab(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),Ob(i,a,l,e.invert)}))}const Rb={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(ie({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function wb({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=ie({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const m=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),p=(c-h)/2,f=p+d.major+h/2;return{item:d,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function Nb({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=ie(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:ie(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:u});return p}const Ib=["oob"];const kb={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Nb({keys:Ib,data:i,defaultSettings:{oob:Rb.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=wb}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=u[c].data,g=[];if(d.oob.show){g.push(Rb.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:Ib,symbol:s,dockValue:n});return d}},Lb={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Pb=["hat"];function Db(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 qb({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const h=ie({},e.hat,{type:"path",d:Db(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,ie({},e.hat,{type:"path",d:Db(m)})]}const zb={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Nb({keys:Pb,data:r,defaultSettings:Lb,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=wb}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];u.hat.show&&f.push(...qb({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:Pb});return u}};var $b={UNCLASSIFIED:"unclassified",EQUAL_EQUAL:"equal-equal",EQUAL_HIGHER:"equal-higher",EQUAL_LOWER:"equal-lower",EQUAL_VOID:"equal-void",HIGHER_EQUAL:"higher-equal",HIGHER_HIGHER_ACUTE:"higher-higher-acute",HIGHER_HIGHER_OBTUSE:"higher-higher-obtuse",HIGHER_LOWER_NEGATIVE:"higher-lower-negative",HIGHER_LOWER_POSITIVE:"higher-lower-positive",HIGHER_VOID:"higher-void",LOWER_EQUAL:"lower-equal",LOWER_HIGHER_NEGATIVE:"lower-higher-negative",LOWER_HIGHER_POSITIVE:"lower-higher-positive",LOWER_LOWER_ACUTE:"lower-lower-acute",LOWER_LOWER_OBTUSE:"lower-lower-obtuse",LOWER_VOID:"lower-void",VOID_EQUAL:"void-equal",VOID_HIGHER:"void-higher",VOID_LOWER:"void-lower",VOID_VOID:"void-void"};function _b(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function jb(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function Bb({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?$b.EQUAL_EQUAL:i<o?$b.EQUAL_HIGHER:$b.EQUAL_LOWER:i===o?r>i?$b.HIGHER_EQUAL:$b.LOWER_EQUAL:r>i?i<o?jb(e,t,n)>90?$b.HIGHER_HIGHER_OBTUSE:$b.HIGHER_HIGHER_ACUTE:_b(e,t)>_b(e,n)?$b.HIGHER_LOWER_POSITIVE:$b.HIGHER_LOWER_NEGATIVE:i>o?jb(e,t,n)>90?$b.LOWER_LOWER_OBTUSE:$b.LOWER_LOWER_ACUTE:_b(e,t)>_b(e,n)?$b.LOWER_HIGHER_POSITIVE:$b.LOWER_HIGHER_NEGATIVE:r===i?$b.EQUAL_VOID:r>i?$b.HIGHER_VOID:$b.LOWER_VOID:i===o?$b.VOID_EQUAL:i<o?$b.VOID_HIGHER:$b.VOID_LOWER:$b.VOID_VOID}function Fb({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}const Hb={X:1,Y:0};function Vb({node:e,line:t,groupIndex:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const m=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:h}=e,{"stroke-width":p}=e.attrs,f=r.pointValue(e.data),g={x:h.x+h.width/2,y:h.y+h.height/2,width:m.width+2*Hb.X,height:m.height+2*Hb.Y},y=`${g.x}-${g.y}`,v=!s&&!l,b=s?a.height:a.width,x=(s?g.y:g.x)/b,S=(v?1-x:x)<=(b<=200?.25:.1),E={key:y,node:e,line:t,group:n,value:f,labelMeasurements:m,bounds:g,inside:Fb({bounds:h,size:a}),border:p?p/2:0,classification:$b.UNCLASSIFIED,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:u.getExtreme(y),elite:S,show:c(e)};return E}function Ub({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e}),u=function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:Vb({node:e.node,line:e.line,groupIndex:u,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{})));return u.filter((e=>Object.keys(e).length))}var Yb={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Wb={[$b.EQUAL_EQUAL]:[Yb.TOP,Yb.BOTTOM],[$b.EQUAL_HIGHER]:[Yb.BOTTOM,Yb.BOTTOM_RIGHT],[$b.EQUAL_LOWER]:[Yb.TOP,Yb.TOP_RIGHT],[$b.EQUAL_VOID]:[Yb.TOP,Yb.BOTTOM],[$b.HIGHER_EQUAL]:[Yb.LEFT,Yb.BOTTOM_LEFT,Yb.TOP,Yb.TOP_RIGHT],[$b.HIGHER_HIGHER_ACUTE]:[Yb.BOTTOM,Yb.BOTTOM_LEFT,Yb.LEFT,Yb.TOP_RIGHT],[$b.HIGHER_HIGHER_OBTUSE]:[Yb.BOTTOM,Yb.TOP],[$b.HIGHER_LOWER_NEGATIVE]:[Yb.TOP,Yb.TOP_RIGHT,Yb.RIGHT],[$b.HIGHER_LOWER_POSITIVE]:[Yb.BOTTOM,Yb.BOTTOM_LEFT,Yb.LEFT],[$b.HIGHER_VOID]:[Yb.TOP],[$b.LOWER_EQUAL]:[Yb.TOP],[$b.LOWER_HIGHER_NEGATIVE]:[Yb.TOP,Yb.TOP_LEFT],[$b.LOWER_HIGHER_POSITIVE]:[Yb.BOTTOM_RIGHT],[$b.LOWER_LOWER_ACUTE]:[Yb.TOP,Yb.TOP_LEFT,Yb.LEFT,Yb.TOP_RIGHT,Yb.RIGHT],[$b.LOWER_LOWER_OBTUSE]:[Yb.TOP,Yb.BOTTOM],[$b.LOWER_VOID]:[Yb.TOP],[$b.VOID_EQUAL]:[Yb.TOP],[$b.VOID_HIGHER]:[Yb.TOP,Yb.BOTTOM],[$b.VOID_LOWER]:[Yb.TOP,Yb.BOTTOM,Yb.LEFT],[$b.VOID_VOID]:[Yb.TOP]};function Xb({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=Ub({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:i}=n;r[i]||(r[i]=[]),r[i].push(n.bounds)}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),m={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r],o=Bb({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),m.getItems().forEach((e=>e.setPreferences(Wb[e.classification]))),m}function Gb({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function Kb({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function Jb({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return Kb({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Kb({line1:e,line2:a})||Kb({line1:e,line2:s})||Kb({line1:e,line2:l})}({line:t,rect:e})))}const Zb={x:0,width:0,y:0,height:0};const Qb=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),ex=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),tx=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),nx=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),rx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),ix=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),ox=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),ax=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var sx={X:2.5,Y:4};const lx=[Yb.TOP,Yb.TOP_LEFT,Yb.TOP_RIGHT],ux=[Yb.BOTTOM,Yb.BOTTOM_LEFT,Yb.BOTTOM_RIGHT];function cx({position:e}){const t={x:sx.X,width:-2*sx.X,y:0,height:0},n=lx.indexOf(e)>-1,r=ux.indexOf(e)>-1;return n&&(t.y=sx.Y,t.height=-sx.Y),r&&(t.height=-sx.Y),t}function dx({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function mx({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}const hx=15;function px({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=hx){const a=mx({coordinates:dx({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=hx){const a=mx({coordinates:dx({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const fx=void 0;function gx({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Yb).map((e=>Yb[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[Yb.TOP]:Qb,[Yb.TOP_RIGHT]:ex,[Yb.RIGHT]:tx,[Yb.BOTTOM_RIGHT]:nx,[Yb.BOTTOM]:rx,[Yb.BOTTOM_LEFT]:ix,[Yb.LEFT]:ox,[Yb.TOP_LEFT]:ax},o=[];for(let a=0;a<r.length;a++){const s=r[a],l=i[s]({item:e}),u=cx({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:n});if(n&&c.inside&&o.push(l),c.valid)return l}const a=()=>px({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||fx)}return(e.extreme||e.elite)&&a()||fx}function yx({model:e,size:t,all:n}){const r={},i=e.getItems(),o=[...i.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const u=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=Zb,ignoreLines:a=!1}){const s={inside:Gb({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=Jb({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=gx({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):n&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:n}=e,r=gx({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,o.push(r),t.setPlacement(r))}))}var vx={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge",labelSpace:{use:()=>!1,size:10}},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:i,size:o}=r;if(i()){const r="horizontal"===t;e.edgeBleed.top=r?o:0,e.edgeBleed[n?"left":"right"]=r?0:o}return e},render(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,i=r.length?e=>r.includes(e.key):e=>e.key===t.point,o=this.chart.findShapes("circle").filter(i);if(!o.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";o.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:u,width:c,edgeBleed:d}=this.rect,m={height:u,width:c,edgeBleed:d,insideStrategy:e.insideStrategy},{style:h}=this,p=Xb({nodes:o,extract:l,style:h,measureText:this.renderer.measureText,size:m,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:p}),yx({model:p,size:m,all:e.all}),p.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:h.fontSize,fontFamily:h.fontFamily,fill:h.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},bx={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var xx={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,m=l.length&&void 0!==c;if(!d&&!m)return[];const h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))}));const l=(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])});return l}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!f.length)return[];const g="horizontal"===n,y=this.rect[g?"width":"height"],v=this.resolver.resolve({data:{items:f},settings:{major:a},scaled:{major:y}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=o/2*i,{fill:S}=this.settings.style,E=v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:S,startAngle:b,x:g?y*e.major:x,y:g?x:y*e.major,data:e.data})));return E}};function Sx({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function Ex({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))],i=e.findShapes("path").filter((e=>r.some((t=>t===e.key))));return i.reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function Mx({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Cx({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(ss.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function Tx({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&c&&(m=[e=>e.color.value]),!m.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?Mx:Cx)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(m.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function Ox({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(ss.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Ax({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(ss.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Rx({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=r[e];if("gradient"!==m.type)return m;const{type:h,nil:p}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(ss.SCALE.MAJOR),d=e.scale(ss.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),f=p.map((e=>m(e.major.value))),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,b=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v)),x=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:m,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?Ox:Ax)({chart:t,selected:a,connection:n,gradient:m,fallback:p})}function wx({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:h}){const p=t.getLine(l,u),{attrs:f}=p,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:m}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:Rx({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:g,attrs:f,rtl:m,count:h})))}function Nx({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:h}){const p=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:p,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const p=Tx({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.length<2)return n;const f=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:p});return f.length?(n.lines.push(...wx({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:p,connections:f,rtl:h,count:o.items.length})),n):n}),{lines:[]}),y=[];return g.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var Ix={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:Ex({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=Nx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=Ex({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Nx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const kx=()=>{const e=z();return e.use($),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",km(e))};e.interaction("hammer",km(Hammer))}(q)),e.use(Ab),e.use(Tb()),e.component("scrollbar",gl),e.component("point-label",vx),e.component("label-space",bx),e.component("time-axis",im.picassoComponents.timeAxis),e.component("axis-overlay",im.picassoComponents.axisOverlay),e.component("reference-line-labels",Ua),e.component("box-sliced-hat",zb),e.component("box-out-of-bounds",kb),e.component("data-out-of-bounds-marker",xx),e.component("scroll-hint",Wo),e.component("brush-highlighter",Ix),e.scale("time",im.picassoScales.time),e.symbol("line-point",Sx),e};const Lx={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},Px=e=>void 0===e.marker?Lx.circle:Lx[e.marker],Dx=e=>void 0===e.markerFill||e.markerFill;function qx({series:e,layoutService:t}){switch(Mc(e)){case ls.TYPE.MARKER:return(e=>({marker:Px(e),fill:Dx(e)}))(e);case ls.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case ls.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function zx(e=ls.NOPE_SERIES,t){return t?e.axis===ls.AXIS.PRIMARY:e.axis===ls.AXIS.PRIMARY||Mc(e)===ls.TYPE.BAR}var $x={exports:{}};var _x={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const jx="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Bx=jx;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=_x,r=Bx,i=(t=e.exports={}).re=[],o=t.safeRe=[],a=t.src=[],s=t.t={};let l=0;const u=(e,t,n)=>{const u=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),c=l++;r(e,c,t),s[e]=c,a[c]=t,i[c]=new RegExp(t,n?"g":void 0),o[c]=new RegExp(u,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),u("FULL",`^${a[s.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),u("LOOSE",`^${a[s.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),u("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),u("COERCERTL",a[s.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}($x,$x.exports);var Fx=$x.exports;const Hx=Object.freeze({loose:!0}),Vx=Object.freeze({});var Ux=e=>e?"object"!=typeof e?Hx:e:Vx;const Yx=/^[0-9]+$/,Wx=(e,t)=>{const n=Yx.test(e),r=Yx.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var Xx={compareIdentifiers:Wx,rcompareIdentifiers:(e,t)=>Wx(t,e)};const Gx=Bx,{MAX_LENGTH:Kx,MAX_SAFE_INTEGER:Jx}=_x,{safeRe:Zx,t:Qx}=Fx,eS=Ux,{compareIdentifiers:tS}=Xx;var nS=class e{constructor(t,n){if(n=eS(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Kx)throw new TypeError(`version is longer than ${Kx} characters`);Gx("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?Zx[Qx.LOOSE]:Zx[Qx.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Jx||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Jx||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Jx||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<Jx)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Gx("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),tS(this.major,t.major)||tS(this.minor,t.minor)||tS(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(Gx("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return tS(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(Gx("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return tS(e,r)}while(++n)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===tS(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const rS=nS;var iS=(e,t,n=!1)=>{if(e instanceof rS)return e;try{return new rS(e,t)}catch(e){if(!n)return null;throw e}};const oS=iS;var aS=(e,t)=>{const n=oS(e,t);return n?n.version:null};const sS=iS;var lS=(e,t)=>{const n=sS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const uS=nS;var cS=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new uS(e instanceof uS?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const dS=iS;var mS=(e,t)=>{const n=dS(e,null,!0),r=dS(t,null,!0),i=n.compare(r);if(0===i)return null;const o=i>0,a=o?n:r,s=o?r:n,l=!!a.prerelease.length;if(!!s.prerelease.length&&!l)return s.patch||s.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};const hS=nS;var pS=(e,t)=>new hS(e,t).major;const fS=nS;var gS=(e,t)=>new fS(e,t).minor;const yS=nS;var vS=(e,t)=>new yS(e,t).patch;const bS=iS;var xS=(e,t)=>{const n=bS(e,t);return n&&n.prerelease.length?n.prerelease:null};const SS=nS;var ES=(e,t,n)=>new SS(e,n).compare(new SS(t,n));const MS=ES;var CS=(e,t,n)=>MS(t,e,n);const TS=ES;var OS=(e,t)=>TS(e,t,!0);const AS=nS;var RS=(e,t,n)=>{const r=new AS(e,n),i=new AS(t,n);return r.compare(i)||r.compareBuild(i)};const wS=RS;var NS=(e,t)=>e.sort(((e,n)=>wS(e,n,t)));const IS=RS;var kS=(e,t)=>e.sort(((e,n)=>IS(n,e,t)));const LS=ES;var PS=(e,t,n)=>LS(e,t,n)>0;const DS=ES;var qS=(e,t,n)=>DS(e,t,n)<0;const zS=ES;var $S=(e,t,n)=>0===zS(e,t,n);const _S=ES;var jS=(e,t,n)=>0!==_S(e,t,n);const BS=ES;var FS=(e,t,n)=>BS(e,t,n)>=0;const HS=ES;var VS=(e,t,n)=>HS(e,t,n)<=0;const US=$S,YS=jS,WS=PS,XS=FS,GS=qS,KS=VS;var JS=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return US(e,n,r);case"!=":return YS(e,n,r);case">":return WS(e,n,r);case">=":return XS(e,n,r);case"<":return GS(e,n,r);case"<=":return KS(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const ZS=nS,QS=iS,{safeRe:eE,t:tE}=Fx;var nE,rE,iE,oE,aE,sE,lE,uE,cE,dE,mE=(e,t)=>{if(e instanceof ZS)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=eE[tE.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),eE[tE.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;eE[tE.COERCERTL].lastIndex=-1}else n=e.match(eE[tE.COERCE]);return null===n?null:QS(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function hE(){if(oE)return iE;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new i(n,null,t,e):new i(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new i(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new i(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function i(e,t,n,r){if(!(this instanceof i))return new i(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}oE=1,iE=e,e.Node=i,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,i=this.head;null!==i;)r.push(t.call(n,i.value,this)),i=i.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,i=this.tail;null!==i;)r.push(t.call(n,i.value,this)),i=i.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&i<t;i++)o=o.next;for(;null!==o&&i<n;i++,o=o.next)r.push(o.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)r.push(o.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;var a=[];for(i=0;o&&i<n;i++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(i=0;i<r.length;i++)o=t(this,o,r[i]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(rE?nE:(rE=1,nE=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return iE}function pE(){if(uE)return lE;uE=1;class e{constructor(t,n){if(n=r(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof i)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,A(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),o("comparator trim",e);let g=(e=(e=e.replace(s[l.TILDETRIM],c)).replace(s[l.CARETTRIM],d)).split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options)));a&&(g=g.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),o("range list",g);const v=new Map,b=g.map((e=>new i(e,this.options)));for(const e of b){if(p(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return n.set(t,x),x}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>g(e,n)&&t.set.some((t=>g(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}lE=e;const t=function(){if(sE)return aE;sE=1;const e=hE(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),i=Symbol("allowStale"),o=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),u=Symbol("cache"),c=Symbol("updateAgeOnGet"),d=()=>1,m=(e,t,n)=>{const r=e[u].get(t);if(r){const t=r.value;if(h(e,t)){if(f(e,r),!e[i])return}else n&&(e[c]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},h=(e,t)=>{if(!t||!t.maxAge&&!e[o])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[o]&&n>e[o]},p=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;f(e,r),r=t}},f=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[u].delete(r.key),e[l].removeNode(t)}};class g{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const y=(e,t,n,r)=>{let o=n.value;h(e,o)&&(f(e,n),e[i]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};return aE=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[i]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[c]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,p(this)}get max(){return this[t]}set allowStale(e){this[i]=!!e}get allowStale(){return this[i]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[o]=e,p(this)}get maxAge(){return this[o]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),p(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[u]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!h(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,i,c){if((c=c||this[o])&&"number"!=typeof c)throw new TypeError("maxAge must be a number");const d=c?Date.now():0,m=this[r](i,e);if(this[u].has(e)){if(m>this[t])return f(this,this[u].get(e)),!1;const r=this[u].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=c,r.value=i,this[n]+=m-r.length,r.length=m,this.get(e),p(this),!0}const h=new g(e,i,m,d,c);return h.length>this[t]?(this[a]&&this[a](e,i),!1):(this[n]+=h.length,this[l].unshift(h),this[u].set(e,this[l].head),p(this),!0)}has(e){if(!this[u].has(e))return!1;const t=this[u].get(e).value;return!h(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[l].tail;return e?(f(this,e),e.value):null}del(e){f(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[u].forEach(((e,t)=>m(this,t,!1)))}},aE}(),n=new t({max:1e3}),r=Ux,i=fE(),o=Bx,a=nS,{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=Fx,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=_x,p=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(o("comp",e,t),e=S(e,t),o("caret",e),e=b(e,t),o("tildes",e),e=M(e,t),o("xrange",e),e=T(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},M=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const u=v(i),c=u||v(a),d=c||v(s),m=d;return"="===r&&m&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&m?(c&&(a=0),s=0,">"===r?(r=">=",c?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},T=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),O=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=e=>(t,n,r,i,o,a,s,l,u,c,d,m,h)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(u)?"":v(c)?`<${+u+1}.0.0-0`:v(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return lE}function fE(){if(dE)return cE;dE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}cE=t;const n=Ux,{safeRe:r,t:i}=Fx,o=JS,a=Bx,s=nS,l=pE();return cE}const gE=pE();var yE=(e,t,n)=>{try{t=new gE(t,n)}catch(e){return!1}return t.test(e)};const vE=pE();var bE=(e,t)=>new vE(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const xE=nS,SE=pE();var EE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new SE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new xE(r,n)))})),r};const ME=nS,CE=pE();var TE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new CE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new ME(r,n)))})),r};const OE=nS,AE=pE(),RE=PS;var wE=(e,t)=>{e=new AE(e,t);let n=new OE("0.0.0");if(e.test(n))return n;if(n=new OE("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new OE(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!RE(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!RE(n,i)||(n=i)}return n&&e.test(n)?n:null};const NE=pE();var IE=(e,t)=>{try{return new NE(e,t).range||"*"}catch(e){return null}};const kE=nS,LE=fE(),{ANY:PE}=LE,DE=pE(),qE=yE,zE=PS,$E=qS,_E=VS,jE=FS;var BE=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new kE(e,r),t=new DE(t,r),n){case">":i=zE,o=_E,a=$E,s=">",l=">=";break;case"<":i=$E,o=jE,a=zE,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qE(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===PE&&(e=new LE(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const FE=BE;var HE=(e,t,n)=>FE(e,t,">",n);const VE=BE;var UE=(e,t,n)=>VE(e,t,"<",n);const YE=pE();var WE=(e,t,n)=>(e=new YE(e,n),t=new YE(t,n),e.intersects(t,n));const XE=yE,GE=ES;const KE=pE(),JE=fE(),{ANY:ZE}=JE,QE=yE,eM=ES,tM=[new JE(">=0.0.0-0")],nM=[new JE(">=0.0.0")],rM=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ZE){if(1===t.length&&t[0].semver===ZE)return!0;e=n.includePrerelease?tM:nM}if(1===t.length&&t[0].semver===ZE){if(n.includePrerelease)return!0;t=nM}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=iM(i,t,n):"<"===t.operator||"<="===t.operator?o=oM(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=eM(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!QE(e,String(i),n))return null;if(o&&!QE(e,String(o),n))return null;for(const r of t)if(!QE(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=iM(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!QE(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=oM(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!QE(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!m&&!d))},iM=(e,t,n)=>{if(!e)return t;const r=eM(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},oM=(e,t,n)=>{if(!e)return t;const r=eM(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var aM=(e,t,n={})=>{if(e===t)return!0;e=new KE(e,n),t=new KE(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=rM(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const sM=Fx,lM=_x,uM=nS,cM=Xx,dM=(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>GE(e,t,n)));for(const e of a){XE(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t};var mM=X({parse:iS,valid:aS,clean:lS,inc:cS,diff:mS,major:pS,minor:gS,patch:vS,prerelease:xS,compare:ES,rcompare:CS,compareLoose:OS,compareBuild:RS,sort:NS,rsort:kS,gt:PS,lt:qS,eq:$S,neq:jS,gte:FS,lte:VS,cmp:JS,coerce:mE,Comparator:fE(),Range:pE(),satisfies:yE,toComparators:bE,maxSatisfying:EE,minSatisfying:TE,minVersion:wE,validRange:IE,outside:BE,gtr:HE,ltr:UE,intersects:WE,simplifyRange:dM,subset:aM,SemVer:uM,re:sM.re,src:sM.src,tokens:sM.t,SEMVER_SPEC_VERSION:lM.SEMVER_SPEC_VERSION,RELEASE_TYPES:lM.RELEASE_TYPES,compareIdentifiers:cM.compareIdentifiers,rcompareIdentifiers:cM.rcompareIdentifiers}),hM={BAR_IN_SECONDARY_AXIS:"0.23.1"};const pM=e=>!e||mM.lt(mM.coerce(e),mM.coerce(hM.BAR_IN_SECONDARY_AXIS)),fM=({layoutService:e})=>{const t=!pM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[ls.TYPE.BAR]:0,[ls.TYPE.LINE]:0,[ls.TYPE.MARKER]:0};return({series:r=ls.NOPE_SERIES},i)=>{const o=zx(r,t),a=Mc(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?ss.SCALE.MINOR.PRIMARY:ss.SCALE.MINOR.SECONDARY,collection:o?ss.COLLECTION.PRIMARY:ss.COLLECTION.SECONDARY,options:qx({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>Mc(e)===t)).length,i=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!i.length&&i[0],!!o.length&&o[0]].filter((e=>!!e)),s=r(n,ls.TYPE.BAR),l=r(i,ls.TYPE.BAR),u=r(o,ls.TYPE.BAR),c=e=>n.filter((t=>Mc(t)===e)),d=c(ls.TYPE.LINE).map((e=>Ul(ss.COMPONENT.POINT,e))),m=c(ls.TYPE.MARKER).map((e=>({key:Ul(ss.COMPONENT.MARKER,e),type:e.options.marker}))),h=m.map((e=>e.key)),p=[];l>0&&p.push(`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`),u>0&&p.push(`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`);const f=[...p,...d,...h],{MINI_CHART:g}=ss.COMPONENT,y=c(ls.TYPE.LINE).map((e=>Ul(g.LINE,e))),v=c(ls.TYPE.MARKER).map((e=>Ul(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${ls.AXIS.PRIMARY}`,`${g.BAR}-${ls.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:b,markers:m},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:c,isPrimary:zx}}};function gM({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function yM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Se).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=o?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:gM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function vM({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):yM({genericObjectModel:e,layoutService:t})}const bM=e=>"number"==typeof e&&!Number.isNaN(e);function xM({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>Mc(e.series)===ls.TYPE.BAR)),a=i.filter((e=>Mc(e.series)===ls.TYPE.LINE)),s=i.filter((e=>Mc(e.series)===ls.TYPE.MARKER));return{min:Math.min(...i.filter((e=>bM(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>bM(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>bM(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>bM(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>bM(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>bM(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>bM(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>bM(e.qMax))).map((e=>e.qMax)))}}}}function SM({isPrimary:e,layoutService:t,seriesModel:n}){const r=xM({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(ls.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function EM({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,i=n.query.series(ls.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!r||i<2?xM({isPrimary:e,layoutService:t,seriesModel:n}):SM({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Mc(e)===ls.TYPE.BAR)),d=Number((c?Math.min(n,0):n).toFixed(13)),m=Number((c?Math.max(r,0):r).toFixed(13)),h=Number((c?Math.min(s.min,0):s.min).toFixed(13)),p=Number((c?Math.max(s.max,0):s.max).toFixed(13)),f=Number((c?Math.min(l.min,0):l.min).toFixed(13)),g=Number((c?Math.max(l.max,0):l.max).toFixed(13)),y=Number((c?Math.min(u.min,0):u.min).toFixed(13)),v=Number((c?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p:0,o.implicit.line.min=Number.isFinite(f)?f:0,o.implicit.line.max=Number.isFinite(g)?g:0,o.implicit.marker.min=Number.isFinite(y)?y:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}const MM=.2;function CM({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function TM({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=Lr().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=r.domain();return 0!==e&&0!==a&&(o.start=r(e)>n),0!==t&&0!==s&&(o.stop=r(t)<1-n),o}({min:e,max:t,threshold:r,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const OM=50,AM=100,RM=200,wM=125,NM=e=>{switch(e){case.5:return OM;case 1:return AM;case 2:return RM;default:return e*wM}};function IM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=function({config:{measureAxesRef:e},layoutService:t,size:n}){const r=t.getLayoutValue(`${e}.spacing`,1),i=NM(r);return Math.max(1,Math.round(n/i))}({config:e,layoutService:n,size:o}),u=TM({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},m="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[m],p=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(p),t=e.some(((t,n)=>e.indexOf(t)!==n));return!t&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!f();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}const kM=.3;function LM({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function PM({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}const DM=10;function qM({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=TM({min:r,max:i,count:DM,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(DM),l=function({ticks:e}){const t=Math.round(e.length*kM),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?LM:PM;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c),m=d.some(((e,t)=>d.indexOf(e)!==t));return m&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function zM({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function $M({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=IM({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return CM({extrema:i,ticks:u.ticks})?u:qM({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:u,count:1}),h=[...zM({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return{min:c,max:d,values:h}}function _M({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-t*MM*Math.sign(t),max:n+n*MM*Math.sign(n)}}({extrema:o});return $M({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function jM({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=z.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return _M({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function BM({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return be.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function FM({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:ls.TYPE.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===ls.TYPE.LINE?2:t!==ls.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==ls.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function HM({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function VM({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u,styleModel:c}){let d;const{theme:m,translator:h}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=A({picasso:s,model:o,app:n,translator:h,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:ss.SCALE.COLOR}},config:{auto:HM,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,u={eventName:"legend-c",key:ss.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",styleOverrides:{title:s.query.legend.title.getStyle(),label:s.query.legend.label.getStyle()},rtl:"rtl"===l.direction,settings:FM({layoutService:n,seriesModel:r,colorService:o})},{components:c,interactions:d}=o.getLegend(u,{actions:a,navigationDisabled:!a.interact.enabled()}),m=o.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=m[`${ss.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:u,chart:r,environment:i,colorService:d,seriesModel:l,layoutService:a,actions:e,styleModel:c});p.wrappedScales=o,p.legendComponents=t,p.legendInteractions=n}}}),d}const UM="REJECTED",YM=()=>{},WM=1e4,XM={MULTIPLIER:2,MINIMUM:20,MAXIMUM:200},GM=50,KM=10,JM=100;var ZM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-KM<=t.qTop,i=n.qLeft+n.qWidth+KM>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+KM>=t.qTop+t.qHeight,a=n.qLeft-KM<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var QM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-KM<=t.qTop,i=n.qTop+n.qHeight+KM>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var eC={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const tC="pages";const nC="discretePan",rC=10;function iC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:nC,pointers:1,threshold:rC,enable(r,i){return this.started===nC||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{[`${nC}start`](e){e.preventDefault(),this.started=nC;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-rC:rC},[`${nC}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${nC}end`](e){e.preventDefault(),this.started=!1},[`${nC}cancel`](e){e.preventDefault(),this.started=!1}}}}function oC({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=Math.sign(-a)*JM;r.scroll(s)}}function aC({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(WM/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(XM.MAXIMUM,n));return{width:e,height:Math.max(XM.MINIMUM,Math.min(n*XM.MULTIPLIER,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function sC(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(UM),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(UM),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(UM),n=null)},i}const lC={command:{update:()=>{}}};function uC({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=lC,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:aC({layoutService:r}),request:u({layoutService:r,definitionPath:o}),process:sC(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==UM)throw e}))}),GM);return function(e,{onProcessing:t=YM,onDataPage:n=YM}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var cC={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var dC={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function mC(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function hC(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function pC(e){return hC(e.qMatrix,(e=>e[0].qElemNumber))-1}var fC={inTotal:function({layoutService:e}){const t=mC(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=mC(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=mC(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=pC(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const gC=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1),yC=(e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n};function vC(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return gC(e,n);const r=yC(t.qMatrix,n);return r.successful?r.count:gC(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return gC(e,n);return hC(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var bC={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=vC(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:u}=n,c=vC(t).area(e(),l,a.qArea),d=pC(a),m=a.qArea.qHeight+d,h=u===o?(r.inView-m)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+m/r.inView]}};function xC({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=m;switch(f){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:u,fontSize:c,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:u,fontSize:c,text:"M"});if(!t)return m>o;const h=(90-d)*(Math.PI/180);return m>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:m,label:y})?v/d:l:v/d}}function SC({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:u}){const{inTotal:c,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?cC:n?r?fC:bC:dC}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,f=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=c({layoutService:r});return{inTotal:l,inView:xC({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(WM/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,f(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&u?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=f(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function EC({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:h}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const p=SC({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:h}),f=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=f(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:r})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",p.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=g({pixelOffset:u,items:a});m.preventSet("viewRange",p.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=p.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:c.start,items:a})),m.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function MC({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:h,areaBuffer:p,processDataPage:f=(()=>{})}={}}){const g=C(),y=function({qMode:e}){switch(e){case"S":default:return ZM;case"K":return QM;case"T":return eC}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(tC,[]),{add:t=>{const n=e.get(tC);n.length=0,n.push(t)},getCurrent:()=>e.get(tC)[0],getAll:()=>e.get(tC),contains:n=>t(e.get(tC)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=uC({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,processDataPage:f}),S=EC({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:h,areaBuffer:b,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),T=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[iC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:oC({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:S});return{interactions:T,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var CC={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function TC({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:e,defaultValue:t})=>n&&Object.hasOwnProperty.call(n,e)?n[e]:t}function OC({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:i,LINE:o,POINT:a}=tu,s=n.getStyles(),l=TC({layoutService:e,key:"bar"}),u=TC({layoutService:e,key:"line"}),c=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?i.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>l({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!c(),getStrokeWidth:()=>c(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:i.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y,v,b,x,S,E;return{fill:null!==(e=null===(t=d("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,useContrastColor:null===(a=null===(l=d("bar"))||void 0===l||null===(u=l.bar)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.useContrastColor)||void 0===a||a,fontSize:null!==(h=null===(p=d("bar"))||void 0===p||null===(f=p.bar)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.value)||void 0===y?void 0:y.fontSize)&&void 0!==h?h:s.label.value.numFontSize,fontFamily:null!==(v=null===(b=d("bar"))||void 0===b||null===(x=b.bar)||void 0===x||null===(S=x.label)||void 0===S||null===(E=S.value)||void 0===E?void 0:E.fontFamily)&&void 0!==v?v:s.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>u({property:"lineCurve",defaultValue:o.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>u({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?o.WIDTH.FULL.DEFAULT:o.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=u({property:"lineType",defaultValue:o.TYPE.SOLID});return e&&o.TYPE[e.toUpperCase()]}},point:{getSize:()=>u({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT}),label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y;return{fill:null!==(e=null===(t=d("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=d("line"))||void 0===l||null===(u=l.line)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(h=null===(p=d("line"))||void 0===p||null===(f=p.line)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.value)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(i=null===(o=d("axis"))||void 0===o||null===(a=o.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.axis.title.fontSize,color:null!==(u=null===(c=d("axis"))||void 0===c||null===(m=c.axis)||void 0===m||null===(h=m.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p,f,g,y;return{fill:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.name)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=d("axis"))||void 0===l||null===(u=l.axis)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.name)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(h=null===(p=d("axis"))||void 0===p||null===(f=p.axis)||void 0===f||null===(g=f.label)||void 0===g||null===(y=g.name)||void 0===y?void 0:y.fontFamily)&&void 0!==h?h:s.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.title.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.title.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.title)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.legend.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,p;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.label)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.label.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.label)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.label.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.label)||void 0===h||null===(p=h.color)||void 0===p?void 0:p.color)&&void 0!==u?u:s.legend.label.color}}}}}}}function AC({dataset:e,data:t,valueData:n}){var r;const{source:i,label:o,value:a}=n,s=e(i.key).field(i.field);return fe.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a):o}function RC({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,propertiesModel:l,custom:u}){const c=s.getStyles(),d=({data:e})=>e.major.value,m=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:h}=ss.COMPONENT,{PRIMARY:p,SECONDARY:f}=ls.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=ss.COMPONENT,{PRIMARY:a,SECONDARY:s}=ls.AXIS,{orientation:l}=e.meta.chart,u="vertical"===l,c=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:m}=l,h=m===n.MAJOR?d.data.value:d.data.major.value;if(u){const t=e.findShapes("container").find((e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===h&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const p=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===h));if(u&&p)return{key:p.key,bounds:p.bounds};const f=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===h)),g=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===h));if(u&&f&&!g.find((e=>e.data.end.source.field!==f.data.end.source.field)))return{key:f.key,bounds:f.bounds};const y=p||f;return!(u||!y||g.find((e=>e.data.end.source.field!==y.data.end.source.field)))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:i,seriesModel:o});return R({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:ss.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...o.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...o.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...o.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[ss.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${h}-max-${p}`,`${h}-max-${f}`,`${h}-min-${p}`,`${h}-min-${f}`,`${ss.COMPONENT.BAR_OOB}-max-${p}`,`${ss.COMPONENT.BAR_OOB}-max-${f}`,`${ss.COMPONENT.BAR_OOB}-min-${p}`,`${ss.COMPONENT.BAR_OOB}-min-${f}`,`${ss.COMPONENT.DATA_OOB_MARKER}-max`,`${ss.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:d,filter:m},placement:g},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:m},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),d||(c.push(r.color({nodes:t,property:ss.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return r.measure({label:i.dataset.title(s,l),value:AC({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>r.raw({value:u.createImageRow({value:t,h:e})})))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:ss.COMPONENT.LEGEND_TOOLTIP,component:ss.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:wC}=im,NC=({picasso:e,chart:t,environment:m,flags:h,viewState:p,viewCache:f,actions:g,selectionService:y})=>{const v=a(),{width:b,height:x}=i(),[S,M]=n(),[C,T]=n(),O=s(),A=l(),R=u(),L=c(),P=d();r((()=>{if(!(v&&null!=t&&t.update&&m&&p))return;const n=w({source:v,metaAdditionsFn:function({layout:e}){var t,n,r;const i=E(e,"qHyperCube.qMeasureInfo",[]),o=i.some((({series:e=ls.NOPE_SERIES})=>Mc(e)===ls.TYPE.LINE)),a=be.continuous(e,(()=>o&&he.isTime(!0,e))),s=!pM(E(e,"version","")),l=i.filter((({series:e=ls.NOPE_SERIES})=>Mc(e)===ls.TYPE.BAR)),u=l.length,c=l.filter((({series:e=ls.NOPE_SERIES})=>e.axis!==ls.AXIS.SECONDARY)).length,d=l.filter((({series:e=ls.NOPE_SERIES})=>e.axis===ls.AXIS.SECONDARY)).length,m=s?c>1||d>1:u>1,h=("grouped"!==E(e,"barGrouping.grouping")||a)&&m,p=!h&&u>1,f=s&&h&&(c>0&&d>1||c>1&&d>0),g=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:he.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:he.isTime(a,e),isSnapshot:be.snapshot(e),isBarSeriesStacked:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f,isGrouped:p||f,isGroupedByMeasure:p||f,isDimensionLocked:g,groupSize:f?2:u,hasLineSeries:o}}}),{options:r,translator:i}=m,{direction:o,viewState:a={}}=r,s="rtl"===o,{legendScrollOffset:l,scrollOffset:u}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;p.preventSet("scrollOffset",u),p.preventSet("legendScrollOffset",l),p.preventSet("title",n.getLayoutValue("title"));const c=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=vM({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:O,layoutService:n}),d=N({chart:t,layoutService:n,config:{logicalSize:{width:b,height:x},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=fM({layoutService:n,flags:h}),C=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return MC({chart:e,actions:s,componentKey:om(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:CC,options:{axisKey:ss.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:d,seriesModel:S,viewState:p,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,T=n.meta.isContinuous?wC({model:O,layoutService:n,viewState:p,viewCache:f}):void 0,D=I({theme:m.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),q=OC({layoutService:n,dockService:d,themeService:D,flags:h}),z=VM({actions:g,appLayoutModel:R,appModel:A,chart:t,environment:m,flags:h,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:S,viewState:p,styleModel:q}),$=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`,o=n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:o}}({layoutService:n,seriesModel:S}),_=EM({isPrimary:!0,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:T,flags:h}),j=EM({isPrimary:!1,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:T,flags:h}),B=jM({config:{measureAxesRef:"measureAxes.0",formatter:ss.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:_,dockService:d,seriesModel:S,themeService:D}),F=jM({config:{measureAxesRef:"measureAxes.1",formatter:ss.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:j,dockService:d,seriesModel:S,themeService:D}),H=BM({genericObjectModel:O,layoutService:n}),V=Rs({flags:h,layout:v,app:A,model:O,picasso:e,chart:t,translator:i,localeInfo:R.qLocaleInfo,embed:P,options:r}),U=RC({chart:t,actions:g,translator:i,rtl:s,dockService:d,seriesModel:S,colorService:z,themeService:D,propertiesModel:H,custom:V}),Y=os({layoutService:n,discreteModel:C}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:ss.SCALE.MAJOR,MAJOR_INNER:ss.SCALE.MAJOR_INNER,MINOR:{PRIMARY:ss.SCALE.MINOR.PRIMARY,SECONDARY:ss.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${ss.COMPONENT.BAR}-${ls.AXIS.PRIMARY}`,BAR_SECONDARY:`${ss.COMPONENT.BAR}-${ls.AXIS.SECONDARY}`,AXIS:{MAJOR:ss.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:ss.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:ss.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:ss.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:ss.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:ss.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:ss.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:ss.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:ss.COLLECTION.MAIN}}}}(n),X=k({picassoInstance:e,plugins:L,pluginArgs:W});M({selectionService:y,genericObjectModel:O,appModel:A,dockService:d,styleModel:q,layoutService:n,fieldModel:$,seriesModel:S,reducedModel:c,primaryExtremumModel:_,secondaryExtremumModel:j,primaryTickModel:B,secondaryTickModel:F,propertiesModel:H,colorService:z,themeService:D,appLayoutModel:R,tooltipService:U,flags:h,...C&&{discreteModel:C},...T&&{continuousModel:T},refLineModel:Y,pluginService:X})}),[v,O,A,R,m,null==t?void 0:t.update,p]);const[,D]=o((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:i,propertiesModel:o,continuousModel:a,discreteModel:s,pluginService:l}=S,u=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),i=!e.meta.isSnapshot&&(null==m||null===(t=m.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return i&&p.preventSet("zoom",i),r}:()=>Promise.resolve(),c=t.initialize().then((()=>{const e=t.getSettings().field;y&&y.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([l.initialize(),n.command.initialize(),O?o.command.initialize():Promise.resolve(),c,u(),g.scroll.attachDiscreteModel(s)]).then((()=>Promise.all([r.command.initialize(),i.command.initialize()]).then((()=>T(S)))))}),[S]);if(D)throw D;return C};const IC={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"}}]};const kC={query:{getCanScroll:()=>!0}};function LC({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function PC({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===ss.COMPONENT.LEGEND_CATEGORICAL}),r()}function DC({chart:e,actions:t}){const i=b(),o=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!i)return null;const n=e.scale(ss.SCALE.MAJOR),r=P({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:LC},selectionEvents:{start:PC}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&o&&s.setLayout(o)}),[o]),s}const qC={version:"1.26.6",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var zC=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=Mc(n[e].qDef.series),i===ls.TYPE.BAR?r[0]=1:i===ls.TYPE.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},$C=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===ls.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===ls.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function _C(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&Mc(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===ls.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function jC(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:zC(t),added(e,t){Es.addCallbackCustomTooltip(t)},moved(e,t){Es.moveCallbackCustomTooltip(t,e)},removed(e,t){Es.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){Es.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:$C(t),added({qDef:e},t){var n;_C(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:ls.TYPE.LINE,axis:ls.AXIS.SECONDARY}:e.series={type:ls.TYPE.BAR,axis:ls.AXIS.PRIMARY})},moved(e,t){_C(t)}}}}function BC(e){const t=jC(e);return{properties:qC,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&ie(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const FC=({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,ss.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),u.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,ss.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const HC=(e,t,n,r)=>{const i=`${t}.fontFamily`,o=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function VC(e,t,n){const r=D({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...HC("bar.label.value","label.value",r,t),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:HC("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:HC("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:HC("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:HC("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:HC("legend.label","legend.label",r,t)}}}:void 0}};const i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",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"}]},o={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${i.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>Mc(e.qDef.series)===ls.TYPE.LINE));return!be.continuous(n.layout,r&&he.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01},s={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},l={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},u={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},c={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>Mc(e.qDef.series)===ls.TYPE.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:i.defaultValue,strokeColor:o.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:s.defaultValue,lineThickness:l.defaultValue,lineType:u.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:i,barStrokeColor:o,barWidth:a}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:s,lineThickness:l,lineType:u,lineCurve:c}}}}}}}const UC={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function YC(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ls.NOPE_SERIES})=>Mc(e)===ls.TYPE.LINE));return be.continuous(e,(()=>t&&he.isTime(!0,e)))}function WC(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function XC(e){var t,n,r;return WC(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function GC(e){var t,n;return WC(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function KC(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function JC(e){return GC(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function ZC(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...KC(n),...JC(e)]:JC(e)}(t,n,e)))}function QC(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||YC(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ls.TYPE.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ls.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>WC(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:XC},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:GC}}}}}}}}}}}}const eT=10,tT=!0;function nT(e,t,n){let r;const i=n||0;var o,a;t?r=t.getMeasureLayouts():r=null!==(o=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==o?o:[];return r.filter((e=>{const{series:t}=e||{};return 0===i?zx(t,tT):!zx(t,tT)}))}function rT(e,t){return t.getMeasures().filter((e=>Mc(e.qDef.series)===ls.TYPE.LINE)).length>0}function iT(e,t,n){const r=t.getMeasures().filter((e=>Mc(e.qDef.series)===ls.TYPE.BAR));return r.filter((e=>e.qDef.series.axis!==ls.AXIS.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===ls.AXIS.SECONDARY)).length>n}const oT=(e,t,n,r)=>{const i="vertical"===t.layout.orientation||YC(t.layout)?"y":"x",o=nT(e,t,r).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function aT(e){var t,n,r,i,o;const{translator:a,flags:s,anything:l}=e,u=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,c=null==e||null===(r=e.anything)||void 0===r||null===(i=r.sense)||void 0===i||null===(o=i.isUnsupportedFeature)||void 0===o?void 0:o.call(i,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>ZC(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>WC(e)))}}},m=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const h=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!m(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!m(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),p=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>WC(e)))||!s.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||h(e,t))},f={items:{disclaimer:{show:(e,t)=>p(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!p(e,t)}}},g={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&iT(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&rT(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>a.get(nT(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&nT(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&nT(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},y={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?UC:void 0,simpleLabels:g,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:VC(s,u,a),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>iT(0,t,1)&&!YC(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>YC(n.layout),convertFunctions:(v="vertical",{get:(e,t,n)=>YC(n.layout)?v:e(t.type),set(e,t,n,r){t(n.type,YC(r.layout)?v:e,v)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!YC(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>rT(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>rT(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>iT(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:f,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||YC(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let i;return i=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),i},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||YC(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!YC(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:eT,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=eT:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!c}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>oT(e,t,a,0),show:(e,t)=>nT(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>oT(e,t,a,0),show:(e,t)=>nT(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&zx(null==e?void 0:e.series,tT)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&nT(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||YC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&nT(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>nT(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.0.autoMinMax",!1),M(i,"measureAxes.0.minMax","min"),M(i,"measureAxes.0.min",0)):M(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>oT(e,t,a,1),show:(e,t)=>nT(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>oT(e,t,a,1),show:(e,t)=>nT(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!zx(null==e?void 0:e.series,tT)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&nT(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||YC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&nT(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>nT(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.1.autoMinMax",!1),M(i,"measureAxes.1.minMax","min"),M(i,"measureAxes.1.min",0)):M(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var v;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(y.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});const b={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,i;if(null!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;return!YC(n.layout)}}}},measures:QC(e)}},x={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>zx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,tT)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!zx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,tT)},dimRefLines:{uses:"dimReflines"}}};return{type:"items",component:"accordion",items:{data:b,sorting:{uses:"sortingWithDisclaimer"},addons:x,settings:y}}}function sT(e){return e.qHyperCubeDef.qMeasures.filter((e=>Mc(e.qDef.series)===ls.TYPE.LINE)).length>0}function lT(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>sT(e)||!YC(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>Mc(e.qDef.series)===ls.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===ls.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ls.AXIS.SECONDARY)).length>1:n.length>1}(e,!pM(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!YC(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!YC(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>sT(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>sT(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>WC(e)))}}}}}}const uT={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function cT(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=uT[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function dT(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});cT(r,o,t,n,"bar"),cT(r,o,t,n,"line"),cT(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function mT(e){const t={},{tooltip:n}=e;if(n){var r,i;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const hT=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function pT(e){return{definition:aT(e),softDefinition:lT(),support:{snapshot:hT,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:dT,extendMetrics:mT,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:jC(e),defaultPropertyValues:a,hypercubePath:i,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&ie(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),ZC(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){var t,n;e.qHyperCubeDef.qDimensions.forEach(wt),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(n=t.qHyperCubeDef)&&void 0!==n&&n.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(wt)}(e),function(e){return pM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ls.NOPE_SERIES),void 0===t.series.type&&(t.series.type=ls.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===ls.TYPE.BAR?ls.AXIS.PRIMARY:ls.AXIS.SECONDARY),t.series.type===ls.TYPE.BAR&&t.series.axis===ls.AXIS.SECONDARY&&(t.series.axis=ls.AXIS.PRIMARY)})),e.version=hM.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}}));