@nebula.js/sn-combo-chart 1.35.3 → 1.35.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.35.3
2
+ * @nebula.js/sn-combo-chart v1.35.4
3
3
  * Copyright (c) 2025 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","qlik-chart-modules/react","qlik-object-conversion"],function(e){"use strict";var t,n,r,i,o,a,s,l,c,u,m,d,h,p,f,g,y,v,S,M,E,x,b,C,A,N,O,T,L,I,R,k,w,D,q,P,z,$,_,B,F,V,j,H,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,m=e.useEmbed,d=e.useOptions,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,y=e.useLayout,v=e.useAction,S=e.useSelections,M=e.onTakeSnapshot,E=e.useImperativeHandle},function(e){x=e.getValue,b=e.setValue,C=e.createColor,A=e.cache,N=e.debouncer,O=e.throttler,T=e.pointLabelComponent,L=e.colorService,I=e.disclaimerService,R=e.tooltipService,k=e.layoutService,w=e.alternativeService,D=e.dockService,q=e.themeService,P=e.pluginService,z=e.storage,$=e.selectionService,_=e.fontResolver},function(e){B=e.default},function(e){F=e.default},function(e){V=e.default},function(e){j=e.reactRenderer,H=e.axisTitleComponent,U=e.disclaimerComponent},function(e){Y=e.default}],execute:function(){e("default",function(e){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(K).forEach(t=>{e.add(K[t])})}}(e.translator);const{flags:i}=e,a=e.anything?.sense?.isUnsupportedFeature,s=Kd();return{qae:_g(e),ext:vy(e),component(){const e=function(){const[e,t]=n();return r(()=>t(A()),[]),e}(),l=function(){const[e,t]=n();return r(()=>{t(z({viewRange:[0,1],scrollOffset:void 0}))},[]),e}(),c=function(){const e=d(),t=h(),i=m(),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),c=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)=>{const n=o[e]?.indexOf(t);n>-1&&o[e].splice(n,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}}(),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n(!1),s=y(),l=h(),c=!!s.qSelectionInfo.qInSelections,u=!!s.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne;r(()=>{e&&i(!e.select&&!e.active)},[e]);const m=e=>{a("boolean"==typeof e?e:!o)};return v(()=>({key:"lasso",label:l.get(o?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:Lg,hidden:!t||!c||u,active:o,action:m}),[c,u,o,t,l.language()]),{action:m,enabled:()=>t,active:()=>o}}();let m=Ig;r(()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))},[e]);const[d]=n({});return d.scroll={enabled:()=>t&&m.query.getCanScroll(),attachDiscreteModel:e=>{m=e||Ig}},d.interact={enabled:()=>o},d.tooltip={enabled:()=>s},d.lasso=u,d.select=c,d}(),S=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:s,environment:c}),M=wg({chart:S,actions:u}),E=Tg({picasso:s,chart:S,environment:c,flags:i,viewState:l,viewCache:e,actions:u,selectionService:M});!function({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:c,onZoomChange:u}}=Xm,[,m]=o(async()=>{if(!(t?.update&&n&&r&&a&&s))return;const{layoutService:o,colorService:m,continuousModel:d,discreteModel:h,refLineModel:p,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:y}=f.meta,{options:v}=r,{viewState:S={}}=v,{legendScrollOffset:M,scrollOffset:E}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",E),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const x=()=>{p&&p.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...yd,...y]}),g.meta.isPartialUpdating=!1};function b(o=!1){const c=fd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),u=o&&[vd({models:n}),...Sd({models:n}),...m.getData()];o?(t.layoutComponents({settings:c,data:u}),g.meta.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0):t.update({settings:c,data:u})}a.onChanged("scrollOffset",x),o.meta.isContinuous&&(a.onChanged("zoom",u({layoutService:o,continuousDataModel:d},x)),a.intercept("zoom",c({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),b(!0),o.setDataPages(C),o.meta.isContinuous||await h.command.initialize(),b(!1),pa.cacheProperties({viewCache:s,layout:o.getLayout()})},[t?.update,n,r]);if(m)throw m}({picasso:s,chart:S,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u}),gd({picasso:s,chart:S,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u,isUnsupportedFeature:a}),Bg({models:E,chart:S,viewState:l})}}});var W,X,K={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function G(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J=function(){if(X)return W;X=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return W=function e(){var t,n,r,l,c,u,m=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof m&&(p=m,m=arguments[1]||{},d=2),(null==m||"object"!=typeof m&&"function"!=typeof m)&&(m={});d<h;++d)if(null!=(t=arguments[d]))for(n in t)r=s(m,n),m!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(m,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(m,{name:n,newValue:l}));return m},W}(),Z=G(J);const Q=[["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}]],ee={};Q.forEach(([e,{width:t,height:n}])=>{ee[e]={width:t,height:n}});const te={getLayoutModes:()=>ee,getLayoutMode(e,t){let n;for(n=0;n<Q.length;++n)if(e>=Q[n][1].width&&t>=Q[n][1].height)return Q[n][0];return"SPARK"}};const ne=["$date","$timestamp","$time"],re=["D","TS","T"],ie={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>ne.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&re.some(t=>t===e.qNumFormat.qType)),isTimeDimension:(e,t)=>!!(e&&t&&(ie.hasTimeTag(t)&&ie.hasUnknownFormat(t)||ie.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ie.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&ie.canBeContinuousDimension(t[0])},maxNumberOfLines:12},oe=/^[A-Z][A-z0-9_]*$/i,ae={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},se={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||oe.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]})},generateId:()=>ae.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},le=e=>se.getValue(e,"qHyperCube.qDimensionInfo",[]),ce=e=>se.getValue(e,"qHyperCube.qMeasureInfo",[]),ue=e=>se.getValue(e,"barGrouping.grouping"),me={continuous({layout:e,properties:t,auto:n}){if(!ie.canBeContinuous(e))return!1;const r=t||e;return se.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!le(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ue(e)&&(le(e).length>1||ce(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&le(e).length>1&&1===ce(e).length},groupedByMeasure(e){return this.grouped(e)&&1===le(e).length&&ce(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ue(e)&&"butterfly"!==ue(e)||this.continuous({layout:e}))&&(le(e).length>1||ce(e).length>1)},stackedByDimension(e){return this.stacked(e)&&le(e).length>1&&1===ce(e).length},stackedByMeasure(e){return this.stacked(e)&&1===le(e).length&&ce(e).length>1},simple:e=>0===le(e).length||1===le(e).length&&1===ce(e).length,snapshot:e=>!!se.getValue(e,"snapshotData")};function de(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const he=e=>{throw e.isHandled=!0,e};const pe={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?pe.getVerticalDock(t):n?pe.getOppositeDock(pe.getHorizontalDock(t)):pe.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},fe=166/26,ge=12/11,ye={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*fe)/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=ye.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=ye.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=ye.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(ye.stringWidthOverMWidth(o)+a*ge)}},ve=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Se=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Me=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ee={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ve.test(e),isRtlChar:e=>Se.test(e)||Me.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Ee.isLtrChar(r))return"ltr";if(Ee.isRtlChar(r))return"rtl"}return"ltr"}},xe={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?xe.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=Ee.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=Ee.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},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:Ee.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=Ee.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Ee.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,xe.getColorSymbol(e,t)]:[xe.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=Ee.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Ee.detectTextDirection(e.value);let l;return l=i?r?[e.value,xe.getColorSymbol(t,n)]:[xe.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 be(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ce(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ae(){}var Ne=.7,Oe=1/Ne,Te="\\s*([+-]?\\d+)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,ke=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),we=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),De=new RegExp(`^rgba\\(${Te},${Te},${Te},${Le}\\)$`),qe=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Le}\\)$`),Pe=new RegExp(`^hsl\\(${Le},${Ie},${Ie}\\)$`),ze=new RegExp(`^hsla\\(${Le},${Ie},${Ie},${Le}\\)$`),$e={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 _e(){return this.rgb().formatHex()}function Be(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ve(t):3===n?new Ye(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?je(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?je(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=ke.exec(e))?new Ye(t[1],t[2],t[3],1):(t=we.exec(e))?new Ye(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?je(t[1],t[2],t[3],t[4]):(t=qe.exec(e))?je(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pe.exec(e))?Ze(t[1],t[2]/100,t[3]/100,1):(t=ze.exec(e))?Ze(t[1],t[2]/100,t[3]/100,t[4]):$e.hasOwnProperty(e)?Ve($e[e]):"transparent"===e?new Ye(NaN,NaN,NaN,0):null}function Ve(e){return new Ye(e>>16&255,e>>8&255,255&e,1)}function je(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ye(e,t,n,r)}function He(e){return e instanceof Ae||(e=Fe(e)),e?new Ye((e=e.rgb()).r,e.g,e.b,e.opacity):new Ye}function Ue(e,t,n,r){return 1===arguments.length?He(e):new Ye(e,t,n,null==r?1:r)}function Ye(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function We(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Xe(){const e=Ke(this.opacity);return`${1===e?"rgb(":"rgba("}${Ge(this.r)}, ${Ge(this.g)}, ${Ge(this.b)}${1===e?")":`, ${e})`}`}function Ke(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ge(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return((e=Ge(e))<16?"0":"")+e.toString(16)}function Ze(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new et(e,t,n,r)}function Qe(e){if(e instanceof et)return new et(e.h,e.s,e.l,e.opacity);if(e instanceof Ae||(e=Fe(e)),!e)return new et;if(e instanceof et)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 et(a,s,l,e.opacity)}function et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tt(e){return(e=(e||0)%360)<0?e+360:e}function nt(e){return Math.max(0,Math.min(1,e||0))}function rt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}be(Ae,Fe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_e,formatHex:_e,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Be,toString:Be}),be(Ye,Ue,Ce(Ae,{brighter(e){return e=null==e?Oe:Math.pow(Oe,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ne:Math.pow(Ne,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ye(Ge(this.r),Ge(this.g),Ge(this.b),Ke(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:We,formatHex:We,formatHex8:function(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xe,toString:Xe})),be(et,function(e,t,n,r){return 1===arguments.length?Qe(e):new et(e,t,n,null==r?1:r)},Ce(Ae,{brighter(e){return e=null==e?Oe:Math.pow(Oe,e),new et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ne:Math.pow(Ne,e),new et(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 Ye(rt(e>=240?e-240:e+120,i,r),rt(e,i,r),rt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new et(tt(this.h),nt(this.s),nt(this.l),Ke(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=Ke(this.opacity);return`${1===e?"hsl(":"hsla("}${tt(this.h)}, ${100*nt(this.s)}%, ${100*nt(this.l)}%${1===e?")":`, ${e})`}`}}));const it=Math.PI/180,ot=180/Math.PI,at=.96422,st=.82521,lt=4/29,ct=6/29,ut=3*ct*ct,mt=ct*ct*ct;function dt(e){if(e instanceof ht)return new ht(e.l,e.a,e.b,e.opacity);if(e instanceof St)return Mt(e);e instanceof Ye||(e=He(e));var t,n,r=yt(e.r),i=yt(e.g),o=yt(e.b),a=pt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=pt((.4360747*r+.3850649*i+.1430804*o)/at),n=pt((.0139322*r+.0971045*i+.7141733*o)/st)),new ht(116*a-16,500*(t-a),200*(a-n),e.opacity)}function ht(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function pt(e){return e>mt?Math.pow(e,1/3):e/ut+lt}function ft(e){return e>ct?e*e*e:ut*(e-lt)}function gt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof St)return new St(e.h,e.c,e.l,e.opacity);if(e instanceof ht||(e=dt(e)),0===e.a&&0===e.b)return new St(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ot;return new St(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new St(e,t,n,null==r?1:r)}function St(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Mt(e){if(isNaN(e.h))return new ht(e.l,0,0,e.opacity);var t=e.h*it;return new ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}be(ht,function(e,t,n,r){return 1===arguments.length?dt(e):new ht(e,t,n,null==r?1:r)},Ce(Ae,{brighter(e){return new ht(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new ht(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 Ye(gt(3.1338561*(t=at*ft(t))-1.6168667*(e=1*ft(e))-.4906146*(n=st*ft(n))),gt(-.9787684*t+1.9161415*e+.033454*n),gt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),be(St,vt,Ce(Ae,{brighter(e){return new St(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new St(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Mt(this).rgb()}}));var Et={isDark:function(e){return vt(e).l<70}};function xt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}function bt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ct(e){var t;return 1===e.length&&(t=e,e=function(e,n){return bt(t(e),n)}),{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 At=Ct(bt).right,Nt=Math.sqrt(50),Ot=Math.sqrt(10),Tt=Math.sqrt(2);function Lt(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>=Nt?10:o>=Ot?5:o>=Tt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Nt?10:o>=Ot?5:o>=Tt?2:1)}function It(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>=Nt?i*=10:o>=Ot?i*=5:o>=Tt&&(i*=2),t<e?-i:i}function Rt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var kt="$";function wt(){}function Dt(e,t){var n=new wt;if(e instanceof wt)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 qt(){}wt.prototype=Dt.prototype={constructor:wt,has:function(e){return kt+e in this},get:function(e){return this[kt+e]},set:function(e,t){return this[kt+e]=t,this},remove:function(e){var t=kt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===kt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===kt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===kt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===kt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===kt&&++e;return e},empty:function(){for(var e in this)if(e[0]===kt)return!1;return!0},each:function(e){for(var t in this)t[0]===kt&&e(this[t],t.slice(1),this)}};var Pt=Dt.prototype;qt.prototype={constructor:qt,has:Pt.has,add:function(e){return this[kt+(e+="")]=e,this},remove:Pt.remove,clear:Pt.clear,values:Pt.keys,size:Pt.size,empty:Pt.empty,each:Pt.each};var zt=Array.prototype,$t=zt.map,_t=zt.slice;function Bt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ft(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vt(){}var jt=.7,Ht=1/jt,Ut="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xt=/^#([0-9a-f]{3,8})$/,Kt=new RegExp("^rgb\\("+[Ut,Ut,Ut]+"\\)$"),Gt=new RegExp("^rgb\\("+[Wt,Wt,Wt]+"\\)$"),Jt=new RegExp("^rgba\\("+[Ut,Ut,Ut,Yt]+"\\)$"),Zt=new RegExp("^rgba\\("+[Wt,Wt,Wt,Yt]+"\\)$"),Qt=new RegExp("^hsl\\("+[Yt,Wt,Wt]+"\\)$"),en=new RegExp("^hsla\\("+[Yt,Wt,Wt,Yt]+"\\)$"),tn={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 nn(){return this.rgb().formatHex()}function rn(){return this.rgb().formatRgb()}function on(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Xt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?an(t):3===n?new cn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sn(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=Kt.exec(e))?new cn(t[1],t[2],t[3],1):(t=Gt.exec(e))?new cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Jt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Zt.exec(e))?sn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qt.exec(e))?hn(t[1],t[2]/100,t[3]/100,1):(t=en.exec(e))?hn(t[1],t[2]/100,t[3]/100,t[4]):tn.hasOwnProperty(e)?an(tn[e]):"transparent"===e?new cn(NaN,NaN,NaN,0):null}function an(e){return new cn(e>>16&255,e>>8&255,255&e,1)}function sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new cn(e,t,n,r)}function ln(e,t,n,r){return 1===arguments.length?((i=e)instanceof Vt||(i=on(i)),i?new cn((i=i.rgb()).r,i.g,i.b,i.opacity):new cn):new cn(e,t,n,null==r?1:r);var i}function cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function un(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)}function mn(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function dn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function hn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fn(e,t,n,r)}function pn(e){if(e instanceof fn)return new fn(e.h,e.s,e.l,e.opacity);if(e instanceof Vt||(e=on(e)),!e)return new fn;if(e instanceof fn)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 fn(a,s,l,e.opacity)}function fn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function gn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function yn(e){return function(){return e}}function vn(e){return 1===(e=+e)?Sn: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 Sn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):yn(isNaN(e)?t:e)}Bt(Vt,on,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:nn,formatHex:nn,formatHsl:function(){return pn(this).formatHsl()},formatRgb:rn,toString:rn}),Bt(cn,ln,Ft(Vt,{brighter:function(e){return e=null==e?Ht:Math.pow(Ht,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?jt:Math.pow(jt,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:un,formatHex:un,formatRgb:mn,toString:mn})),Bt(fn,function(e,t,n,r){return 1===arguments.length?pn(e):new fn(e,t,n,null==r?1:r)},Ft(Vt,{brighter:function(e){return e=null==e?Ht:Math.pow(Ht,e),new fn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?jt:Math.pow(jt,e),new fn(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 cn(gn(e>=240?e-240:e+120,i,r),gn(e,i,r),gn(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},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Mn=function e(t){var n=vn(t);function r(e,t){var r=n((e=ln(e)).r,(t=ln(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Sn(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 En(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function xn(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]=Ln(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 bn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Cn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function An(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]=Ln(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Nn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,On=new RegExp(Nn.source,"g");function Tn(e,t){var n,r,i,o=Nn.lastIndex=On.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Nn.exec(e))&&(r=On.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:Cn(n,r)})),o=On.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 Ln(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?yn(t):("number"===i?Cn:"string"===i?(n=on(t))?(t=n,Mn):Tn:t instanceof on?Mn:t instanceof Date?bn:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?xn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?An:Cn:En))(e,t)}function In(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Rn(e){return+e}var kn=[0,1];function wn(e){return e}function Dn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function qn(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 Pn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Dn(i,r),o=n(a,o)):(r=Dn(r,i),o=n(o,a)),function(e){return o(r(e))}}function zn(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]=Dn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=At(e,t,1,r)-1;return o[n](i[n](t))}}function $n(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _n(e,t){return function(){var e,t,n,r,i,o,a=kn,s=kn,l=Ln,c=wn;function u(){return r=Math.min(a.length,s.length)>2?zn:Pn,i=o=null,m}function m(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return m.invert=function(n){return c(t((o||(o=r(s,a.map(e),Cn)))(n)))},m.domain=function(e){return arguments.length?(a=$t.call(e,Rn),c===wn||(c=qn(a)),u()):a.slice()},m.range=function(e){return arguments.length?(s=_t.call(e),u()):s.slice()},m.rangeRound=function(e){return s=_t.call(e),l=In,u()},m.clamp=function(e){return arguments.length?(c=e?qn(a):wn,m):c!==wn},m.interpolate=function(e){return arguments.length?(l=e,u()):l},m.unknown=function(e){return arguments.length?(n=e,m):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Bn(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 Fn(e){return(e=Bn(Math.abs(e)))?e[1]:NaN}var Vn,jn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hn(e){if(!(t=jn.exec(e)))throw new Error("invalid format: "+e);var t;return new Un({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Un(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Yn(e,t){var n=Bn(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")}Hn.prototype=Un.prototype,Un.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Wn={"%":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.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):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 Yn(100*e,t)},r:Yn,s:function(e,t){var n=Bn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Vn=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")+Bn(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 Xn(e){return e}var Kn,Gn,Jn,Zn=Array.prototype.map,Qn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function er(e){var t=void 0===e.grouping||void 0===e.thousands?Xn:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(Zn.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?Xn:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Zn.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Hn(e)).fill,u=e.align,m=e.sign,d=e.symbol,h=e.zero,p=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):Wn[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="=");var S="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",M="$"===d?r:/[%p]/.test(v)?a:"",E=Wn[v],x=/[defgprs%]/.test(v);function b(e){var n,r,a,d=S,b=M;if("c"===v)b=E(e)+b,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(Math.abs(e),g),y&&(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(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==m&&(C=!1),d=(C?"("===m?m:s:"-"===m||"("===m?"":m)+d,b=("s"===v?Qn[8+Vn/3]:"")+b+(C&&"("===m?")":""),x)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){b=(46===a?i+e.slice(n+1):e.slice(n))+b,e=e.slice(0,n);break}}f&&!h&&(e=t(e,1/0));var A=d.length+e.length+b.length,N=A<p?new Array(p-A+1).join(c):"";switch(f&&h&&(e=t(N+e,N.length?p-b.length:1/0),N=""),u){case"<":e=d+e+b+N;break;case"=":e=d+N+e+b;break;case"^":e=N.slice(0,A=N.length>>1)+d+e+b+N.slice(A);break;default:e=N+d+e+b}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),b.toString=function(){return e+""},b}return{format:c,formatPrefix:function(e,t){var n=c(((e=Hn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Fn(t)/3))),i=Math.pow(10,-r),o=Qn[8+r/3];return function(e){return n(i*e)+o}}}}function tr(e,t,n,r){var i,o=It(e,t,n);switch((r=Hn(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(Fn(t)/3)))-Fn(Math.abs(e)))}(o,a))||(r.precision=i),Jn(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,Fn(t)-Fn(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,-Fn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Gn(r)}function nr(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=Lt(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 tr(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=Lt(s,l,n))>0?r=Lt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Lt(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 rr(){var e=_n(wn,wn);return e.copy=function(){return $n(e,rr())},Rt.apply(e,arguments),nr(e)}Kn=er({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Gn=Kn.format,Jn=Kn.formatPrefix;var ir=new Date,or=new Date;function ar(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 ar(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 ir.setTime(+t),or.setTime(+r),e(ir),e(or),Math.floor(n(ir,or))},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 sr=ar(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});sr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ar(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):sr:null},sr.range;var lr=6e4,cr=36e5,ur=864e5,mr=6048e5,dr=ar(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()});dr.range;var hr=ar(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())*lr)/ur},function(e){return e.getDate()-1});function pr(e){return ar(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())*lr)/mr})}hr.range;var fr=pr(0),gr=pr(1),yr=pr(2),vr=pr(3),Sr=pr(4),Mr=pr(5),Er=pr(6);fr.range,gr.range,yr.range,vr.range,Sr.range,Mr.range,Er.range;var xr=ar(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()});xr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ar(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},xr.range;var br=ar(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*lr)},function(e,t){return(t-e)/lr},function(e){return e.getUTCMinutes()});br.range;var Cr=ar(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*cr)},function(e,t){return(t-e)/cr},function(e){return e.getUTCHours()});Cr.range;var Ar=ar(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/ur},function(e){return e.getUTCDate()-1});function Nr(e){return ar(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)/mr})}Ar.range;var Or=Nr(0),Tr=Nr(1),Lr=Nr(2),Ir=Nr(3),Rr=Nr(4),kr=Nr(5),wr=Nr(6);Or.range,Tr.range,Lr.range,Ir.range,Rr.range,kr.range,wr.range;var Dr=ar(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()});Dr.range;var qr=ar(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 Pr(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 zr(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 $r(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}qr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ar(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},qr.range;var _r,Br,Fr={"-":"",_:" ",0:"0"},Vr=/^\s*\d+/,jr=/^%/,Hr=/[\\^$*+?|[\]().{}]/g;function Ur(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 Yr(e){return e.replace(Hr,"\\$&")}function Wr(e){return new RegExp("^(?:"+e.map(Yr).join("|")+")","i")}function Xr(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Kr(e,t,n){var r=Vr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Gr(e,t,n){var r=Vr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Jr(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Zr(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Qr(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ei(e,t,n){var r=Vr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ti(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ni(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 ri(e,t,n){var r=Vr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function ii(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function oi(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ai(e,t,n){var r=Vr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function si(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function li(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ci(e,t,n){var r=Vr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ui(e,t,n){var r=Vr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=Vr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function di(e,t,n){var r=jr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function hi(e,t,n){var r=Vr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function pi(e,t,n){var r=Vr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fi(e,t){return Ur(e.getDate(),t,2)}function gi(e,t){return Ur(e.getHours(),t,2)}function yi(e,t){return Ur(e.getHours()%12||12,t,2)}function vi(e,t){return Ur(1+hr.count(xr(e),e),t,3)}function Si(e,t){return Ur(e.getMilliseconds(),t,3)}function Mi(e,t){return Si(e,t)+"000"}function Ei(e,t){return Ur(e.getMonth()+1,t,2)}function xi(e,t){return Ur(e.getMinutes(),t,2)}function bi(e,t){return Ur(e.getSeconds(),t,2)}function Ci(e){var t=e.getDay();return 0===t?7:t}function Ai(e,t){return Ur(fr.count(xr(e)-1,e),t,2)}function Ni(e){var t=e.getDay();return t>=4||0===t?Sr(e):Sr.ceil(e)}function Oi(e,t){return e=Ni(e),Ur(Sr.count(xr(e),e)+(4===xr(e).getDay()),t,2)}function Ti(e){return e.getDay()}function Li(e,t){return Ur(gr.count(xr(e)-1,e),t,2)}function Ii(e,t){return Ur(e.getFullYear()%100,t,2)}function Ri(e,t){return Ur((e=Ni(e)).getFullYear()%100,t,2)}function ki(e,t){return Ur(e.getFullYear()%1e4,t,4)}function wi(e,t){var n=e.getDay();return Ur((e=n>=4||0===n?Sr(e):Sr.ceil(e)).getFullYear()%1e4,t,4)}function Di(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ur(t/60|0,"0",2)+Ur(t%60,"0",2)}function qi(e,t){return Ur(e.getUTCDate(),t,2)}function Pi(e,t){return Ur(e.getUTCHours(),t,2)}function zi(e,t){return Ur(e.getUTCHours()%12||12,t,2)}function $i(e,t){return Ur(1+Ar.count(qr(e),e),t,3)}function _i(e,t){return Ur(e.getUTCMilliseconds(),t,3)}function Bi(e,t){return _i(e,t)+"000"}function Fi(e,t){return Ur(e.getUTCMonth()+1,t,2)}function Vi(e,t){return Ur(e.getUTCMinutes(),t,2)}function ji(e,t){return Ur(e.getUTCSeconds(),t,2)}function Hi(e){var t=e.getUTCDay();return 0===t?7:t}function Ui(e,t){return Ur(Or.count(qr(e)-1,e),t,2)}function Yi(e){var t=e.getUTCDay();return t>=4||0===t?Rr(e):Rr.ceil(e)}function Wi(e,t){return e=Yi(e),Ur(Rr.count(qr(e),e)+(4===qr(e).getUTCDay()),t,2)}function Xi(e){return e.getUTCDay()}function Ki(e,t){return Ur(Tr.count(qr(e)-1,e),t,2)}function Gi(e,t){return Ur(e.getUTCFullYear()%100,t,2)}function Ji(e,t){return Ur((e=Yi(e)).getUTCFullYear()%100,t,2)}function Zi(e,t){return Ur(e.getUTCFullYear()%1e4,t,4)}function Qi(e,t){var n=e.getUTCDay();return Ur((e=n>=4||0===n?Rr(e):Rr.ceil(e)).getUTCFullYear()%1e4,t,4)}function eo(){return"+0000"}function to(){return"%"}function no(e){return+e}function ro(e){return Math.floor(+e/1e3)}!function(e){_r=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,c=Wr(i),u=Xr(i),m=Wr(o),d=Xr(o),h=Wr(a),p=Xr(a),f=Wr(s),g=Xr(s),y=Wr(l),v=Xr(l),S={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:fi,e:fi,f:Mi,g:Ri,G:wi,H:gi,I:yi,j:vi,L:Si,m:Ei,M:xi,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:no,s:ro,S:bi,u:Ci,U:Ai,V:Oi,w:Ti,W:Li,x:null,X:null,y:Ii,Y:ki,Z:Di,"%":to},M={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:qi,e:qi,f:Bi,g:Ji,G:Qi,H:Pi,I:zi,j:$i,L:_i,m:Fi,M:Vi,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:no,s:ro,S:ji,u:Hi,U:Ui,V:Wi,w:Xi,W:Ki,x:null,X:null,y:Gi,Y:Zi,Z:eo,"%":to},E={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=m.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=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:oi,e:oi,f:mi,g:ti,G:ei,H:si,I:si,j:ai,L:ui,m:ii,M:li,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:ri,Q:hi,s:pi,S:ci,u:Gr,U:Jr,V:Zr,w:Kr,W:Qr,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:ti,Y:ei,Z:ni,"%":di};function x(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Fr[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 b(e,t){return function(n){var r,i,o=$r(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=zr($r(o.y,0,1))).getUTCDay(),r=i>4||0===i?Tr.ceil(r):Tr(r),r=Ar.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Pr($r(o.y,0,1))).getDay(),r=i>4||0===i?gr.ceil(r):gr(r),r=hr.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?zr($r(o.y,0,1)).getUTCDay():Pr($r(o.y,0,1)).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,zr(o)):Pr(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=E[i in Fr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return S.x=x(n,S),S.X=x(r,S),S.c=x(t,S),M.x=x(n,M),M.X=x(r,M),M.c=x(t,M),{format:function(e){var t=x(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=x(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=b(e+="",!0);return t.toString=function(){return e},t}}}(e),_r.format,_r.parse,Br=_r.utcFormat,_r.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 io=1e3,oo=6e4,ao=36e5,so=864e5,lo=2592e6,co=31536e6;function uo(e){return new Date(e)}function mo(e){return e instanceof Date?+e:+new Date(+e)}function ho(e,t,n,r,i,o,a,s,l){var c=_n(wn,wn),u=c.invert,m=c.domain,d=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),S=l("%Y"),M=[[a,1,io],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,oo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,ao],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,so],[r,2,1728e5],[n,1,6048e5],[t,1,lo],[t,3,7776e6],[e,1,co]];function E(s){return(a(s)<s?d:o(s)<s?h:i(s)<s?p:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:S)(s)}function x(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Ct(function(e){return e[2]}).right(M,o);a===M.length?(i=It(n/co,r/co,t),t=e):a?(i=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(It(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?m($t.call(e,mo)):m().map(uo)},c.ticks=function(e,t){var n,r=m(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=x(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?E:l(t)},c.nice=function(e,t){var n=m();return(e=x(e,n[0],n[n.length-1],t))?m(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)):c},c.copy=function(){return $n(c,ho(e,t,n,r,i,o,a,s,l))},c}function po(){return Rt.apply(ho(qr,Dr,Or,Ar,Cr,br,dr,sr,Br).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const fo={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"}}},go=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=fo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:go(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:go(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function vo({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 So;function Mo(){So=So||document.createElement("canvas").getContext("2d")}const Eo={measureTextWidth(e){Mo();const{width:t}=So.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Mo();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,m,d=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&&(So.font=n),o=0;o<a.length;o++){for(m=a[o]||"",d=m.split(/\s+/),[h]=d,u="",i=1;i<d.length;i++)if(l=`${h} ${d[i]}`,c=Eo.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=d[i]):h=l,"number"==typeof r&&s.length>=r){u=d.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} ${u}`}return s},wordWrap(e,t,n,r,i){if(Mo(),!e||!e.length)return[];n&&(So.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Eo.measureTextWidth(c)<=t?o.push(c):(s=Eo.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?Eo.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+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]=Eo.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&Eo.measureTextWidth(c)>t&&(o[o.length-1]=Eo.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){Mo();let i,o,a,s,l=e;const c=Eo.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(So.font=n),e&&t){if(Eo.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Eo.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;Mo();let o,a=e,s="",l=[];if(Eo.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);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),!(Eo.measureTextWidth(a)<=t));i--);return(!i&&!a||Eo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Eo.measureTextWidth(s)>t?(s=Eo.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(Mo(),e&&t?(n&&(So.font=n),Eo.explodeWord(e,t,r,Math.max(1,Eo.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Eo.lineWrap(e,t,n,r):[e],o=Eo.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Mo(),e&&(So.font=e),1.5*Eo.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Mo(),t&&(So.font=t);const s=Eo.getFontHeight(),l=a*s;let c=[],u=0,m=[];if(o<s)return[];const d=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?d-u:e)})):c=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((e,n)=>{m.length<d&&(m=m.concat(Eo.wrapText(e,i,t,c[n])))}):m=Eo.wrapText(e,i,t,c[0],n),m}},xo={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",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};Z.bind(null,!0);const bo=Math.log(10);function Co(e){return 10**e}const Ao={pow10:Co,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/bo,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/bo),r=e/Co(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*Co(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/bo);const r=e/Co(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*Co(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return Co(Math.floor(Math.log(Math.abs(e))/bo))},getFraction(e){if(0===e)return 0;return e/Co(Math.floor(Math.log(Math.abs(e))/bo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/bo),r=e/Co(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*Co(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},No=[[2,4,6],[2,4],[3]],Oo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function To(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 Lo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)To(e[r],t,n)}!function(){let e,t;for(Lo(No,1,10),e=0;e<Oo.length;e++)if(Oo[e])for(t=0;t<Oo[e].length;t++)Array.isArray(Oo[e][t])&&Lo(Oo[e][t])}();const Io={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=Io.findSegmentPositionMeetMin(e,t);return Io.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Io.findSegmentPositionMeetMax(e,n);return Io.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=Io.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Io.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 c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,Io.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=Io.findSegmentPositionMeetMaxThenMin(r,t,n))}Io.layoutPositionFromMin(e,t,n,r),Io.adjustPositionFromMax(e,t,n,r)}}},Ro=(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},ko=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,wo=e=>e.filter(ko),Do=(e,t)=>wo(se.getValue(e,t,[])),qo=e=>ko(e)&&(!1!==e.showValue||!1!==e.showLabel),Po=e=>e.filter(qo),zo=(e,t)=>Po(se.getValue(e,t,[])),$o=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,_o=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},Bo=({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},Fo=({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},Vo=({value:e,qMin:t})=>"NaN"!==t&&e<t,jo=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ho={isRefLineVisible:ko,getVisibleRefLines:wo,getRefLines:Do,getMeasureRefLines:e=>Do(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Do(e,"refLine.dimRefLines"),isRefLineLabelVisible:qo,getVisibleRefLineLabels:Po,getRefLineLabels:zo,getMeasureRefLineLabels:e=>zo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:zo(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=Ro(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=Ro(s,i,o,t),e&&e.length&&(c=(({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===c?s(n):c)+l}return l=Ro(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=se.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():se.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=se.getValue(l,c,[]),m=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+d,a=n[m];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}],dataNode:u[t]},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<u.length;e++){const t=u[e][0],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:$o,extractInfoFromInputValue:_o,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=$o({refLineLayout:e,layoutService:n});return _o(r,t,"id")},isDiscreteMinOutOfBounds:Bo,isDiscreteMaxOutOfBounds:Fo,isContinuousMinOutOfBounds:Vo,isContinuousMaxOutOfBounds:jo,isOutOfRange:({value:e,qMin:t,qMax:n})=>Vo({value:e,qMin:t})||jo({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Fo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Bo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Uo=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function Yo(e){return e.showValue?`… ${e.valueString}`:"…"}function Wo(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=Uo({label:i,labelStyle:t});i.lines=Eo.tokenize(i.title,o,Yo(i),3,n),i.maxNumLines=i.lines.length}}function Xo({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Eo.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 Ko({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>Xo({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 Go(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const Jo=3,Zo=2;function Qo({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 ea=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ho.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ho.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ho.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ho.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},ta={hasEngineFormat:Qo,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=Ho.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:m}=r.meta;let d,h;if(s&&m){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");d=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:m}=o,p=ea({label:o,dataPages:u,qMin:d,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Ho.getScaledPosition({scale:t,size:n,value:s,valueInfo:m,align:c,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=Qo({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,r.title=ta.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=Qo({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,n.title=ta.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,n.title=ta.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map(n=>t(n,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=ta.getTotalNumLines(e)-r;if(t<=0)return;ta.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,ta.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,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:m,rtl:d,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map(e=>e),y=n;ta.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:u,rtl:d,isContinuous:p,isDimension:f}),Go(e,"center"),ta.addLabelsNeighborInfo(e,r,i,o),Wo(e,a,s),ta.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(ta.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=Uo({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=Eo.tokenize(i.title,o,Yo(i),i.maxNumLines,n))}}(e,a,s)),ta.addLabelsSize(e,s,l,m),ta.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:m,fontFamily:d,fontStyle:h,fontWeight:p,textDecoration:f,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:Xo({title:e.title,font:a,ellipsis:Yo(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||m,fontFamily:e.fontFamily||d,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=Jo,padding:c={}}=a,{top:u=Zo,bottom:m=Zo,left:d=Zo,right:h=Zo}=c,p=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(d+h),height:i.height+(u+m),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+d,f.y-=p*o/2+u,f}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function na(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 ra(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return ta.getMaxTextWidth(e)>o&&(Wo(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,ta.getMaxTextWidth(e))+n+r}(t,n)}function ia(e,t){return t?e.domain():[0,1]}function oa(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 aa(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 sa(e,t){return e>9?t[1]:t[0]}function la({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:m,majorAxis:d,minorAxis:h,minorDimension:p,dock:f}=s,g=i[p],y=xo.createOob({oob:xo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:m,symbol:o});y.dock=f;const v=`c${d}`,S=`c${h}`,M={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[v]=a;const E={type:"text",text:u>9?"9+":u,title:Ko({oobs:n,font:c,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 E[h]=g/2,E[d]=a,[y,M,E]}const ca=e=>{const t=Uo({labelStyle:e}),n=Eo.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},ua=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 ma={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=ua(this.settings.labels),s=na(this.chart,this.settings.formatter,e);ta.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=ia(t,n);return oa(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return oa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let m;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=ca(t.label),{dock:n}=this.settings.layout;return ta.measureLabelsWidth(u,this.measureText),m=ra(n,u,e),m}const d=aa(this.measureText),h=l?sa(l,d):0,p=c?sa(c,d):0;return m=Math.max(h,p),m},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,c=ua(this.settings.labels),{dock:u,rtl:m}=this.settings.layout,{padding:d}=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)}(u),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,d),{orientation:f,majorDimension:g}=h,{majorSize:y}=p,v=ca(n.label),{font:S,lineHeight:M,gap:E,maxLabelWidth:x}=v,b=na(this.chart,this.settings.formatter,e),C=y;ta.addLabelTitles({labels:c,formatter:b,isContinuous:o,canBeContinuous:l,localeInfo:s}),ta.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:r,orientation:f,rtl:m,isContinuous:o,isDimension:a});const[A,N]=ia(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:I,upperCircleSize:R,lowerOobSpace:k,upperOobSpace:w}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:m,filteredLabels:d}=oa(e,t,n,c),h="scaledValue"!==c&&Ho.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(m,u,h),f=function(e,t,n){return n?e:t}(m,u,h),g=p.length,y=f.length,v=aa(l),S=sa(g,v),M=sa(y,v),E=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,S,r,s),x=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,M,r,s);return{filteredLabels:d,lowerOobs:p,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:E,upperOobSpace:x}}({labels:c,minValue:A,maxValue:N,orientation:f,rtl:m,isContinuous:o,style:n,padding:d,measureText:this.measureText,prop:o?"value":"scaledValue"}),D=k,q=y-w;Go(T),Go(L);const P=la({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+I/2,areaProps:h,radius:I/2,font:S}),z=la({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+R/2),areaProps:h,radius:R/2,font:S});ta.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:D,upperLimit:q,labelStyle:v,lineHeight:M,gap:E,maxLabelWidth:x,majorDimension:g,orientation:f,measureText:this.measureText,rtl:m,layoutService:r,isContinuous:o,isDimension:a}),Io.layout(O.map(e=>e.segment),D,q,n.label.gap);const $=O.filter(e=>Io.isInside(e.segment,D,q,o));return ta.createLabels({labels:$,style:n.label,maxLabelWidth:x,areaProps:h,area:p,lineHeight:M,font:S,theme:i}).concat([...P,...z])}};var da={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function ha(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=Z(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=da;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==x(e,t)&&b(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;x(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var pa={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,m=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u: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+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+m)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let 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=ha(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=ha(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:fa,extractInfoFromInputValue:ga,resolveValue:ya}=Ho;var va={resolveValue:ya,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=fa({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=fa({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=fa({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=fa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Sa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:m})=>{const d={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(d.scale=s,d.value=t.refLineExpr.value):(d.valueInfo=va.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),d.value=()=>{const e=Ho.getScaledPosition({scale:a.scale(s),value:va.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:d.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:m});return Number.isNaN(e)?void 0:e}),d};function Ma({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:m,path:d,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!p.length)return!1;const f={key:u,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:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return p.forEach(o=>{f.lines[l].push(Sa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:m,isContinuous:y}))}),f}const Ea=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:m,localeInfo:d})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:m,isDimension:e,localeInfo:d,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?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:pa.refLineLabels.trackBy,compensateForLayoutChanges:pa.refLineLabels.compensateForLayoutChanges}}),xa=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:m,fontStyle:d,fontWeight:h,textDecoration:p}=c||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:m,fontStyle:d,fontWeight:h,textDecoration:p,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=i,f.value=e.refLineExpr.value):(f.value=()=>va.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>va.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>va.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function ba({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:m,key:d,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=>xa({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return f.push(Ea({isDimension:e,rtl:m,style:s,dock:o,key:d,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),f}function Ca({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=me.dimensionless(o),l=Ho.getMeasureRefLines(o),c=Ho.getDimensionRefLines(o,s),u=Ho.getMeasureRefLineLabels(o),m=Ho.getDimensionRefLineLabels(o,s);let d={},h={};const p=()=>!(!c||!c.length)&&!c.every(t=>{const o=Ho.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return Ho.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 Ho.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:m,dimensionRefLineInfo:h,dimensionValuesInfo:d,query:{getRefLines:e=>Ho.getRefLines(o,e),getRefLineLabels:e=>Ho.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(d=Ho.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=d,c.forEach(t=>{const n=Ho.getInputValue({refLineLayout:t,layoutService:e});d[n]&&(h[n]?(h[n].innerValues=d[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,d[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,d[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||d[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||d[n].isMaxOrderOk):h[n]={id:d[n].id,qText:d[n].qText,innerValues:d[n].innerValues,minOrder:d[n].minOrder,maxOrder:d[n].maxOrder,isMinOrderOk:d[n].isMinOrderOk,isMaxOrderOk:d[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)}))}};return f.update(),f}function Aa(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Na({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=C(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function Oa({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(Ao.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return Ao.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const Ta=3,La=10,Ia={index:-1,color:"#595959"};function Ra({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:m,key:d}){if(!Array.isArray(m)||0===m.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p=i.getTheme(),f="horizontal"===a.meta.major.orientation,g=!(!f||!s),{canBeContinuous:y,isContinuous:v,isButterfly:S}=o.meta,M=o.getLayout(),E=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=C(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return Na({color:r,colorModel:t})}({layout:M,colorModel:h})??p.getStyle("object","","backgroundColor"),x=Ho.getDimensionValuesInfo({layout:M,canBeContinuous:y,discreteModel:n,layoutService:o}),b=v?m:m.filter(e=>!!x[e.dimensionValue]),A={};b.map(e=>e.dimensionValue).forEach(e=>{x[e]&&(A[e]?(A[e].innerValues=x[e].innerValues,A[e].minOrder=Math.min(A[e].minOrder,x[e].minOrder),A[e].maxOrder=Math.max(A[e].maxOrder,x[e].maxOrder),A[e].isMinOrderOk=A[e].isMinOrderOk||x[e].isMinOrderOk,A[e].isMaxOrderOk=A[e].isMaxOrderOk||x[e].isMaxOrderOk):A[e]={id:x[e].id,dataNode:x[e].dataNode,qText:x[e].qText,innerValues:x[e].innerValues,minOrder:x[e].minOrder,maxOrder:x[e].maxOrder,isMinOrderOk:x[e].isMinOrderOk,isMaxOrderOk:x[e].isMaxOrderOk},A[e].numInnerValues=(A[e].maxOrder||0)-(A[e].minOrder||0)+1)}),b.forEach(e=>{const t=Oa({point:e,dimensionValueInfo:A,layoutService:o});if(e.validMeasureValue=S&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=A[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=Na({colorModel:h,color:e.style?.label?.color||Ia}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const N={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===A[r])return;return Ho.getScaledPosition({scale:n,value:A[r].id,valueInfo:A[r],size:e.component(u)?.rect[f?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},O={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"point",data:b,settings:{x:f?N:O,y:f?O:N,strokeWidth:({datum:e})=>e.value.style?.lineThickness??Ta,stroke:({datum:e})=>Na({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?Na({colorModel:h,color:e.value.style?.fill}):E,size:({datum:e})=>`${e.value.style?.dataPointSize??La}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:pa.points.compensateForLayoutChanges}}}const ka=2;const wa=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,Da=!0,qa=!1,Pa={index:0,color:"none"},za={index:-1,color:"#595959"},$a={index:-1,color:"#595959"},_a=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},Ba=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},Fa=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},Va=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>ie.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!ie.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===wa(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===wa(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===wa(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=(r=n.layout,r?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0);var r}}}),ja=()=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:Pa},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:za},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:$a},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:3,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:10,min:3,max:30,step:1}}),Ha=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),Fa(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(Fa),ie.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":_a(e);break;case"line":t=e,t.points?.forEach(_a)}var t}):e.plugins.forEach(e=>{switch(e.type){case"point":Ba(e);break;case"line":t=e,t.points?.forEach(Ba)}var t}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:Va({translator:e})},styleSection:{component:"items",items:ja()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:Va({translator:e})},styleSection:{component:"items",items:ja(),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:za},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return n};var Ua=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},Ya=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return Ua.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return Ua.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||Ua.newInstanceIfNeeded(e,t,this._value)}},Wa=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new Ya);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new Wa;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var Xa={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",MARKER_LABEL:"marker-label",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",PRIMARY_LINE:"stacked-collection-primary-line",SECONDARY_LINE:"stacked-collection-secondary-line",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_PRIMARY_LINE:"reduced-collection-primary-line",REDUCED_SECONDARY_LINE:"reduced-collection-secondary-line",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ka={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const Ga={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 Ja(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Za={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,c=o[t]*(n>l?1:n/l),u=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(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},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 Qa(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}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 Za.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function es(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const m=r.data?.customTooltipAttrExps?.value||[];let d;if(-1!==u&&m[u]&&(d=m[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return Qa(s,l,i);if("url"===c)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")&&e?.getImage&&Ja(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await Za.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 Za.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,d);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&d&&d.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(Ja(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await Za.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(i,n[u],l,d)}return[]}const ts={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(es(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}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},ns={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await ts.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>ts.checkIfPromisesExist({customTooltipModel:e})};const rs=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:Ga.CHART.CHART_PARENT_TYPE,qId:Ga.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},is=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:Ga.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const os={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=Ga.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Ga.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await os.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=Ga.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 s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=Ga.CHART.STATE,o=rs(t,i),a=await e.createSessionObject(o),s=is(t);if(a.id!==Ga.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(Ga.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch(t){await os.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(os.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Ga.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Ga.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function as(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ss(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Ga.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function ls(e){const t=ss();return e.filter(e=>t[e.id])}const cs={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=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.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=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.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}=cs.getAttrExprData(a);o.length||n.length?ns.handlePromises({customTooltipModel:i,nodes:cs.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 i?.miniChartToken?.alternateState&&os.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>ns.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[Ga.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Ga.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[Ga.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(ls(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[Ga.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[Ga.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=as(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===ls(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=as(e)||[];[...i,t].forEach(e=>{const t=ls(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=ss(),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=>e.tooltip?.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:Ee.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ee.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 us(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case Ga.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Ga.CUSTOM.TITLE:case Ga.CUSTOM.DESCRIPTION:case Ga.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const ms={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>us(t,e,r,n)}}};const ds={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[Ga.CUSTOM.TITLE]:!0,[Ga.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=cs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===Ga.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===Ga.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>xe.getMeasure(e,t)),e,r)}};function hs({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(ds.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:ps}=Ga;function fs({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},m=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:cs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),d="rtl"===c.direction,h=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&x(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=hs({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===ps.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===ps.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>cs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>cs.getImageRow(e,{h:t,rtl:d}),addImages:({nodes:r})=>{const i=cs.getDataNodes(o,r),{attrExps:a}=cs.getAttrExprData(t);return ns.handlePromises({customTooltipModel:m,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(h()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>os.createContainer({layout:t,ctx:{h:e,rtl:d}}),createLimitationRow:()=>cs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),d),show:({nodes:e,properties:t})=>os.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:d}),hasAlternateState:()=>!!m.miniChartToken?.alternateState,hide:()=>os.hide({app:n,customTooltipModel:m}),destroy:()=>os.destroyVisualization({customTooltipModel:m})}}}function gs({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===Ka.TYPE.BAR),c=n.meta.isContinuous?s:a,u=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:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,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:ms.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 ys({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1,isLineSeries:s=!1}){if(t.length||a){const{major:a,majorNumeric:l}=r.main,{isContinuous:c,isLineStacked:u}=o.meta,m=e=>"NaN"!==e.qNum?e.qNum:0,d=c?l:a,h=o.getLayoutValue("separateStacking",!0),p=[{key:e,data:{extract:t.map(({ref:e,refIndex:t,typeIndex:r,options:s},l)=>({source:n,field:a,value:c?e=>e.qNum:void 0,props:{major:{field:d},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?m:void 0,reduceLabel:"none"},start:0,line:l,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:ms.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}}))}}];return s&&u&&(p[0].data.stack={stackKey:e=>e.value,value:e=>e.end.value,offset:h?"diverging":"none"},t.forEach((e,t)=>{const{props:n}=p[0].data.extract[t];n.point={field:n.end.field,label:n.end.label},n.end.value&&(n.point.value=n.end.value)})),p}return[]}function vs({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===Ka.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 Ss={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var Ms={OPTIONS:Ss,DEFAULT:Ss.MINI_CHART};function Es({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,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,m=a.qArea.qHeight/s*c;if(m<o){const e=(o-m)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+m+e-c)),m=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:m}:{top:u,left:0,height:m}}})}}function xs({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 bs=e=>({miniChart:e===Ms.OPTIONS.MINI_CHART.value,bar:e===Ms.OPTIONS.BAR.value,none:e===Ms.OPTIONS.NONE.value}),Cs=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return bs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return bs(Ms.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return bs(!n&&(r||!r&&i)?Ms.OPTIONS.NONE.value:Ms.OPTIONS.MINI_CHART.value)};function As({layoutService:e,override:t}){const n=Cs({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ms.OPTIONS.MINI_CHART.value,n.bar=t.value===Ms.OPTIONS.BAR.value,n.none=t.value===Ms.OPTIONS.NONE.value),n}function Ns({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),m=t.component(e),d="horizontal"===o.meta.major.orientation,h=d?l-u.left-m.rect.computedInner.x:c-u.top-m.rect.computedInner.y,p=d?m.rect.computedInner.width:m.rect.computedInner.height,f=d&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[y,v]=xs({layoutService:i,viewState:n,viewCache:r}),S=g<y,M=g>v,E=!S&&!M;return{pixel:f,relative:g,thumb:E?f-y*p:0,beforeThumb:S,afterThumb:M,onThumb:E}}}function Os({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:c}=a.rect.computedInner,u="horizontal"===s?l:c,[m,d]=xs({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(d-m)*u}}}function Ts({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ns({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Os({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=c(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=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Ls="data-scrollbar-handle";function Is({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ls)||""}const Rs="scrollbarResize",ks=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Ns({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Rs}`,options:{event:Rs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Rs]=this[Rs]||{},ks(t)&&Is({e:t})&&(this[Rs].panningEvent=t.srcEvent),!!this[Rs].panningEvent))}},events:{[`${Rs}start`](n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].panningEvent&&t.component(e).emit("dragStart",this[Rs].panningEvent)},[`${Rs}move`](n){if(n.preventDefault(),this[Rs]=this[Rs]||{},!this[Rs].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,m=Is({e:this[Rs].panningEvent});let d="start"===m?Math.min(u,o.max):o.min,h="end"===m?Math.max(u,o.min):o.max;d===h&&(d-="start"===m?c:0,h+="end"===m?c:0),r.set("zoom",{min:d,max:h}),t.component(e).emit("render")},[`${Rs}end`](n){n.preventDefault(),this[Rs]=this[Rs]||{},delete this[Rs].panningEvent,t.component(e).emit("dragEnd")},[`${Rs}cancel`](n){n.preventDefault(),this[Rs]=this[Rs]||{},delete this[Rs].panningEvent,t.component(e).emit("dragEnd")}}}}const Ds="scrollbarPan";function qs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ns({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Os({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ds}`,options:{event:Ds,threshold:0,enable(r,i){return this[Ds]=this[Ds]||{},!(i&&!this[Ds].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:{[`${Ds}start`](n){n.preventDefault();const a=c(n);if(this[Ds]=this[Ds]||{},this[Ds].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[Ds].relative=a.relative,this[Ds].zoom=r.get("zoom"),this[Ds].zoom.span=this[Ds].zoom.max-this[Ds].zoom.min,this[Ds].zoom.fullSpan=o-n}else if(a.onThumb)this[Ds].offset=a.thumb;else{const e=u();this[Ds].offset=a.beforeThumb?0:e.thumbSize}},[`${Ds}move`](n){n.preventDefault();const a=c(n);if(this[Ds]=this[Ds]||{},o.meta.isContinuous){const e=a.relative-this[Ds].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ds].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ds].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ds}end`](n){n.preventDefault(),this[Ds]=this[Ds]||{},this[Ds].isPanning=!1,t.component(e).emit("unlockState")},[`${Ds}cancel`](n){n.preventDefault(),this[Ds]=this[Ds]||{},this[Ds].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Ts({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),qs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function zs({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 $s={background:"rgba(0, 0, 0, 0.1)"},_s={top:-1,bottom:-1,width:6},Bs={width:2,background:"#595959"};var Fs={before:$s,after:$s,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:_s,endHandle:_s,startHandleBorder:Bs,endHandleBorder:Bs};const Vs={background:"rgba(0, 0, 0, 0.1)"},js={top:-1,bottom:-1,width:6},Hs={width:2,background:"#595959"};var Us={before:Vs,after:Vs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:js,endHandle:js,startHandleBorder:Hs,endHandleBorder:Hs};const Ys={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Ws={pointerEvents:"initial"},Xs={pointerEvents:"none"};const Ks="ew-resize",Gs="default";function Js(){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 Zs(){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?Ks:Gs}function Qs(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 el(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function tl(){const{size:e,start:t,end:n}=Js.call(this);this.renderer.render(this.elements(this.h,Qs.call(this,e,t,n)))}function nl(){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?Us:Fs;return{container:{...Ys},before:{...Ys,...n.before,...t.before},after:{...Ys,...n.after,...t.after},thumb:{...Ys,...n.thumb,...t.thumb},startHandle:{...Ys,...Ws,...n.startHandle},endHandle:{...Ys,...Ws,...n.endHandle},startHandleBorder:{...Ys,...Xs,...n.startHandleBorder},endHandleBorder:{...Ys,...Xs,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var rl={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(){tl.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||!el.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Is({e:e});t&&(this.state.hover[t]=!0),Zs.call(this),tl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Zs.call(this),tl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Is({e:e});t&&(this.state.drag[t]=!0),Zs.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Zs.call(this),tl.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}=Js.call(this);return this.elements(e,Qs.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:c,injections:u}){const m={[i.end]:t-n},d={[i.start]:r},h={left:-3},p={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?d:m},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?m:d},class:"scrollbar--after"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...c?f:h},class:"scrollbar--start-handle",[Ls]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...c?h:f},class:"scrollbar--end-handle",[Ls]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[y,M,v,...u])}({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:nl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function il({layoutService:e}){return e.meta.isContinuous&&As({layoutService:e}).miniChart}function ol({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(Ka.TYPE.LINE),l=s.filter(e=>e.isPrimary),c=s.filter(e=>!e.isPrimary),u=[...ys({forceCreate:!0,key:Xa.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...ys({key:Xa.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...ys({key:Xa.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...ys({key:Xa.COLLECTION.PRIMARY_LINE,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...ys({key:Xa.COLLECTION.SECONDARY_LINE,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...gs({key:Xa.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...gs({key:Xa.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...vs({key:Xa.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...vs({key:Xa.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return il(e)&&(u.push(...ys({key:Xa.COLLECTION.REDUCED,source:Xa.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),u.push(...ys({key:Xa.COLLECTION.REDUCED_PRIMARY_LINE,source:Xa.DATA.REDUCED,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ys({key:Xa.COLLECTION.REDUCED_SECONDARY_LINE,source:Xa.DATA.REDUCED,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ys({key:Xa.COLLECTION.REDUCED_PRIMARY,source:Xa.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),u.push(...ys({key:Xa.COLLECTION.REDUCED_SECONDARY,source:Xa.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),u.push(...gs({key:Xa.COLLECTION.REDUCED_STACKED_PRIMARY,source:Xa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter(e=>e.type===Ka.TYPE.BAR),colorService:i})),u.push(...gs({key:Xa.COLLECTION.REDUCED_STACKED_SECONDARY,source:Xa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter(e=>e.type===Ka.TYPE.BAR),colorService:i}))),u}const al=({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 sl({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 ll=({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:al({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:sl({models:e})}},cl=({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:al({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:sl({models:e})}};function ul({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 ml({viewCache:e,mainMajor:t}){return Z(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function dl({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 hl({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,m=l.getStyles(),d={type:"time",data:{field:u},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:u,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=>c({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:dl({viewState:t,viewCache:n,layoutService:o})};return{[Xa.SCALE.MAJOR]:Z(!0,{},d,{ticks:{level:"outer"}}),[Xa.SCALE.MAJOR_INNER]:Z(!0,{},d,{ticks:{level:"inner"}})}}function pl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...hl({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[Xa.SCALE.MAJOR]:ul({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[Xa.SCALE.MAJOR]:cl({models:t,environment:i})}:{[Xa.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?cl({models:t,environment:i}):ll({models:t,environment:i})};return il(t)?{...a,[Xa.SCALE.REDUCED]:ml({viewCache:r,mainMajor:a[Xa.SCALE.MAJOR]})}:a}function fl({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 gl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!il({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}}var yl={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 vl=["all","labels"];function Sl({models:e,flags:t}){const{layoutService:n,dockService:r,seriesModel:i,themeService:o,styleModel:a,animationsModel:s}=e,l=n.getLayoutValue("measureAxes");if(!l||!l.length)return[];const c=o.getStyles(),u=a.query.axis.label.getStyle(),{measureAxes:m}=i.meta;return m.filter(e=>{const t=e.isPrimary?0:1;return vl.some(e=>l[t].show===e)}).map(e=>({type:"axis",key:e.isPrimary?Xa.COMPONENT.AXIS.MINOR.PRIMARY:Xa.COMPONENT.AXIS.MINOR.SECONDARY,renderer:Aa(t),scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:yl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:c.axis.line.major.color},ticks:{stroke:c.axis.line.major.color},minorTicks:{stroke:c.axis.line.minor.color}},animations:{enabled:s.enabled,trackBy:pa.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock})}}))}var Ml={INACTIVE:.5},El={LOWER:3,UPPER:13};const xl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ye.getAdjustedMaxGlyphCount(t,r,0,"qText")};function bl({models:e,environment:t,flags:n}){const{layoutService:r,dockService:i,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,c=r.getLayoutValue("dimensionAxis"),u=o.query.axis.label.getStyle(),m=xl({layoutService:r}),{orientation:d}=i.meta.major,h="horizontal"===d,p=h?c.label:"auto",f=a.getStyles(),{auto:g,spacing:y}=r.getLayoutValue("gridLine",{});return{type:"axis",key:Xa.COMPONENT.AXIS.MAJOR,renderer:Aa(n),scale:Xa.SCALE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[d.toUpperCase()]},settings:{labels:{mode:c.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:i.meta.minor.size/4,maxGlyphCount:m,tiltThreshold:m>El.LOWER&&m<El.UPPER?1:void 0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{show:!g&&0===y,stroke:f.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:Ml.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:pa.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isHorizontal:h})}}}function Cl({models:e,flags:t}){const{dockService:n,styleModel:r,themeService:i,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=r.query.axis.label.getStyle(),c=i.getStyles(),{auto:u,spacing:m}=o.getLayoutValue("gridLine",{});return{type:"axis",key:Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:Aa(t),scale:Xa.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[s.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{show:!u&&0===m,stroke:c.axis.line.major.color}},animations:{enabled:a.enabled,trackBy:pa.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Al({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,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,c="bottom"===n.meta.major.dock?0:1,u=r.getStyles(),m=i.query.axis.label.getStyle(),d=s?1:0,{auto:h,spacing:p}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(m.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:c,justify:d},guideLine:{major:{justify:d},minor:{align:c}},line:{show:!1}},style:{label:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:pa.axes.trackBy({isTime:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isTime:!0})}};return[Z(!0,{},f,{key:Xa.COMPONENT.AXIS.TIME_INNER,scale:Xa.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!h&&0===p}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color},line:{stroke:u.axis.line.major.color}}}),Z(!0,{},f,{key:Xa.COMPONENT.AXIS.TIME_OUTER,scale:Xa.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):r.meta.isContinuous?[Cl({models:e,flags:n})]:[bl({models:e,environment:t,flags:n})]}const Nl=({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,Ol=({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 Tl({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=>!0===e.data?.null?.value?0:1,...t},inactive:{opacity:e=>!0===e.data?.null?.value?0:Ml.INACTIVE,...n}}}]}}function Ll(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 Il=(e,t)=>`${e}-${t.id}`,Rl=4,kl=12,wl=4;function Dl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${wl}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(Xa.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Rl,Math.min(kl,l));o.size=`${"bar"===i?2*c:c}px`}return o.size}}const ql=({series:e,isPrimary:t,seriesModel:n})=>e?"qMeasureInfo/0"===e.ref:t?n.meta.primarySeries.some(e=>"qMeasureInfo/0"===e.ref):n.meta.secondarySeries.some(e=>"qMeasureInfo/0"===e.ref),{isDark:Pl}=Et;const zl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m=a.getColor(),{fill:d,marker:h}=n.options,{isContinuous:p}=i.meta,f="rtl"===r.options.direction,{orientation:g}=s.meta.major,y="horizontal"===g,v=(n.isPrimary?l:c).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return Ll(t,v)},M=Il(Xa.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:Xa.SCALE.MAJOR,fn:Ol({layoutService:i,seriesModel:o,rtl:f,orientation:g}),ref:p?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},fill:d||"bar"===h?m:"none",opacity:e=>!0===e.datum.null?.value||S(e.datum)?0:1,stroke:e=>{const t=m(e);return d?Pl(t)?Ue(t).brighter(.5).toString():function(e){return Ue(e).darker().toString()}(t):t},size:Dl({chart:e,layoutService:i,dockService:s,markerKey:M,markerType:h}),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:h,horizontal:y,rtl:f})},brush:Tl({layoutService:i,active:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:Ml.INACTIVE}}),animations:{enabled:u.enabled,isMainComponent:ql({series:n}),trackBy:pa.markers.trackBy,compensateForLayoutChanges:pa.markers.compensateForLayoutChanges}}};function $l({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(Xa.SCALE.MAJOR),c=s(Xa.SCALE.COLOR),u=t&&i?[...a.points].reverse():a.points,m=u.reduce((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=u[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},[]),d="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=m.map(d),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<m.length;t++){const i=m[t],o=i.color&&i.color.value,a=n?o||r:c(o)||r,s=0===t,l=t===m.length-1,u=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=m[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:u});const r=m[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(y[t+1]-u)/2).toFixed(5)))}):v.push({color:a,offset:u})}}const S=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:S}}}function _l({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:c,nil:u}=i.getSettingsForMeasure(n),m="horizontal"===o.meta.major.orientation;if(!l||"constant"===c)return i.getColor();if("measure"===l&&"categorical"===c)return i.getColor();const d=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(d?.on)return"byExpression"===d.mode?$l({isHorizontal:m,isColor:!0,fallback:u,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return u;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?$l({isHorizontal:m,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(Xa.SCALE.COLOR),a=r.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))}));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:m,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(Xa.SCALE.COLOR),l=o.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),c=Math.min(...l),u=Math.max(...l),m=t?Math.min(0,c):c,d=(t?Math.max(0,u):u)-m,h=0===d?1:d,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-m)/h))});const i=p[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-m)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:m,fallback:u,rtl:a})}const Bl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a,animationsModel:s,colorService:l}=e,c="rtl"===t.options.direction,{orientation:u}=o.meta.major,m=Ol({layoutService:r,seriesModel:i,rtl:c,orientation:u}),{isArea:d,isLineStacked:h}=r.meta,p=r.getLayoutValue("separateStacking",!0),{fieldType:f}=l.getSettings(),g={key:Il(Xa.COMPONENT.LINE,n),type:"line",data:{filter:h?e=>n.ref===e.point.source.field:e=>n.ref===e.end.source.field,collection:n.isPrimary?Xa.COLLECTION.PRIMARY_LINE:Xa.COLLECTION.SECONDARY_LINE},settings:{coordinates:{major:{scale:Xa.SCALE.MAJOR,fn:m},minor:{scale:n.scale,ref:"end",fn:e=>{if(h&&p){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}return e.scale(e.datum.end.value)}},layerId:h?{ref:Il(Xa.COMPONENT.LINE,n)}:"undefined"},layers:{curve:a.query.line.getCurveFn(),line:{stroke:_l({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round",showMinor0:!1}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:Tl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Ml.INACTIVE},inactive:{opacity:Ml.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!ql({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}};return h&&(g.settings.coordinates.minor0={scale:n.scale,fn:e=>{if(p){const t=e.datum.point.value<0?e.datum.end.value:e.datum.start.value;return e.scale(t)}return e.scale(e.datum.start.value)}}),d&&(g.settings.layers.area={fill:_l({models:e,environment:t,measureIndex:n.refIndex}),opacity:"measure"===f||"expression"===f?.6:.3},g.brush.consume.push({context:"selection",data:["selectionDimension","end","color","major"],filter:e=>(e=>void 0===e.strokeLinejoin)(e),style:{active:{opacity:.15},inactive:{opacity:.15}}})),g};var Fl={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Vl({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 jl=3,Hl=20;function Ul({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u,animationsModel:m}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:h}=a.meta.major,p="horizontal"===h,f="SPARK"===a.meta.chart.mode,g=i.getColor(),{POINT:y}=Fl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Vl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return 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},{})}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:c}=r({index:s,items:o.items});return!l&&!c}}({series:t,layoutService:r}),S="rtl"===n.options.direction,M=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:E,isLineStacked:x}=r.meta,b=r.getLayoutValue("separateStacking",!0),C=({end:e})=>{const{value:t}=e;return Ll(t,M)};return{type:"point",key:Il(Xa.COMPONENT.POINT,t),data:{filter:x?void 0:e=>t.ref===e.end.source.field,collection:t.isPrimary?Xa.COLLECTION.PRIMARY_LINE:Xa.COLLECTION.SECONDARY_LINE},preferredSize:()=>({edgeBleed:{top:p?y.SIZE.DEFAULT/2:0}}),settings:{[p?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{if(x&&b){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},[p?"x":"y"]:{scale:Xa.SCALE.MAJOR,fn:Ol({layoutService:r,seriesModel:o,rtl:S,orientation:h}),ref:"major"},sizeLimits:{minPx:jl,maxPx:Hl},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>e.null?.value||C(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0},brush:Tl({layoutService:r,active:{r:e=>e.r+Fl.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{if(!0===e.data.null?.value||C(e.data))return 0;if(!E||d)return 1;const{event:t,components:n=[]}=u?.getSelectionInfo()||{};if("continuousRange"===t)return 0;if("tap"!==t)return 1;return[Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some(e=>n.indexOf(e)>=0)?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:m.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.points.compensateForLayoutChanges}}}const Yl=(e,{dataset:t},n=!1)=>{const{value:r,label:i,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return se.shouldUseFormat(a.raw())?a.formatter()(r):i};function Wl({chart:e,models:t,environment:n,flags:r,lineSeries:i}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m="rtl"===n.options.direction,d=o.getLayoutValue("dataPoint");if(!d)return!1;if(!d.show||!d.showLineLabels)return!1;if(!i.length)return!1;const h=o.meta.isLineStacked?t=>((e,{dataset:t})=>{const{value:n,label:r,source:i}=e.point,o=t(i.key).field(i.field);return se.shouldUseFormat(o.raw())?o.formatter()(n):r})(t,e):t=>Yl(t,e),p=s.query.point.label.getStyle();return{type:"point-label",key:Xa.COMPONENT.POINT_LABEL,renderer:Aa(r),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:m,label:h,pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map(e=>({key:`${Xa.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0})),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find(e=>e.id===t).isPrimary?l:c).query.getExtrema();return!Ll(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Xa.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:u.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}const Xl=({chart:e,models:t,environment:n,flags:r,markerSeries:i})=>{const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m="rtl"===n.options.direction,d=s.query.marker.label.getStyle(),h=o.getLayoutValue("dataPoint");return!!h?.showMarkerLabels&&(!!i.length&&{type:"point-label",key:Xa.COMPONENT.MARKER_LABEL,renderer:Aa(r),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:m,label:t=>Yl(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map(e=>({key:`${Xa.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0})),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find(e=>e.id===t).isPrimary?l:c).query.getExtrema();return!Ll(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Xa.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:d.fontFamily,fontSize:d.fontSize,fill:d.fill},animations:{enabled:u.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}})};var Kl="max",Gl="min";const Jl=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}`),i=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`),o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`);return r?n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}`:i?n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`:o&&(n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`),n},Zl=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}-${Ka.AXIS.PRIMARY}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}-${Ka.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Ql({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===o.meta.major.orientation,{show:m}=i.getLayoutValue("dimensionAxis",{});if("none"!==m){const{dock:e}=o.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const d=c?"left":"right";return{type:"label-space",key:Xa.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:yl.LABEL_SPACE,dock:Jl({chart:e,dock:u?"top":d})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Xa.COMPONENT.LINE}-${r[0].id}`);if(!t?.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],i=a.query.getExtrema(),o=e.scale(Xa.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=u||c?o:1-o,m=r.filter(e=>e.isPrimary).length>0,d=s.query.getExtrema(),h=e.scale(Xa.SCALE.MINOR.SECONDARY)(d.implicit.line.max),p=u||c?h:1-h,f=r.filter(e=>!e.isPrimary).length>0;return m&&l<n||f&&p<n?10:0}}}const ec={min:"Min",max:"Max"};function tc(e,t,n){return function(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}(e,t,n)||function(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}(e,t,n)}function nc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function rc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function ic(e,t){return nc(e,t)||rc(e,t)}function oc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${ec[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Kl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Kl?!nc(r,e):!rc(r,e)}({extrema:e,type:t}))}var ac=Object.freeze({__proto__:null,isMaxOutOfBounds:nc,isMinOutOfBounds:rc,isOutOfBounds:ic,isSegmentOutOfBounds:tc,shouldShowOob:oc});const sc={min:"Min",max:"Max"},lc=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:m,layoutService:d,seriesModel:h,themeService:p,fieldModel:f,animationsModel:g}=t,y="rtl"===o.options.direction,{dock:v,opposite:S,orientation:M}=s.meta.major,E=l.query.getExtrema(),x=c.query.getExtrema(),b=a===Kl,{isBarSeriesGrouped:C,isLineStacked:A}=d.meta,N=d.getLayoutValue("separateStacking",!0),O=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Kl?n:r;const o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),s=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`),l=e.component(Xa.COMPONENT.LABEL_SPACE),c=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`),m=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`);return o?i=`@${Xa.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`:s?i=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`:c||u||m?l&&t===Kl?i=`@${Xa.COMPONENT.LABEL_SPACE}`:c?i=`@${Xa.COMPONENT.BAR_OOB}-${t}`:u?i=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`:m&&(i=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`):l&&t===Kl&&(i=`@${Xa.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:S,dock:v}),T=Ol({layoutService:d,seriesModel:h,rtl:y,orientation:M}),L=r?.length>0&&A,I=r.concat(n);if(!I.length)return!1;const R=b?E.implicit.bar.max:E.implicit.bar.min,k=Number(R.toFixed(13));if(!C&&i.length&&ac[`is${sc[a]}OutOfBounds`](k,E))return!1;if(!E.meta.hasExplicit&&!x.meta.hasExplicit)return!1;const w=b?"max":"min",D=Math[w](Number(E.implicit.line[w].toFixed(13)),Number(E.implicit.marker[w].toFixed(13))),q=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),P=I.filter(e=>e.isPrimary),z=I.filter(e=>!e.isPrimary),$=P.length>0,_=z.length>0,{major:B,majorNumeric:F}=f.main,V=e=>"NaN"!==e.qNum?e.qNum:0,j=d.meta.isContinuous?F:B;return{type:"data-out-of-bounds-marker",key:`${Xa.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:O,minimumLayoutMode:yl.OUT_OF_BOUNDS_MARKER},data:{extract:[...P.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:B,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===Ka.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"primary"}})),...z.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:B,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===Ka.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"secondary"}}))],stack:L?{stackKey:e=>e.value,value:e=>e.end.value,offset:N?"diverging":"none",stackByKey:["primary","secondary"]}:void 0},settings:{type:a,primaryExtremum:b?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:b?()=>m.query.getMax():()=>m.query.getMin(),isLineStacked:A,separateStacking:A&&N,primarySeries:P,secondarySeries:z,orientation:M,rtl:y,major:{scale:Xa.SCALE.MAJOR,fn:T},markerOffset:Zl({dockPosition:O,orientation:M,rtl:y})},brush:Tl({layoutService:d}),show:()=>{if(b){if($&&D>u.query.getMax())return!0;if(_&&q>m.query.getMax())return!0}if(!b){if($&&D<u.query.getMin())return!0;if(_&&q<m.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:pa.lineOobs.compensateForLayoutChanges}}},cc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function uc({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=A(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Xa.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=cc[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=cc[a.meta.chart.mode],c=Math.min(s/i/.2,1),u=2*(1-(m=1-c))+l*m;var m;return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const mc=({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 dc(e){return Math.min(Math.max(0,e),1)}const hc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:m,secondaryExtremumModel:d,animationsModel:h}=t,{isContinuous:p,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:y}=o.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,M=i?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const E=f?{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return dc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return dc(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return dc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=!0===e.datum.null?.value?v(e):e.datum.end.value;return dc(e.scale(t))}}},x=(i?m:d).query.getExtrema(),b=f?({start:e,end:t})=>tc(e.value,t.value,x):({end:e})=>ic(e.value,x);return{type:"box",key:`${Xa.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary===i).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:f?i?Xa.COLLECTION.STACKED_PRIMARY:Xa.COLLECTION.STACKED_SECONDARY:i?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY},preferredSize:p?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:o,axis:S}),ref:p?{start:"major",end:"major"}:void 0},minor:E,box:{width:mc({isContinuous:p,isBarSeriesGrouped:g,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:y}),minWidthPx:p?uc({chart:e,models:t,viewState:n,viewCache:r,axis:S}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>!0===e.datum?.null?.value||b(e.datum)?0:1},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Tl({layoutService:o,active:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:Ml.INACTIVE}}),animations:{enabled:h.enabled,isMainComponent:ql({isPrimary:i,seriesModel:l}),trackBy:pa.bars.trackBy,compensateForLayoutChanges:pa.bars.compensateForLayoutChanges}}},pc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:m,isContinuous:d,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!m||0===g)return!1;return{key:`${Xa.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?Xa.COLLECTION.STACKED_TOTAL_PRIMARY:Xa.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:o,axis:f}),ref:d?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:mc({isContinuous:d,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:p}),minWidthPx:d?uc({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 fc(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=>Et.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}}function gc(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"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const yc=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!i||!o&&!!r},vc=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!!i&&(!!o||!1!==r)};function Sc(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 Mc=({models:e,environment:t,flags:n,isPrimary:r})=>{const{layoutService:i,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:c}=i,{isBarSeriesStacked:u}=c,m="rtl"===t.options.direction,d=s.getStyles(),h=a.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),f=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!(r?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!yc(p,c))return!1;let g;!u&&(g=u?1:0);const y={label:e=>Yl(e.data,e,u),simplifiedPlacements:Sc(g,0===g?1:0,u?.5:1,c.isContinuous),style:d.label.value},v=[fc(e,y)],S=[{component:`${Xa.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>gc(t.data.end.value,e.dockService.meta.minor.orientation,m,0),labels:v,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{type:"labels",key:`${Xa.COMPONENT.BAR_LABEL}-${f}`,renderer:Aa(n),layout:{minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:S},animations:{enabled:l.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}};function Ec(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 xc({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(),c=t.layoutService.getLayoutValue("dataPoint",{}),u=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(0===(i?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!vc(c,o))return!1;const m=!yc(c,o),d=l.useContrastColor,h=e.formatter(i?Xa.FORMATTER.PRIMARY:Xa.FORMATTER.SECONDARY)||(e=>e),p=e=>h(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Ec("outside",m,d,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Ec("opposite",m,d,o.isContinuous),style:s.label.value},y=[fc(t,f),fc(t,g)];return{type:"labels",key:`${Xa.COMPONENT.STACK_BAR_LABEL}-${u}`,renderer:Aa(r),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:[{component:`${Xa.COMPONENT.STACK_BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>gc(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,a),labels:y,fontSize:parseInt(l.fontSize,10),fontFamily:l.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}var bc=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 Cc={min:"Min",max:"Max"};function Ac({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:m}=t,{isBarSeriesStacked:d,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=d?pc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):hc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():c.query.getExtrema(),v=n===Kl,S=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${Cc[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!bc[`has${Cc[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${Cc[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let M="end";d&&(M=v?"sumOfPositives":"sumOfNegatives");const E=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.scale(o?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY)[n]());const x=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),a=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Xa.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:x},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:Z({},g.settings.box,{fill:d?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=E(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[M].value);return v?n>t:n<t},width:mc({isContinuous:h,isBarSeriesGrouped:p,styleModel:u,discreteModel:m,isBarSeriesStackedInBothAxis:f}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Tl({layoutService:a})}}const Nc={min:"Min",max:"Max"},Oc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Tc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u,animationsModel:m}=t,{end:d,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,f=p?pc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):hc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():c.query.getExtrema(),y=n===Kl?g.implicit.bar.max:g.implicit.bar.min,v=Number(y.toFixed(13)),S=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!f)return!1;if(!ac[`is${Nc[n]}OutOfBounds`](v,g))return!1;const M=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Kl?n:r;const a=e.component(Xa.COMPONENT.LABEL_SPACE),s=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),l=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`),c=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`),u=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`);return s?o=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`:l?o=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`:c&&u&&!i?o=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`:a&&t===Kl&&(o=`@${Xa.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:h,isPrimary:o});let E="end";p&&(E=n===Kl?"sumOfPositives":"sumOfNegatives");const x={type:"box-out-of-bounds",key:`${Xa.COMPONENT.BAR_OOB}-${n}-${S}`,layout:{dock:M},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:pe.getDockValue(n===Kl?d:h),oob:Z({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){if(!0===e.datum.null?.value)return!1;const t=p&&0===e.datum[E].value,r=ac[`is${Nc[n]}OutOfBounds`](e.datum[E].value,g,n),i=(!t||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Oc[n]].value;return 0!==i&&ac[`is${Nc[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:E,extrema:g}))&&r;return i}})},brush:Tl({layoutService:a}),animations:{enabled:m.enabled,compensateForLayoutChanges:pa.barOobs.compensateForLayoutChanges}};return x}function Lc(e){return Math.min(Math.max(0,e),1)}const Ic=({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:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:m}=s.meta,d=e.scale(r?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY),h=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,p=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Kl;if(!oc({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);return{type:"box",key:`${Xa.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary===r).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:l?r?Xa.COLLECTION.STACKED_TOTAL_PRIMARY:Xa.COLLECTION.STACKED_TOTAL_SECONDARY:r?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:s,axis:h}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Lc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Lc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Lc(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Lc(e.scale(t))}}},box:{width:mc({isContinuous:c,isBarSeriesGrouped:u,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:m}),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:d.max();return f?n>d.max():n<d.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Rc(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const kc=({chart:e,models:t,type:n,environment:r,flags:i,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,seriesModel:m,themeService:d,animationsModel:h}=t,p=d.getStyles(),f=u.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:y}=g,v=e.formatter(o?Xa.FORMATTER.PRIMARY:Xa.FORMATTER.SECONDARY),S=a.getLayoutValue("dataPoint",{}),M="horizontal"===s.meta.major.orientation,E="rtl"===r.options.direction;if(!(o?m.meta.primaryBarSeriesCount:m.meta.secondaryBarSeriesCount)||!y&&!yc(S,g)||y&&!vc(S,g))return!1;const x=o?l.query.getExtrema():c.query.getExtrema();if(!x.meta.hasExplicit)return!1;const b=n===Kl?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Kl?nc(b,x):rc(b,x)))return!1;let C=e=>Yl(e.data,e);g.isBarSeriesStacked&&(C=n===Kl?function(e){if(!0===e.data.null?.value)return"";if(nc(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return v?v(t):t}return""}:function(e){if(!0===e.data.null?.value)return"";if(rc(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return v?v(t):t}return""});const A={label:C,simplifiedPlacements:Rc("outside",0,g.isContinuous,M,E),style:p.label.value},N={label:C,simplifiedPlacements:Rc("opposite",0,g.isContinuous,M,E),style:p.label.value},O=[fc(t,A),fc(t,N)],T=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,L="horizontal"===s.meta.major.orientation?"down":"right",I=[{component:`${Xa.COMPONENT.GHOST_BAR_OOB}-${n}-${T}`,selector:"rect",strategy:{type:"bar",settings:{direction:L,labels:O,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${Xa.COMPONENT.BAR_OOB_LABEL}-${n}-${T}`,type:"labels",renderer:Aa(i),layout:{minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:I},animations:{enabled:h.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}},wc=({chart:e,models:t,viewState:n,viewCache:r})=>[hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Dc=({chart:e,models:t,viewState:n,viewCache:r})=>[pc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),pc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],qc=({chart:e,models:t,environment:n,flags:r})=>{const i=xc({chart:e,models:t,environment:n,flags:r,isPrimary:!0}),o=xc({chart:e,models:t,environment:n,flags:r,isPrimary:!1});return[Mc({models:t,environment:n,flags:r,isPrimary:!0}),Mc({models:t,environment:n,flags:r,isPrimary:!1}),i,o]},Pc=({chart:e,models:t,viewCache:n,viewState:r})=>[Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],zc=({chart:e,models:t,viewCache:n,viewState:r})=>[Tc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Tc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Tc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Tc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],$c=({chart:e,models:t})=>[Ic({chart:e,models:t,type:"max",isPrimary:!0}),Ic({chart:e,models:t,type:"min",isPrimary:!0}),Ic({chart:e,models:t,type:"max",isPrimary:!1}),Ic({chart:e,models:t,type:"min",isPrimary:!1})],_c=({chart:e,models:t,environment:n,flags:r})=>[kc({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!0}),kc({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!0}),kc({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!1}),kc({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!1})],Bc=({chart:e,environment:t,flags:n,models:r,viewState:i,viewCache:o})=>{const{seriesModel:a}=r,s=a.query.series(Ka.TYPE.BAR).slice(-1),l=a.query.series(Ka.TYPE.LINE),c=a.query.series(Ka.TYPE.MARKER);return[...wc({chart:e,models:r,viewState:i,viewCache:o}),...Dc({chart:e,models:r,viewState:i,viewCache:o}),...l.map(e=>Bl({models:r,environment:t,series:e})),...l.map(e=>Ul({models:r,series:e,environment:t})),...c.map(n=>zl({chart:e,models:r,series:n,environment:t})),Wl({chart:e,models:r,environment:t,flags:n,lineSeries:l}),Xl({chart:e,models:r,environment:t,flags:n,markerSeries:c}),...qc({chart:e,models:r,environment:t,flags:n}),...Pc({chart:e,models:r,viewCache:o,viewState:i}),...zc({chart:e,models:r,viewCache:o,viewState:i}),...$c({chart:e,models:r}),..._c({chart:e,models:r,environment:t,flags:n}),lc({chart:e,models:r,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"max"}),lc({chart:e,models:r,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"min"}),Ql({chart:e,models:r,environment:t,lineSeries:l})]},Fc={NONE:0,WIDE:1,NARROW:3};function Vc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=r.getLayoutValue("gridLine",{});if(!a&&s===Fc.NONE)return!1;const c=i.getStyles(),u=n.meta.primarySeries.length>0;return{key:Xa.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:yl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===Fc.WIDE)||((e,t)=>t%2==0),stroke:c.grid.line.major.color},minorTicks:{show:!a&&s===Fc.NARROW,stroke:c.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(l??0)&&u?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}function jc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o,secondaryExtremumModel:a,secondaryTickModel:s,layoutService:l,animationsModel:c}=e,u=0===(l.getLayoutValue("gridLine",{})?.axis??0),m=t.query.getExtrema(),d=a.query.getExtrema();if(!m.meta.includesZero&&!d.meta.includesZero)return!1;return{key:Xa.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:yl.GRID_LINE},show:()=>(()=>{const e=o.meta.primarySeries.length>0,t=o.meta.secondarySeries.length>0;return u&&e&&n.query.getMin()<=0&&n.query.getMax()>=0||!u&&t&&s.query.getMin()<=0&&s.query.getMax()>=0})(),lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:u?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]},animations:{enabled:c.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}function Hc({models:e}){const{layoutService:t,themeService:n,animationsModel:r}=e,{isContinuous:i,isTime:o}=t.meta;if(!i)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:yl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:r.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}};return o?[Z(!0,{},s,{key:"time-inner-grid",x:{scale:Xa.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),Z(!0,{},s,{key:"time-outer-grid",x:{scale:Xa.SCALE.MAJOR}})]:[Z(!0,{},s,{key:"continuous-grid",x:{scale:Xa.SCALE.MAJOR},minorTicks:{show:!0}})]}function Uc({models:e}){return[Vc({models:e}),jc({models:e}),...Hc({models:e})]}function Yc({models:e,environment:t,actions:n,viewCache:r,flags:i}){const{alternativeService:o,layoutService:a,dockService:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:m}=e,d=a.getLayoutValue("dimensionAxis");if(!d)return!1;const{show:h}=d;if("all"!==h&&"title"!==h)return!1;const p=o.getAlternatives(),{orientation:f}=s.meta.major,g=m.query.axis.title.getStyle();return{type:"axis-title",key:Xa.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:s.meta.major.dock,minimumLayoutMode:yl.AXIS_TITLE.MAJOR[f.toUpperCase()]},data:{infos:a.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:l,cache:r,model:c,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:i.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:g.color,fontFamily:g.fontFamily,fontSize:g.fontSize}}}}const Wc=(e,t,n)=>e.query.seriesByAxis(n).map(e=>({...t[e.refIndex],explicitColumn:e.refIndex}));function Xc({models:e,environment:t,actions:n,viewCache:r,flags:i}){const{alternativeService:o,layoutService:a,dockService:s,seriesModel:l,appModel:c,genericObjectModel:u,selectionService:m,styleModel:d}=e,h=a.getLayoutValue("measureAxes");if(!h||!h.length)return[];const p=o.getAlternatives(),f=d.query.axis.title.getStyle(),{measureAxes:g}=l.meta;return g.filter(e=>e.isPrimary?"all"===h[0].show||"title"===h[0].show:"all"===h[1].show||"title"===h[1].show).map(e=>{const o=a.getHyperCube(),{isPrimary:d}=e;return{type:"axis-title",key:d?Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:d?s.meta.minor.dock:s.meta.minorSecondary.dock,minimumLayoutMode:yl.AXIS_TITLE.MINOR},data:{infos:Wc(l,o.qMeasureInfo,d),alternatives:p.measures},resources:{app:c,cache:r,model:u,selections:m.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem: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)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:i.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}})}function Kc({models:e,environment:t,actions:n,viewCache:r,flags:i}){return[Yc({models:e,environment:t,actions:n,viewCache:r,flags:i}),...Xc({models:e,environment:t,actions:n,viewCache:r,flags:i})]}function Gc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:m}=o.meta,d="rtl"===t.options.direction;return!(c&&!m)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const m=As({layoutService:e,override:l});if(m.none)return!1;const{orientation:d}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===d?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:d,rtl:s,isContinuous:e.meta.isContinuous,range:()=>xs({layoutService:e,viewState:i,viewCache:o})}};m.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{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&&c&&(h.settings.injections=()=>[Es({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:d,scrollbarOverride:{predicate:()=>u,value:Ms.OPTIONS.BAR.value},deviceType:t.deviceType})}function Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=hc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;return a.key=`${Xa.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?Xa.COLLECTION.REDUCED_STACKED_PRIMARY:Xa.COLLECTION.REDUCED_STACKED_SECONDARY:i?Xa.COLLECTION.REDUCED_PRIMARY:Xa.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Xa.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}const Zc=(e,t)=>t?e.isPrimary?Xa.COLLECTION.REDUCED_PRIMARY_LINE:Xa.COLLECTION.REDUCED_SECONDARY_LINE:Xa.COLLECTION.REDUCED;function Qc({environment:e,models:t}){const n=t.flags.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA"),r=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ka.TYPE.LINE).map(i=>{const o=Bl({models:t,environment:e,series:i});return o.key=Il(Xa.COMPONENT.MINI_CHART.LINE,i),o.data.collection=Zc(i,n),o.settings.coordinates.minor.scale=i.isPrimary?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=Xa.SCALE.REDUCED,o.settings.layers.line.strokeWidth=1,o.settings.layers.line.strokeDasharray=(...e)=>void 0===r(...e)?void 0:"1, 1",o.layout={dock:"@scrollbar"},o})}function eu({models:e,environment:t}){return e.seriesModel.query.series(Ka.TYPE.MARKER).map(n=>{const r=zl({models:e,environment:t,series:n});return r.key=Il(Xa.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Xa.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Xa.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r})}function tu({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return il(t)?[Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Jc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Qc({environment:i,models:t}),...eu({models:t,environment:i})]:[]}function nu({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=yl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Xa.SCALE.MAJOR_INNER,layout:{dock:`@${Xa.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Xa.SCALE.MAJOR,layout:{dock:`@${Xa.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Xa.SCALE.MAJOR,layout:{dock:`@${Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function ru({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c,animationsModel:u}=t,m=l.qLocaleInfo,{options:d,theme:h}=n,p="rtl"===d.direction,f=c.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary),g=c.query.series(Ka.TYPE.BAR).filter(e=>!e.isPrimary),y=c.query.series(Ka.TYPE.LINE),v=c.query.series(Ka.TYPE.MARKER),S=c.query.all(),M=S.some(e=>e.isPrimary),E=S.some(e=>!e.isPrimary),x=M&&E,b={resolveUIColor:o.getPaletteColor},C=u.enabled,A=M?ba({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.dock:a.meta.minor.opposite,scale:Xa.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Xa.FORMATTER.PRIMARY,theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=E?ba({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.opposite:a.meta.minor.dock,scale:Xa.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Xa.FORMATTER.SECONDARY,theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Ma({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Xa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),!!E&&Ma({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Xa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),Ma({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:p,key:Xa.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`:g.length?`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`:y.length?`${Xa.COMPONENT.LINE}-${y[0].id}`:v.length?`${Xa.COMPONENT.MARKER}-${v[0].id}`:`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...ba({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dock:a.meta.major.opposite,scale:Xa.SCALE.MAJOR,style:s.getStyles(),theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function iu({layoutService:e}){return!!il({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Xa.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function ou(e){return e?.type||Ka.TYPE.BAR}function au({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u,isLineStacked:m}=n.meta;if(!s)return!1;const{options:d}=t,h=n.getLayoutValue("color",{}),p=e=>e.filter(e=>ou(e)===Ka.TYPE.LINE).map(e=>({key:Il(Xa.COMPONENT.LINE,e),typeIndex:e.typeIndex})),f=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex,g=n.getHyperCubeValue("qMeasureInfo").map(e=>e.color?.on);return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Xa.COLLECTION.LINE},settings:{getSelectionInfo:()=>a?.getSelectionInfo?.()||{},seriesInfo:{primary:p(o.meta.primarySeries),secondary:p(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=>!g[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:o.meta.barSeriesCount,isLineStacked:m,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function su({models:{fieldModel:e}}){return{[Xa.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Xa.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var lu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:cu}=lu;function uu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=cu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:mu}=lu,du=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=mu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!uu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:hu}=lu,{MAX_NUM_POINTS:pu,DEFAULT_NUM_POINTS:fu,DEFAULT_NUM_LINES:gu}=lu,{DEFAULT_NUM_POINTS:yu}=lu,vu=({layoutService:e,largeDataService:t})=>{if(!uu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=yu}=t?.meta||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{const{dimensions:n=[]}=e?.meta?.size||{},{maxNumLines:r=gu,maxNumPoints:i=fu,hasInjectedData:o=!1}=t?.meta||{};if(du({layoutService:e,largeDataService:t})*n[0]<=i)return n[0];const a=Math.max(1,Math.min(r,n[1])),s=i/a,l=Math.floor(n[0]<=s?s:s/4),c=2*a*(a+1);return o&&(a>gu||i>fu)?Math.min(l,Math.ceil(pu/c)):l})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=hu}=t?.meta||{},{measureCount:r=1}=e?.meta||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function Su({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>uu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>vu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>du({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:vu({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:du({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Mu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Eu({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 xu(){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 bu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=xu(),o=xu();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 Cu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Au(e,t,n){const r={qDataPages:(n.qDataPages||[]).map(n=>{const r=bu(e,t,n.qMatrix),i=Cu(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 Nu=2**.5,Ou=1/Nu,Tu=Ou**44;function Lu(e){return e.qIsOtherCell}function Iu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach(e=>{if(!e.some(Lu)){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(Lu)||t++}),t}(n)}const Ru={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var ku={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}};function wu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Du(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function qu(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:"",c=s(l);let{x:u,width:m}=r;e.start===e.end&&(m=c.width+2*i,1===e.end&&(u-=m));const d={x:u+i,y:i,width:m-2*i,height:t.height-2*i},h=s(`${l[0]}…`).width,p=Math.max(0,d.width-c.width),f=Math.max(0,d.height-c.height),g=o*p,y=a*f;return{show:d.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:d,style:n.label,segment:{x:u+g,width:c.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=wu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:wu(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&&!Du(n.segment,i.segment)}}(e,a),a}function Pu(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=wu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:wu(i,n.minorGuideLine.strokeWidth),x2:o,y2:wu(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function zu(e){return e.filter(e=>e.show).map(e=>Z({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue}))}var $u={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=wu(1,t.line.strokeWidth);return{show:n.line.show,x1:wu(0,t.line.strokeWidth),y1:r,x2:wu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=qu(n,this),this.state.minor=Pu(r,this)},render(){return[...zu([this.state.line]),...(e=this.state.major.map(e=>e.label),e.filter(e=>e.show).map(e=>Z({},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}))),...zu(this.state.major.map(e=>e.guideLine)),...zu(this.state.minor.map(e=>e.guideLine))];var e}};function _u(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 Bu(e){return e.qTags.indexOf("$qualified")>-1}function Fu({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];_u(o,a)?(Bu(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 Vu({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 c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.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}}}}function ju({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+16})),r.clamp(n),i.rangeAndWidth}}}function Hu({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>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Uu({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=ju,queryFactory:s=Hu}={attributesFactory:ju,queryFactory:Hu}){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)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function Yu({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=Uu,mapper:a=Fu,resolver:s=Vu}={metaFactory:Uu,mapper:Fu,resolver:Vu}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:m}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),d=s({qualifiedMeta:u,nonQualifiedMeta:m});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=d.resolve(t);return n.set(r,i),i}}}function Wu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Xu=Wu(0).getTime();function Ku(e){return(e.getTime()-Xu)/86400/1e3}const Gu=new Date,Ju=new Date;function Zu(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Zu(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(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=(t,r)=>(Gu.setTime(+t),Ju.setTime(+r),e(Gu),e(Ju),Math.floor(n(Gu,Ju))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const Qu=1e3,em=6e4,tm=36e5,nm=864e5,rm=6048e5,im=Zu(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qu)},(e,t)=>(t-e)/Qu,e=>e.getUTCSeconds());im.range;const om=Zu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qu)},(e,t)=>{e.setTime(+e+t*em)},(e,t)=>(t-e)/em,e=>e.getMinutes());om.range;const am=Zu(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*em)},(e,t)=>(t-e)/em,e=>e.getUTCMinutes());am.range;const sm=Zu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qu-e.getMinutes()*em)},(e,t)=>{e.setTime(+e+t*tm)},(e,t)=>(t-e)/tm,e=>e.getHours());sm.range;const lm=Zu(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*tm)},(e,t)=>(t-e)/tm,e=>e.getUTCHours());lm.range;const cm=Zu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*em)/nm,e=>e.getDate()-1);cm.range;const um=Zu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nm,e=>e.getUTCDate()-1);um.range;const mm=Zu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nm,e=>Math.floor(e/nm));function dm(e){return Zu(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*em)/rm)}mm.range;const hm=dm(0),pm=dm(1),fm=dm(2),gm=dm(3),ym=dm(4),vm=dm(5),Sm=dm(6);function Mm(e){return Zu(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/rm)}hm.range,pm.range,fm.range,gm.range,ym.range,vm.range,Sm.range;const Em=Mm(0),xm=Mm(1),bm=Mm(2),Cm=Mm(3),Am=Mm(4),Nm=Mm(5),Om=Mm(6);Em.range,xm.range,bm.range,Cm.range,Am.range,Nm.range,Om.range;const Tm=Zu(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());Tm.range;const Lm=Zu(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());Lm.range;const Im=Zu(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Im.every=e=>isFinite(e=Math.floor(e))&&e>0?Zu(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Im.range;const Rm=Zu(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Rm.every=e=>isFinite(e=Math.floor(e))&&e>0?Zu(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,Rm.range;const km=1,wm=2,Dm=3,qm=4,Pm=5,zm=6;function $m({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return Rm.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=im.count(e,t),l=am.count(e,t),c=lm.count(e,t),u=um.count(e,t),m=Em.count(e,t),d=Lm.count(e,t),h=Rm.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:Rm.every(1),formatter:r.year.formatter,offset:e=>Rm.offset(e,-1),floor:Rm.floor};if(s<=p)v.type=km,v.desc="second",v.count=s,v.interval=im.every(1),v.formatter=r.second.formatter,v.offset=e=>im.offset(e,-1),v.floor=im.floor;else if(s/2<=p)v.type=km,v.desc="every other second",v.count=s/2,v.interval=im.every(2),v.formatter=r.second.formatter,v.offset=e=>im.offset(e,-2),v.floor=im.floor;else if(s/5<=p)v.type=km,v.desc="every 5 second",v.count=s/5,v.interval=im.every(5),v.formatter=r.second.formatter,v.offset=e=>im.offset(e,-5),v.floor=im.floor;else if(s/15<=p)v.type=km,v.desc="every 15 second",v.count=s/15,v.interval=im.every(15),v.formatter=r.second.formatter,v.offset=e=>im.offset(e,-15),v.floor=im.floor;else if(s/30<=p)v.type=km,v.desc="every 30 second",v.count=s/30,v.interval=im.every(30),v.formatter=r.second.formatter,v.offset=e=>im.offset(e,-30),v.floor=im.floor;else if(l<=f)v.type=wm,v.desc="minute",v.count=l,v.interval=am.every(1),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-1),v.floor=am.floor;else if(l/2<=f)v.type=wm,v.desc="every 2 minute",v.count=l/2,v.interval=am.every(2),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-2),v.floor=am.floor;else if(l/5<=f)v.type=wm,v.desc="every 5 minute",v.count=l/5,v.interval=am.every(5),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-5),v.floor=am.floor;else if(l/10<=f)v.type=wm,v.desc="every 10 minute",v.count=l/10,v.interval=am.every(10),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-10),v.floor=am.floor;else if(l/15<=f)v.type=wm,v.desc="every 15 minute",v.count=l/15,v.interval=am.every(15),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-15),v.floor=am.floor;else if(l/30<=f)v.type=wm,v.desc="every 30 minute",v.count=l/30,v.interval=am.every(30),v.formatter=r.minute.formatter,v.offset=e=>am.offset(e,-30),v.floor=am.floor;else if(c<=f)v.type=Dm,v.desc="hour",v.count=c,v.interval=lm.every(1),v.formatter=r.minute.formatter,v.offset=e=>lm.offset(e,-1),v.floor=lm.floor;else if(c/2<=f)v.type=Dm,v.desc="every 2 hour",v.count=c/2,v.interval=lm.every(2),v.formatter=r.minute.formatter,v.offset=e=>lm.offset(e,-2),v.floor=lm.floor;else if(c/3<=f)v.type=Dm,v.desc="every 3 hour",v.count=c/3,v.interval=lm.every(3),v.formatter=r.minute.formatter,v.offset=e=>lm.offset(e,-3),v.floor=lm.floor;else if(c/6<=f)v.type=Dm,v.desc="every 6 hour",v.count=c/6,v.interval=lm.every(6),v.formatter=r.minute.formatter,v.offset=e=>lm.offset(e,-6),v.floor=lm.floor;else if(c/12<=f||i)v.type=Dm,v.desc="every 12 hour",v.count=c/12,v.interval=lm.every(12),v.formatter=r.minute.formatter,v.offset=e=>lm.offset(e,-12),v.floor=lm.floor;else if(u<=g)v.type=qm,v.desc="day",v.count=u,v.interval=um.every(1),v.formatter=r.date.formatter,v.offset=e=>um.offset(e,-1),v.floor=um.floor;else if(u/2<=g)v.type=qm,v.desc="every 2 day",v.count=u/2,v.interval=um.every(2),v.formatter=r.date.formatter,v.offset=e=>um.offset(e,-2),v.floor=um.floor;else if(u/3<=g)v.type=qm,v.desc="every 3 day",v.count=u/3,v.interval=um.every(3),v.formatter=r.date.formatter,v.offset=e=>um.offset(e,-3),v.floor=um.floor;else if(m<=g)v.type=qm,v.desc="week",v.count=m,v.interval=Em.every(1),v.formatter=r.date.formatter,v.offset=e=>Em.offset(e,-1),v.floor=um.floor;else if(m/2<=g)v.type=qm,v.desc="every 2 week",v.count=m/2,v.interval=Em.every(2),v.formatter=r.date.formatter,v.offset=e=>Em.offset(e,-2),v.floor=um.floor;else if(d<=g)v.type=Pm,v.desc="month",v.count=d,v.interval=Lm.every(1),v.formatter=r.date.formatter,v.offset=e=>Lm.offset(e,-1),v.floor=um.floor;else if(d/3<=g)v.type=Pm,v.desc="quarter",v.count=d/3,v.interval=Lm.every(3),v.formatter=r.date.formatter,v.offset=e=>Lm.offset(e,-3),v.floor=um.floor;else if(d/6<=g)v.type=Pm,v.desc="half year",v.count=d/6,v.interval=Lm.every(6),v.formatter=r.date.formatter,v.offset=e=>Lm.offset(e,-6),v.floor=um.floor;else if(h<=y)v.type=zm,v.desc="year",v.count=h,v.interval=Rm.every(1),v.formatter=r.year.formatter,v.offset=e=>Rm.offset(e,-1),v.floor=Rm.floor;else if(h/2<=y)v.type=zm,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Rm.offset(e,-2),v.floor=Rm.floor;else if(h/5<=y)v.type=zm,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Rm.offset(e,-5),v.floor=Rm.floor;else if(h/10<=y)v.type=zm,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Rm.offset(e,-10),v.floor=Rm.floor;else{const e=Math.max(1,Math.floor(h/y));v.type=zm,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Rm.offset(t,-e),v.floor=Rm.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const m=e.ticks(u.interval);m.length?s.getTime()!==m[0].getTime()&&m.unshift(u.offset(m[0])):m.push(u.floor(s));const d=m.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:u.formatter}});let h=[];if(!o&&u.type<=Dm){const n=t.getFormat("date"),r=e.ticks(um.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(um.offset(r[0],-1)),h=(r.length?r:[um.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:d,outer:h}}const _m=86400,Bm=1440,Fm={};function Vm(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function jm(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=po().domain([Wu(l),Wu(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const m="object"==typeof r?r:{type:r};let d;d="d3"===m.type?(e,i)=>$m({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===m.initialMin?u.domain()[0]:Wu(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Fm[[t,n,r,r,o]])return Fm[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Wu(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),m=r-n,d=t/(i-r),h=d/1440,p=d/_m,f=366*d,g=3*d*30,y=a.second.width/p,v=a.minute.width/h,S=a.date.width/g,M=a.year.width/f;let E,x,b,C=0,A=0,N=null,O=null,T=null,L=null,I=null,R=null;const k={outer:[],inner:[]};for(y<1?(N=1,A=1/_m):y<2?(N=2,A=1/_m*2):y<5?(N=5,A=1/_m*5):y<10?(N=10,A=1/_m*10):y<30?(N=30,A=1/_m*30):v<1?(O=1,A=1/Bm):v<2?(O=2,A=1/Bm*2):v<5?(O=5,A=1/Bm*5):v<10?(O=10,A=.006944444444444445):v<30?(O=30,A=.020833333333333336):v<60?(T=1,A=1/24):v<120?(T=2,A=2/24):v<360?(T=6,A=.25):v<720?(T=12,A=.5):S<1/90?(A=1,L=1):S<2/90?(A=2,L=2):S<7/90?(A=7,L=7):S<31/90?(I=1,A=31):S<1?(I=3,A=90):M<1?(R=1,A=366):M<2?(R=2,A=732):M<5?(R=5,A=1826.25):(R=10,A=3652.5),x=Math.floor((m+n%1)/A);C<i;){b=x+1,E=R?Vm("year",[l+x*R,0,1],[l+b*R,0,1],a.year.formatter):I?Vm("month",[l,c+x*I,1],[l,c+b*I,1],a.date.formatter):L?Vm("day",[l,c,u+x*L],[l,c,u+b*L],a.date.formatter):T?Vm("hour",[l,c,u,0+x*T],[l,c,u,0+b*T],a.minute.formatter):O?Vm("minute",[l,c,u,0,0+x*O],[l,c,u,0,0+b*O],a.minute.formatter):Vm("second",[l,c,u,0,0,0+x*N],[l,c,u,0,0,0+b*N],a.second.formatter),C=Ku(E.start),k.inner.push(E);const e=Math.floor(C);if(!(o||R||I||L)){const t={type:"day",start:Wu(e),end:Wu(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)}x++}return k.min=r,k.max=i,Fm[[t,n,r,r,o]]=k,k}(n,e,m.min,l,c,"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)=>d(t,n)[a].map(t=>{let n;return n="start"===i?Ku(t.start):"end"===i?Ku(t.end):(Ku(t.start)+Ku(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Ku(t.start),end:Ku(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return h}const Hm=/t+/i;const Um={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 Ym(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 Wm="continuousPan";var Xm={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Ru,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Su,snapshotFetcherFactory:c=Eu,cacheFetcherFactory:u=Mu,cache:m={initial:{},merged:{}}}=s,d=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:m}),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(1e-6,(r-n)*Tu))),g=t.meta.isSnapshot?h:d,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=Cu(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),m.initial=t,m.merged=t,e}).then(e=>Au(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=Cu(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}(m.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),m.merged=e,e)).then(n=>Au(e,t,n)).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then(n=>Au(e,t,n)),fetchMinMaxData:()=>Promise.resolve(m.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Z({},e,{...m.initial})},getInitialLayout(){const e=this.getInitialCube();return Z({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Iu(m.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:m.merged.qDataPages[0]})]:m.merged.qDataPages;t.qDataPages=n,t.qAxisData=m.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=N((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),c=i?1-o:o,{min:u,max:m}=t.get("zoom"),d=Math.abs(m-u),h=d-(r>0?Ou:Nu)*d,p=u+h*c,f=m-h*(1-c),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:Wm,pointers:1,threshold:10,enable(r,i){return this.started===Wm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${Wm}start`](n){n.preventDefault(),this.started=Wm;const{min:i,max:o}=r.get("zoom");this[Wm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${Wm}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Wm],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)})},[`${Wm}end`](e){e.preventDefault(),this.started=!1},[`${Wm}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:ku,timeAxis:$u},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]=Z(!0,{},t[i],o)}),r}(t,Um,n),{qAxis:i}=r,o=rr(),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 c,u,m=[];const d=function(e){return Number.isNaN(+e)?NaN:o(e)};d.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(m=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});m=m.concat(e)}return"auto"===o&&(m=u.generate(e,n.isDayOrShorter)),m},d.invert=e=>o.invert(e),d.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),d.range=e=>Array.isArray(e)?o.range(e):o.range(),d.norm=e=>(Ym(a,d),a.instance(e)),d.normInvert=e=>(Ym(a,d),a.instance.invert(e)),d.copy=()=>e(t,n),d.clamp=(e=!0)=>(o.clamp(e),o.clamp()),d.min=()=>Math.min(s,l),d.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:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&Hm.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(41000.2343433)).width+16)}),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=Wu(t[0].data.start),i=Wu(t[n-1].data.start);return um.count(r,i)/n>=1?o.date:lm.count(r,i)/n>0?o.minute:am.count(r,i)/n>0?o.second:o.date},t}(r);return u=jm(o.copy(),r,h),c=Yu({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:d}),d.data=()=>({fields:[{formatter:d.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:x(n,"fields.0.raw",()=>({}))}]}),d.formatter=()=>h.getFormatFromTicks(m).formatter,d}}};const Km=e=>e.meta.seriesComponentKeys[0],Gm=(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 Jm({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=Xm,{layoutService:s,seriesModel:l}=t,c=Km(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:c}):()=>{};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===Xa.COMPONENT.LEGEND_CATEGORICAL);Gm(t,e)}if(n.scroll.enabled()){const[e]=i.filter(e=>e.key===c);e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const Zm="continuousPinchZoom";function Qm({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=Xm.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:m,tooltipService:d}=t,h="rtl"===n.options.direction,p=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:zs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:l,dockService:c,rtl:h}),g={type:"hammer",enable:!0,gestures:[...m.custom.legendInteractions(),...a.gestures.sort((e,t)=>(t.prio||0)-(e.prio||0)),...f.gestures,...p.gestures]},y=[Jm({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),y.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Km(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},s=Xm.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:Zm,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:{[`${Zm}start`](e){a.last=e.scale,e.preventDefault()},[`${Zm}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:Km(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:h})),[g,...y]}const ed=({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}}}),td="lasso",nd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:td,enable(e,n){if(this.started===td||!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!==td&&(i.actions.select.emit("start",td),this.chart.component(e).emit("lassoStart",t),this.started=td)},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",td),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const rd=({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),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,m=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),d=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&d&&d.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(!m.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),m.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,m):r;this.chart.brushFromShapes(m,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(d&&o.actions.tooltip.enabled())if(m.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,d,{nodes:n,opts:o,customTooltipModel:e})}else d.emit("show",t,{nodes:m})}else h&&d.emit("hide")}}}};const id=({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 od=({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 ad(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:c=!1,multiple:u=!1,toLabel:m,onEdited:d}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:d?{bubbleEnd(){d()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:m},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=od(e,t,"range");return{interactions:[e.onEdited?id(e,t):null,r].filter(Boolean),components:[n]}}const sd=/axis|legend/,ld=e=>e.some(e=>sd.test(e.type));function cd({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...n.query.series(Ka.TYPE.MARKER).map(e=>Il(Xa.COMPONENT.MARKER,e)),...n.query.series(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),Xa.COMPONENT.AXIS.MAJOR,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.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===[Xa.COMPONENT.AXIS.MAJOR,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.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=>ld(e)?0:3,debouncer:N,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[rd(e,t)],components:[]}}(s,l)}function ud({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,Xa.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:[od(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Xa.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const md={components:[],interactions:[]};function dd({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,{isDimensionLocked:a,isBarSeriesStacked:s,isLineStacked:l}=o.meta;return!(a||s||l||n?.("rangeSelections"))&&ad({eventName:"minorRange",key:"minor-range-brush",targets:[Xa.COMPONENT.AXIS.MINOR.PRIMARY,`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,...i.query.series(Ka.TYPE.MARKER).filter(e=>e.isPrimary).map(e=>Il(Xa.COMPONENT.MARKER,e)),...i.query.series(Ka.TYPE.LINE).filter(e=>e.isPrimary).map(e=>Il(Xa.COMPONENT.POINT,e))],fillTargets:[Xa.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:Xa.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||md,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||n?.("rangeSelections"))&&ad({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Xa.COMPONENT.AXIS.MINOR.SECONDARY,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...i.query.series(Ka.TYPE.MARKER).filter(e=>!e.isPrimary).map(e=>Il(Xa.COMPONENT.MARKER,e)),...i.query.series(Ka.TYPE.LINE).filter(e=>!e.isPrimary).map(e=>Il(Xa.COMPONENT.POINT,e))],fillTargets:[Xa.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:Xa.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||md,a=ud({actions:e,models:n})||md,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?[Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return ad({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...o.query.series(Ka.TYPE.MARKER).map(e=>Il(Xa.COMPONENT.MARKER,e)),...o.query.series(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?Xa.SCALE.MAJOR_INNER:Xa.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(Xa.FORMATTER.PRIMARY),o=t.scale(Xa.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||md,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=`${Xa.SCALE.COLOR}Range`,{type:l,key:c}=i,u=o[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&ad({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],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})||md;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function hd({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=ed(n);return{interactions:[nd(n,t)],components:[r]}}({key:"lasso",componentTargetKey:i[0],components:i.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]}))},{actions:e})}function pd({chart:e,chartModel:t,colorService:n,context:r,resources:i,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:c,themeService:u,discreteModel:m,seriesModel:d}=s,h={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},p=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return p;const{allSeries:g,seriesComponentKeys:y}=d.meta,[v]=y;let S;const M=f.map(e=>{if("point"===e.type){const t=g.find(t=>e.measureIndex===t.id);if(t)return{...e,component:t.type,scale:t.scale}}if("line"===e.type){const t=e.points.map(e=>{const t=g.find(t=>e.measureIndex===t.id);return t?{...e,component:t.type,scale:t.scale}:{...e,scale:g[0].scale}});return{...e,points:t}}return e});!function(e){e.forEach(e=>{e&&!e.cId&&(e.cId=se.generateId)})}(f);const E=[{key:Xa.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[Xa.COMPONENT.POINT_LABEL]},{key:Xa.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[Xa.COMPONENT.FORECAST_POINT_LABEL]}],x=function(e){const t=[];return e.forEach(e=>{const n=t[t.length-1],r=n?.[0],i=e?.type===r?.type,o=e?.scale===r?.scale;let a=!1;"point"===e?.type?a=o&&i:"line"===e?.type&&(a=i&&o&&!e?.showPoints&&!r?.showPoints),a?n.push(e):t.push([e])}),t}(M);return x.forEach((n,i)=>{const o=`points-addon-combo-chart-${i}`,s=`lines-addon-combo-chart-${i}`;switch(S="point"===n[0].type?n[0]?.scale||g[0]?.scale:n[0]?.points?.[0]?.scale??g[0]?.scale,n[0]?.type){case"point":p.push(Ra({chart:e,chartModel:t,discreteModel:m,colorService:h,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:o})),E.push({key:o,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":p.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:m,scales:d={}}){if(!Array.isArray(u)||0===u.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,f=!(!p||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),S=Ho.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),M=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));M.push(...n)});const E={},x=[];u.forEach(e=>x.push(...(e?.points??[]).map(e=>e.dimensionValue))),x.forEach(e=>{S[e]&&(E[e]?(E[e].innerValues=S[e].innerValues,E[e].minOrder=Math.min(E[e].minOrder,S[e].minOrder),E[e].maxOrder=Math.max(E[e].maxOrder,S[e].maxOrder),E[e].isMinOrderOk=E[e].isMinOrderOk||S[e].isMinOrderOk,E[e].isMaxOrderOk=E[e].isMaxOrderOk||S[e].isMaxOrderOk):E[e]={id:S[e].id,dataNode:S[e].dataNode,qText:S[e].qText,innerValues:S[e].innerValues,minOrder:S[e].minOrder,maxOrder:S[e].maxOrder,isMinOrderOk:S[e].isMinOrderOk,isMaxOrderOk:S[e].isMaxOrderOk},E[e].numInnerValues=(E[e].maxOrder||0)-(E[e].minOrder||0)+1)});const b=M[0];M.forEach(t=>{const n=Oa({point:t,dimensionValueInfo:E,layoutService:i}),r=t?.scale,o=b?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=E[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,m=a&&1===t.measureIndex,h=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,d[r]||e.scale(r),d[o]||e.scale(o));else if(m)c=-n;else if(h&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const C={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==E[r]?Ho.getScaledPosition({scale:n,value:E[r].id,valueInfo:E[r],size:e.component(c)?.rect[p?"width":"height"],align:"center",invert:f,layoutService:i,isContinuous:y}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"line",data:M,settings:{connect:!0,coordinates:{major:p?C:A,minor:p?A:C,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??"linear",line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??ka,stroke:({datum:e})=>Na({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:m,colorService:h,layoutService:l,dockService:c,rtl:r.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:s,scales:a})),n.forEach(n=>{n?.showPoints&&n?.points?n.points.forEach((n,i)=>{const o=`points-${i}-for-${s}`;p.push(Ra({chart:e,chartModel:t,discreteModel:m,colorService:h,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:v,data:[n],key:o})),E.push({key:o,lines:!0,labels:!0,duplicates:!0})}):n?.points&&E.push({key:s,lines:!0,labels:!1,duplicates:!0,points:n.points})})}}),p.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:c}=t.meta.major,{isOneDimensional:u,isStacked:m}=e.meta,d=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:Aa(o),settings:{all:!0,cache:a,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:m?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<s.length;t++){const n=s[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:u?e.value:e.major?.value,orientation:c,pointValue:e=>e.value?.validMeasureValue,rtl:l},style:d.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:c,chartModel:t,themeService:u,configs:E,flags:i.flags,cache:o})),p}function fd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:c,pluginService:u}=n,m=n.layoutService.getLayout(),{options:d}=r,h=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:m,options:d}),p=(f={logicalSize:h,minCenterRatio:0},{layoutModes:te.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}){const{colorService:s,layoutService:l,dockService:c,tooltipService:u,disclaimerService:m}=t,d=function({environment:e,models:t}){const{translator:n,options:r}=e,{themeService:i,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=i.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===r.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return m.getHasSuppressingDisclaimer()?[d]:[...Uc({models:t}),...Sl({models:t,flags:r}),...Bc({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o}),au({models:t,environment:n}),...Al({models:t,environment:n,flags:r}),...Kc({models:t,environment:n,actions:a,viewCache:o,flags:r}),vo({viewState:i,viewCache:o,layoutService:l,dockService:c}),...nu({models:t}),...ru({chart:e,models:t,environment:n}),Gc({models:t,environment:n,viewState:i,viewCache:o}),...s.custom.legendComponents(),iu(t),...tu({chart:e,models:t,viewState:i,viewCache:o,environment:n}),...u.getComponents(),d].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=cd({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=dd({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=hd({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={flags:i},S=function({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...pl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[Xa.SCALE.MINOR.PRIMARY]:fl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:i}),[Xa.SCALE.MINOR.SECONDARY]:fl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:i}),[Xa.SCALE.MINOR.REDUCED_PRIMARY]:gl({layoutService:o,tickModel:s,dockService:u,environment:i}),[Xa.SCALE.MINOR.REDUCED_SECONDARY]:gl({layoutService:o,tickModel:l,dockService:u,environment:i}),...c.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),M=i.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?pd({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:c,context:{},resources:v,viewCache:a,scales:S,models:n}):[],E=u.extendComponents([...g,...y.components,...M]);return{collections:ol({models:n}),scales:S,components:E,formatters:su({models:n}),interactions:Qm({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:p,palettes:c.getPalettes()}}const gd=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})=>{const{width:m,height:d}=i(),[,h]=o(async()=>{if(!(t?.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:h,layoutService:p,refLineModel:f,animationsModel:g,styleModel:y}=n;function v(){t.update({settings:fd({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})})}h.update({width:m,height:d}),i.custom.updateLegend(y),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:c});const S=p.getDataPages();g.meta.isSizeChanging=!0,p.setDataPages([]),v(),p.setDataPages(S),p.meta.isContinuous||await o.command.initialize(),v()},[m,d]);if(h)throw h},yd=[Xa.COMPONENT.AXIS_TITLE.MAJOR,Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Xa.COMPONENT.GRID_LINE,Xa.COMPONENT.ZERO_LINE],vd=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Xa.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Sd=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Xa.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[];const Md={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Ed(e){return Md[e]||e}function xd(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"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=Ed(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=Ed(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 m(){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),m(),c&&u()},off(){c=!1,m()},on(){c=!0,0===l.length&&u()},destroy(){m(),a&&a.destroy(),a=null,o=null,i=null}}}}function bd(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:bd(i,t,n)},i}function Cd(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),bd(i,a,l,e.invert)})}const Ad={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",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};function Nd({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=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 u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const m=Z({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{m[t]=r[t].items[e]});const d=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:u,width:m[a].width,minWidthPx:m[a].minWidthPx,maxWidthPx:m[a].maxWidthPx,maxMajorWidth:d}),p=(u-h)/2,f=p+m.major+h/2;return{item:m,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function Od({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=Z(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let m;m="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const d=i.minor||{};let h;const p={major:m,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{start:{scale:d.scale,ref:"start"},end:{scale:d.scale,ref:"end"},min:{scale:d.scale,ref:"min"},max:{scale:d.scale,ref:"max"},med:{scale:d.scale,ref:"med"}},d)})};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:c});return p}const Td=["oob"];const Ld={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=Od({keys:Td,data:i,defaultSettings:{oob:Ad.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,m=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Nd}){const l=[],{items:c}=r.major;for(let u=0,m=c.length;u<m;u++){const{item:m,boxCenter:d,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=c[u].data,g=[];if(m.oob.show){g.push(Ad.createOob({oob:m.oob,dockValue:a,boxCenter:d,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:Td,symbol:s,dockValue:n});return m}},Id={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Rd=["hat"];function kd(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 wd({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const m=(n+e.major)*l;let d=[{[a]:m,[s]:0+c},{[a]:m+t*u*l,[s]:8},{[a]:m+t*l,[s]:0+c},{[a]:m+t*l,[s]:0+c+10},{[a]:m,[s]:0+c+10}];const h=Z({},e.hat,{type:"path",d:kd(d)});d=[{[a]:m,[s]:0},{[a]:m+t*(1-u)*l,[s]:0+c-8},{[a]:m+t*l,[s]:0},{[a]:m+t*l,[s]:-10},{[a]:m,[s]:-10}];return[h,Z({},e.hat,{type:"path",d:kd(d)})]}const Dd={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=Od({keys:Rd,data:r,defaultSettings:Id,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Nd}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];c.hat.show&&f.push(...wd({item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Rd});return c}};var qd={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Pd={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],separateStacking:!1,orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10,isLineStacked:!1},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,separateStacking:c,isLineStacked:u}=this.settings.settings,m=this.settings.settings.primaryExtremum(),d=this.settings.settings.secondaryExtremum(),h=s.length&&void 0!==m,p=l.length&&void 0!==d;if(!h&&!p)return[];const f=s.map(e=>e.ref),g=l.map(e=>e.ref),y=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[],isLineStacked:s,separateStacking:l}){const c=[],u=[];return o.length&&u.push({isPrimary:!0}),a.length&&u.push({isPrimary:!1}),u.forEach(o=>{const a=o.isPrimary?t:n,u=o.isPrimary?r:i;c.push((({type:e,extremum:t,separateStacking:n,items:r,isLineStacked:i})=>{const o="max"===e?e=>e>t:e=>e<t,a=r.filter(e=>o(((e,t,n)=>{const r=n.isMarker?.value;return t?r?n.point.value:n.point.value<0?n.start.value:n.end.value:e&&r?n.point.value:n.end.value})(i,n,e)));return a})({type:e,extremum:a,items:u,isLineStacked:s,separateStacking: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:c.reduce((e,t)=>e.concat(t),[])})}({type:t,primaryExtremum:m,secondaryExtremum:d,primaryItems:e.filter(e=>f.includes(e.end?.source?.field||e.point?.source?.field)),secondaryItems:e.filter(e=>g.includes(e.end?.source?.field||e.point?.source?.field)),primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u});if(!y.length)return[];const v="horizontal"===n,S=this.rect[v?"width":"height"],M=this.resolver.resolve({data:{items:y},settings:{major:a},scaled:{major:S}}),E=("max"===t?90:-90)-(v?0:90)-(!v&&r?180:0),x=o/2*i,{fill:b}=this.settings.style,C=M.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:b,startAngle:E,x:v?S*e.major:x,y:v?x:S*e.major,data:e.data}));return C}};function zd({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 $d({chart:e,seriesInfo:t}){const n={primary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}},secondary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}}},r=[...t.primary.map(e=>e.key),...t.secondary.map(e=>e.key)];return e.findShapes("path").filter(e=>r.some(t=>t===e.key)).reduce((e,n)=>{let r=t.primary.some(e=>e.key===n.key)?e.primary:e.secondary;return r=Object.hasOwnProperty.call(n.attrs,"stroke-linejoin")?r.linePaths:r.areaPaths,r.push(n),e},n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.lineMap[e]){const[t]=r.linePaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.lineMap[e]=t}return r.lineMap[e]},getArea:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.areaMap[e]){const[t]=r.areaPaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.areaMap[e]=t}return r.areaMap[e]}}}function _d({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Bd({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Xa.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 Fd({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:c,legendTap:u}=t,m=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let d=[c?e=>e.color.value:r[m]].filter(Boolean);if(i&&l&&d.push(e=>e.color.value),!i&&u&&(d=[e=>e.color.value]),!d.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?_d:Bd)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce((e,t,n)=>(d.some(e=>h({value:e(t)}))&&e.push({item:t,index:n}),e),[]):[]}function Vd({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})}function jd({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Xa.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),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/u))})),d=m.map(e=>e.offset),h=d.lastIndexOf(0),p=d.indexOf(1),f=m.slice(-1===h?0:h,-1===p?m.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Hd({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Xa.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,c=0===l?1:l,u=o.domain(),m=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=o(t)||i;m.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];m.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const d=m.map(e=>e.offset),h=d.lastIndexOf(0),p=d.indexOf(1),f=m.slice(-1===h?0:h,-1===p?m.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Ud({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:m}){const d=r[e];if("gradient"!==d.type)return d;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:c}){const u=e.scale(Xa.SCALE.MAJOR),m=e.scale(Xa.SCALE.COLOR),d=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),h=t.filter(e=>-1!==n.indexOf(e.index)),p=("vertical"===o&&c?h.reverse():h).map(e=>e.item),f=p.map(e=>d(e.major.value)),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,S=f.map((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v),M=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:m(t.color.value)||i,r=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((r+(S[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:d,fallback:p,orientation:u,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:c,rtl:m});return("continuous"===h?jd:Hd)({chart:t,selected:a,connection:n,gradient:d,fallback:p})}function Yd({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:h}){const p=t.getLine(l,c),{attrs:f}=p,g=Vd({d:f.d}),y=m.map(t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:m,count:d}){return{path:l.map((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`}).join(""),attrs:u,stroke:Ud({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:f,rtl:d,count:h}));return{lines:y,commands:g}}function Wd({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,rtl:h,highlightArea:p,isLineStacked:f}){const g=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}),y=function({items:e,seriesInfo:t}){const n=e.reduce((e,n,r)=>{const i=n.typeIndex.value;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:n.colorMeasureIdx?.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:g,seriesInfo:n}),{lines:v,areas:S}=y.reduce((n,o)=>{const g=Fd({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l(o.measureIx),chart:e});if(g.length<2)return n;const y=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:g});if(!y.length)return n;const{lines:v,commands:S}=Yd({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:h,count:o.items.length});n.lines.push(...v);const M=function({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:h,commands:p,isLineStacked:f}){const g=t.getArea(l,c);if(!g)return[];const{attrs:y,key:v}=g,S="horizontal"===s,M=e.component(v).rect.computedInner[S?"height":"width"]*e.scale(c?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY)(0),E=[];let x;return m.forEach(e=>{e.forEach((t,n)=>{const r=p[t],i={x:r.x,y:r.y,raw:r.raw};if(0===n||"M"===r.letter||e[n-1]!==e[n]-1)E.push({lines:[i],first:{x:i.x,y:i.y},connection:[e[n]]});else{const t=E[E.length-1];t.lines.push(i),t.connection.push(e[n])}})}),f&&(x=Vd({d:y.d}).reduce((e,t,n)=>(0===n||"M"===t.letter?e.push([t]):e[e.length-1].push(t),e),[])),E.map(t=>{const{lines:l}=t,c=l.map((e,t)=>0===t?`M${e.x},${e.y}`:e.raw);if(f){const e=t.connection[0],n=x.reduce((t,n)=>(t.found||(t.counted+=n.length/2,e<t.counted&&(t.areaCommand=n,t.found=!0)),t),{counted:0,found:!1}),r=x.indexOf(n.areaCommand),i=x.reduce((e,t,n)=>(n<r&&(e+=t.length/2),e),0),o=n.areaCommand,a=o.slice(o.length/2,o.length).reverse();t.connection.map(e=>a[e-i].raw).reverse().forEach((e,t)=>{if(0===t&&"C"===e.charAt(0)){const t=e.substring(1).split(","),n={x:0,y:0};[,,,,n.x,n.y]=t,c.push(`L${n.x},${n.y}`)}else c.push(e)})}else{const e=l[l.length-1],n=S?e.x:M,r=S?M:e.y;c.push(`L${n},${r}`);const i=S?t.first.x:M,o=S?M:t.first.y;c.push(`L${i},${o}`)}return c.push("Z"),{path:`M${c.join("").substring(1)}`,attrs:y,fill:Ud({property:"fill",chart:e,connection:t.connection,attrs:y,selected:u,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,rtl:d}),key:v}})}({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:h,count:o.items.length,commands:S,isLineStacked:f});return p&&n.areas.push(...M),n},{lines:[],areas:[]}),M=[];return v.forEach(e=>M.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"})),p&&S.forEach(e=>M.push({type:"path",d:e.path,fill:e.fill,opacity:e.attrs.opacity})),M}var Xd={require:["chart","renderer"],defaultSettings:{settings:{highlightArea:()=>!0,seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1,isLineStacked:!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:$d({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=Wd({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked});this.renderer.render(e)}),this.addListener("end",()=>{this.renderer.render([])})},render(){this.state.pathModel=$d({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Wd({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked})},destroyed(){this.removeListeners()}};const Kd=()=>{const e=F();return e.use(V),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",xd(e))};e.interaction("hammer",xd(Hammer))}(B)),e.use(Cd),e.renderer("react-qcm",j),e.component("axis-title",H),e.component("disclaimer",U),e.component("scrollbar",rl),e.component("point-label",T),e.component("label-space",qd),e.component("time-axis",Xm.picassoComponents.timeAxis),e.component("axis-overlay",Xm.picassoComponents.axisOverlay),e.component("reference-line-labels",ma),e.component("box-sliced-hat",Dd),e.component("box-out-of-bounds",Ld),e.component("data-out-of-bounds-marker",Pd),e.component("scroll-hint",yo),e.component("brush-highlighter",Xd),e.scale("time",Xm.picassoScales.time),e.symbol("line-point",zd),e},Gd=e=>"[object Object]"===Object.prototype.toString.call(e),Jd=e=>Array.isArray(e);function Zd(e,t){if(e===t)return!0;if(Jd(e)){if(!Jd(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Zd(e[n],t[n]))return!1;return!0}if(Gd(e)){if(!Gd(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!Zd(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function Qd({enable:e=!0}={}){const t=a(),i=()=>Date.now().toString()+Math.random(),[o,s]=n(i()),l={properties:void 0};return r(()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then(e=>{const t=Z(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=Z(!0,{},e),i=Z(!0,{},t);return n.exclude=!Zd(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!Zd(r,i),n}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(i())})};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}},[e]),o}const eh={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},th=e=>void 0===e.marker?eh.circle:eh[e.marker],nh=e=>void 0===e.markerFill||e.markerFill;function rh({series:e,layoutService:t}){switch(ou(e)){case Ka.TYPE.MARKER:return(e=>({marker:th(e),fill:nh(e)}))(e);case Ka.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case Ka.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function ih(e=Ka.NOPE_SERIES,t=!0){return t?e.axis===Ka.AXIS.PRIMARY:e.axis===Ka.AXIS.PRIMARY||ou(e)===Ka.TYPE.BAR}var oh,ah,sh,lh,ch,uh,mh,dh,hh,ph,fh,gh,yh,vh,Sh,Mh,Eh,xh,bh,Ch,Ah,Nh,Oh,Th,Lh,Ih,Rh,kh,wh,Dh,qh,Ph,zh,$h,_h,Bh,Fh,Vh,jh,Hh,Uh,Yh,Wh,Xh,Kh,Gh,Jh,Zh,Qh,ep,tp,np,rp,ip,op,ap,sp,lp,cp,up,mp,dp,hp,pp,fp,gp,yp,vp,Sp,Mp,Ep,xp,bp,Cp,Ap,Np,Op,Tp,Lp,Ip,Rp,kp,wp,Dp,qp,Pp,zp,$p,_p,Bp={exports:{}};function Fp(){if(ah)return oh;ah=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return oh={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Vp(){if(lh)return sh;lh=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return sh=e}function jp(){return ch||(ch=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Fp(),o=Vp(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let m=0;const d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=m++;o(e,i,t),u[e]=i,l[i]=t,c[i]=r,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Bp,Bp.exports)),Bp.exports}function Hp(){if(mh)return uh;mh=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return uh=n=>n?"object"!=typeof n?e:n:t}function Up(){if(hh)return dh;hh=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return dh={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function Yp(){if(fh)return ph;fh=1;const e=Vp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Fp(),{safeRe:r,t:i}=jp(),o=Hp(),{compareIdentifiers:a}=Up();class s{constructor(a,l){if(l=o(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=c[5]?c[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof s||(t=new s(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 r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}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"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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(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===a(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}}return ph=s}function Wp(){if(yh)return gh;yh=1;const e=Yp();return gh=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}}}function Xp(){if(qh)return Dh;qh=1;const e=Yp();return Dh=(t,n,r)=>new e(t,r).compare(new e(n,r))}function Kp(){if(Fh)return Bh;Fh=1;const e=Yp();return Bh=(t,n,r)=>{const i=new e(t,r),o=new e(n,r);return i.compare(o)||i.compareBuild(o)}}function Gp(){if(Wh)return Yh;Wh=1;const e=Xp();return Yh=(t,n,r)=>e(t,n,r)>0}function Jp(){if(Kh)return Xh;Kh=1;const e=Xp();return Xh=(t,n,r)=>e(t,n,r)<0}function Zp(){if(Jh)return Gh;Jh=1;const e=Xp();return Gh=(t,n,r)=>0===e(t,n,r)}function Qp(){if(Qh)return Zh;Qh=1;const e=Xp();return Zh=(t,n,r)=>0!==e(t,n,r)}function ef(){if(tp)return ep;tp=1;const e=Xp();return ep=(t,n,r)=>e(t,n,r)>=0}function tf(){if(rp)return np;rp=1;const e=Xp();return np=(t,n,r)=>e(t,n,r)<=0}function nf(){if(op)return ip;op=1;const e=Zp(),t=Qp(),n=Gp(),r=ef(),i=Jp(),o=tf();return ip=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return i(a,l,c);case"<=":return o(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}}}function rf(){if(mp)return up;mp=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).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.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&d)|(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,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],m),o("caret trim",e);let g=e.split(" ").map(e=>y(e,this.options)).join(" ").split(/\s+/).map(e=>N(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,S=g.map(e=>new i(e,this.options));for(const e of S){if(p(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const M=[...v.values()];return n.set(t,M),M}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>g(t,n)&&e.set.some(e=>g(e,n)&&t.every(t=>e.every(e=>t.intersects(e,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(T(this.set[t],e,this.options))return!0;return!1}}up=t;const n=new(cp?lp:(cp=1,lp=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=Hp(),i=of(),o=Vp(),a=Yp(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:m}=jp(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:h}=Fp(),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)=>(e=e.replace(s[l.BUILD],""),o("comp",e,t),e=E(e,t),o("caret",e),e=S(e,t),o("tildes",e),e=b(e,t),o("xrange",e),e=A(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map(e=>M(e,t)).join(" "),M=(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})},E=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(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})},b=(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 c=v(i),u=c||v(a),m=u||v(s),d=m;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:m&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n})},A=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),N=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,r,i,o,a,s,l,c,u,m,d)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(m)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${m}-${d}`:e?`<${c}.${u}.${+m+1}-0`:`<=${l}`}`.trim(),T=(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 up}function of(){if(hp)return dp;hp=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(">")))))))}}dp=t;const n=Hp(),{safeRe:r,t:i}=jp(),o=nf(),a=Vp(),s=Yp(),l=rf();return dp}function af(){if(fp)return pp;fp=1;const e=rf();return pp=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},pp}function sf(){if(Ap)return Cp;Ap=1;const e=rf();return Cp=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Cp}function lf(){if(Op)return Np;Op=1;const e=Yp(),t=of(),{ANY:n}=t,r=rf(),i=af(),o=Gp(),a=Jp(),s=tf(),l=ef();return Np=(c,u,m,d)=>{let h,p,f,g,y;switch(c=new e(c,d),u=new r(u,d),m){case">":h=o,p=s,f=a,g=">",y=">=";break;case"<":h=a,p=l,f=o,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(c,u,d))return!1;for(let e=0;e<u.set.length;++e){const r=u.set[e];let i=null,o=null;if(r.forEach(e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,o=o||e,h(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)}),i.operator===g||i.operator===y)return!1;if((!o.operator||o.operator===g)&&p(c,o.semver))return!1;if(o.operator===y&&f(c,o.semver))return!1}return!0},Np}var cf=function(){if(_p)return $p;_p=1;const e=jp(),t=Fp(),n=Yp(),r=Up(),i=Wp(),o=function(){if(Sh)return vh;Sh=1;const e=Wp();return vh=(t,n)=>{const r=e(t,n);return r?r.version:null}}(),a=function(){if(Eh)return Mh;Eh=1;const e=Wp();return Mh=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null}}(),s=function(){if(bh)return xh;bh=1;const e=Yp();return xh=(t,n,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,o).version}catch(e){return null}}}(),l=function(){if(Ah)return Ch;Ah=1;const e=Wp();return Ch=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),o=r.compare(i);if(0===o)return null;const a=o>0,s=a?r:i,l=a?i:r,c=!!s.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"},Ch}(),c=function(){if(Oh)return Nh;Oh=1;const e=Yp();return Nh=(t,n)=>new e(t,n).major}(),u=function(){if(Lh)return Th;Lh=1;const e=Yp();return Th=(t,n)=>new e(t,n).minor}(),m=function(){if(Rh)return Ih;Rh=1;const e=Yp();return Ih=(t,n)=>new e(t,n).patch}(),d=function(){if(wh)return kh;wh=1;const e=Wp();return kh=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null}}(),h=Xp(),p=function(){if(zh)return Ph;zh=1;const e=Xp();return Ph=(t,n,r)=>e(n,t,r)}(),f=function(){if(_h)return $h;_h=1;const e=Xp();return $h=(t,n)=>e(t,n,!0)}(),g=Kp(),y=function(){if(jh)return Vh;jh=1;const e=Kp();return Vh=(t,n)=>t.sort((t,r)=>e(t,r,n))}(),v=function(){if(Uh)return Hh;Uh=1;const e=Kp();return Hh=(t,n)=>t.sort((t,r)=>e(r,t,n))}(),S=Gp(),M=Jp(),E=Zp(),x=Qp(),b=ef(),C=tf(),A=nf(),N=function(){if(sp)return ap;sp=1;const e=Yp(),t=Wp(),{safeRe:n,t:r}=jp();return ap=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let a=null;if((o=o||{}).rtl){const e=o.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!a||a.index+a[0].length!==i.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=i.match(o.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===a)return null;const s=a[2],l=a[3]||"0",c=a[4]||"0",u=o.includePrerelease&&a[5]?`-${a[5]}`:"",m=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${s}.${l}.${c}${u}${m}`,o)}}(),O=of(),T=rf(),L=af(),I=function(){if(yp)return gp;yp=1;const e=rf();return gp=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" ")),gp}(),R=function(){if(Sp)return vp;Sp=1;const e=Yp(),t=rf();return vp=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&-1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},vp}(),k=function(){if(Ep)return Mp;Ep=1;const e=Yp(),t=rf();return Mp=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},Mp}(),w=function(){if(bp)return xp;bp=1;const e=Yp(),t=rf(),n=Gp();return xp=(r,i)=>{r=new t(r,i);let o=new e("0.0.0");if(r.test(o))return o;if(o=new e("0.0.0-0"),r.test(o))return o;o=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let a=null;i.forEach(t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":a&&!n(r,a)||(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}),!a||o&&!n(o,a)||(o=a)}return o&&r.test(o)?o:null},xp}(),D=sf(),q=lf(),P=function(){if(Lp)return Tp;Lp=1;const e=lf();return Tp=(t,n,r)=>e(t,n,">",r),Tp}(),z=function(){if(Rp)return Ip;Rp=1;const e=lf();return Ip=(t,n,r)=>e(t,n,"<",r),Ip}(),$=function(){if(wp)return kp;wp=1;const e=rf();return kp=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r))}(),_=function(){if(qp)return Dp;qp=1;const e=af(),t=Xp();return Dp=(n,r,i)=>{const o=[];let a=null,s=null;const l=n.sort((e,n)=>t(e,n,i));for(const t of l)e(t,r,i)?(s=t,a||(a=t)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),m="string"==typeof r.raw?r.raw:String(r);return u.length<m.length?u:r},Dp}(),B=function(){if(zp)return Pp;zp=1;const e=rf(),t=of(),{ANY:n}=t,r=af(),i=Xp(),o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],s=(e,t,s)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=s.includePrerelease?o:a}if(1===t.length&&t[0].semver===n){if(s.includePrerelease)return!0;t=a}const u=new Set;let m,d,h,p,f,g,y;for(const t of e)">"===t.operator||">="===t.operator?m=l(m,t,s):"<"===t.operator||"<="===t.operator?d=c(d,t,s):u.add(t.semver);if(u.size>1)return null;if(m&&d){if(h=i(m.semver,d.semver,s),h>0)return null;if(0===h&&(">="!==m.operator||"<="!==d.operator))return null}for(const e of u){if(m&&!r(e,String(m),s))return null;if(d&&!r(e,String(d),s))return null;for(const n of t)if(!r(e,String(n),s))return!1;return!0}let v=!(!d||s.includePrerelease||!d.semver.prerelease.length)&&d.semver,S=!(!m||s.includePrerelease||!m.semver.prerelease.length)&&m.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,m)if(S&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===S.major&&e.semver.minor===S.minor&&e.semver.patch===S.patch&&(S=!1),">"===e.operator||">="===e.operator){if(p=l(m,e,s),p===e&&p!==m)return!1}else if(">="===m.operator&&!r(m.semver,String(e),s))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=c(d,e,s),f===e&&f!==d)return!1}else if("<="===d.operator&&!r(d.semver,String(e),s))return!1;if(!e.operator&&(d||m)&&0!==h)return!1}return!(m&&g&&!d&&0!==h||d&&y&&!m&&0!==h||S||v)},l=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Pp=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=s(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0}}();return $p={parse:i,valid:o,clean:a,inc:s,diff:l,major:c,minor:u,patch:m,prerelease:d,compare:h,rcompare:p,compareLoose:f,compareBuild:g,sort:y,rsort:v,gt:S,lt:M,eq:E,neq:x,gte:b,lte:C,cmp:A,coerce:N,Comparator:O,Range:T,satisfies:L,toComparators:I,maxSatisfying:R,minSatisfying:k,minVersion:w,validRange:D,outside:q,gtr:P,ltr:z,intersects:$,simplifyRange:_,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}(),uf=G(cf),mf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const df=e=>!e||uf.lt(uf.coerce(e),uf.coerce(mf.BAR_IN_SECONDARY_AXIS)),hf=({layoutService:e})=>{const t=!df(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ka.TYPE.BAR]:0,[Ka.TYPE.LINE]:0,[Ka.TYPE.MARKER]:0};return({series:r=Ka.NOPE_SERIES},i)=>{const o=ih(r,t),a=ou(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,collection:o?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY,options:rh({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter(e=>ou(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,Ka.TYPE.BAR),l=r(i,Ka.TYPE.BAR),c=r(o,Ka.TYPE.BAR),u=e=>n.filter(t=>ou(t)===e),m=u(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),d=u(Ka.TYPE.MARKER).map(e=>({key:Il(Xa.COMPONENT.MARKER,e),type:e.options.marker})),h=d.map(e=>e.key),p=[];l>0&&p.push(`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`),c>0&&p.push(`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`);const f=[...p,...m,...h],{MINI_CHART:g}=Xa.COMPONENT,y=u(Ka.TYPE.LINE).map(e=>Il(g.LINE,e)),v=u(Ka.TYPE.MARKER).map(e=>Il(g.MARKER,e)),S=e.meta.isContinuous?[`${g.BAR}-${Ka.AXIS.PRIMARY}`,`${g.BAR}-${Ka.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:m,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:S,markers:d},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:u,isPrimary:ih}}},pf=(e,t)=>e.filter(({series:e=Ka.NOPE_SERIES})=>ou(e)===t),ff=({series:e=Ka.NOPE_SERIES})=>e.axis!==Ka.AXIS.SECONDARY,gf=({series:e=Ka.NOPE_SERIES})=>e.axis===Ka.AXIS.SECONDARY;function yf(e){return function({layout:t}){const n=x(t,"qHyperCube.qMeasureInfo",[]),r=pf(n,Ka.TYPE.LINE),i=r.length>0,o=me.continuous({layout:t,auto:()=>i&&ie.isTime(!0,t)}),a=!df(x(t,"version","")),s=pf(n,Ka.TYPE.BAR),l=s.length,c=s.filter(ff).length,u=s.filter(gf).length,m=a?c>1||u>1:l>1,d=("grouped"!==x(t,"barGrouping.grouping")||o)&&m,h=!d&&l>1,p=a&&d&&(c>0&&u>1||c>1&&u>0),f=!!t?.qHyperCube?.qDimensionInfo?.[0]?.qLocked,g=e.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&!("area"!==t?.lineType),y=r.filter(ff).length>1||r.filter(gf).length>1,v=g&&t.stackedArea&&y;return{canBeContinuous:ie.canBeContinuous(t),isDiscrete:!o,isContinuous:o,isTime:ie.isTime(o,t),isSnapshot:me.snapshot(t),isBarSeriesStacked:d,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p,isGrouped:h||p,isGroupedByMeasure:h||p,isDimensionLocked:f,groupSize:p?2:l,hasLineSeries:i,isArea:g,isLineStacked:v}}}function vf({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 Sf({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(he).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,{path:"/qHyperCubeDef",rect:vf({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function Mf({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}):Sf({genericObjectModel:e,layoutService:t})}const Ef=e=>"number"==typeof e&&!Number.isNaN(e);function xf({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=>ou(e.series)===Ka.TYPE.BAR),a=i.filter(e=>ou(e.series)===Ka.TYPE.LINE),s=i.filter(e=>ou(e.series)===Ka.TYPE.MARKER);return{min:Math.min(...i.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...i.filter(e=>Ef(e.qMax)).map(e=>e.qMax)),bar:{min:Math.min(...o.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...o.filter(e=>Ef(e.qMax)).map(e=>e.qMax))},line:{min:Math.min(...a.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...a.filter(e=>Ef(e.qMax)).map(e=>e.qMax))},marker:{min:Math.min(...s.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...s.filter(e=>Ef(e.qMax)).map(e=>e.qMax))}}}}function bf({seriesModel:e,isPrimary:t,type:n}){return function({dataPage:r}){const i=e.query.series(n).filter(e=>e.isPrimary===t).map(e=>e.refIndex),{qMatrix:o}=r,a={min:NaN,max:NaN};return o.forEach(e=>{let t=0,n=0;e.slice(1).filter((e,t)=>i.some(e=>e===t)&&"NaN"!==e.qNum).forEach(e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum}),a.min=Number.isNaN(a.min)?t:Math.min(t,a.min),a.max=Number.isNaN(a.max)?n:Math.max(n,a.max)}),a}}function Cf({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r,isLineStacked:i}=t.meta,o=n.query.series(Ka.TYPE.BAR).filter(t=>t.isPrimary===e).length,a=n.query.series(Ka.TYPE.LINE).filter(t=>t.isPrimary===e).length;return(!r||o<2)&&(!i||a<2)?xf({isPrimary:e,layoutService:t,seriesModel:n}):function({isPrimary:e,layoutService:t,seriesModel:n}){const r=xf({isPrimary:e,layoutService:t,seriesModel:n}),i=bf({seriesModel:n,isPrimary:e,type:Ka.TYPE.BAR}),o=bf({seriesModel:n,isPrimary:e,type:Ka.TYPE.LINE});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.line=o({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}}({isPrimary:e,layoutService:t,seriesModel:n})}function Af({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=Cf({isPrimary:e,layoutService:n,seriesModel:i}),{isArea:s}=n.meta;return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:l,max:c}=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=l,o.explicit.max=c,o.meta.hasExplicitMin=!Number.isNaN(l),o.meta.hasExplicitMax=!Number.isNaN(c),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:l,line:c,marker:u}=a({dataPage:t}),m=i.query.seriesByAxis(e).some(e=>ou(e)===Ka.TYPE.BAR),d=i.query.seriesByAxis(e).some(e=>ou(e)===Ka.TYPE.LINE),h=m||s&&d,p=Number((h?Math.min(n,0):n).toFixed(13)),f=Number((h?Math.max(r,0):r).toFixed(13)),g=Number((h?Math.min(l.min,0):l.min).toFixed(13)),y=Number((h?Math.max(l.max,0):l.max).toFixed(13)),v=Number((h?Math.min(c.min,0):c.min).toFixed(13)),S=Number((h?Math.max(c.max,0):c.max).toFixed(13)),M=Number((h?Math.min(u.min,0):u.min).toFixed(13)),E=Number((h?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(p)?p:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(g)?g:0,o.implicit.bar.max=Number.isFinite(y)?y:0,o.implicit.line.min=Number.isFinite(v)?v:0,o.implicit.line.max=Number.isFinite(S)?S:0,o.implicit.marker.min=Number.isFinite(M)?M:0,o.implicit.marker.max=Number.isFinite(E)?E: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)})}}}}function Nf({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 Of({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=rr().domain([e,t]);return r.nice(n),r}(e,t,n),a={start:!0,stop:!0};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 Tf=50,Lf=100,If=200,Rf=125;function kf({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return Tf;case 1:return Lf;case 2:return If;default:return e*Rf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/r))}function wf({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=kf({config:e,layoutService:n,size:o}),c=Of({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),m={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},d="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[d],p=t.formatter(e.formatter),f=()=>{const e=m.ticks.map(p);return!e.some((t,n)=>e.indexOf(t)!==n)&&(e=>{const t=o/m.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!f();e--)c.domain([a,s]),c.nice(e),[m.roundedMin,m.roundedMax]=c.domain(),m.ticks=c.ticks(e);return m}function Df({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function qf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function Pf({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=Of({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}({ticks:s}),c=l?Df:qf;o.ticks=s.filter((e,t,n)=>c({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 u=t.formatter(e.formatter),m=o.ticks.map(u);return m.some((e,t)=>m.indexOf(e)!==t)&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function zf({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 $f({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:m}=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 c=wf({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return Nf({extrema:i,ticks:c.ticks})?c:Pf({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}),d=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:c,count:1});return{min:u,max:m,values:[...zf({ticks:c,extrema:i}).map(e=>({value:e,isMinor:!1})),...d.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value)}}function _f({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-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return $f({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function Bf({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,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=F.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){const r=n.component(t.meta.seriesComponentKeys[0]),i=r?.rect??e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:o}),u=r.query.getExtrema();return _f({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:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function Ff({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return me.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then(e=>({properties:e}))}({layout:t.getLayout(),model:e}).then(e=>{const{properties:t}=e??{};n.properties=t})}}}function Vf({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:Ka.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===Ka.TYPE.LINE?2:t!==Ka.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ka.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function jf({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function Hf({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:m,translator:d}=i,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=L({picasso:s,model:o,app:n,translator:d,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:Xa.SCALE.COLOR}},config:{auto:jf,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>h.wrappedScales,legendComponents:()=>h.legendComponents,legendInteractions:()=>h.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,c={eventName:"legend-c",key:Xa.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:Vf({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:m}=o.getLegend(c,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map(e=>{const{layout:t}=e,{dock:n}=t,r=d[`${Xa.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:m,scales:d}}({viewState:c,chart:r,environment:i,colorService:u,seriesModel:l,layoutService:a,actions:e,styleModel:t});h.wrappedScales=s,h.legendComponents=n,h.legendInteractions=o}}}),u}const Uf="REJECTED",Yf=()=>{},Wf=2,Xf=20,Kf=200,Gf=10;var Jf={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),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-Gf<=t.qTop,i=n.qLeft+n.qWidth+Gf>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+Gf>=t.qTop+t.qHeight,a=n.qLeft-Gf<=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 Zf={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-Gf<=t.qTop,i=n.qTop+n.qHeight+Gf>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var Qf={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 eg="pages";const tg="discretePan";function ng({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:tg,pointers:1,threshold:10,enable(r,i){return this.started===tg||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${tg}start`](e){e.preventDefault(),this.started=tg;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${tg}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)},[`${tg}end`](e){e.preventDefault(),this.started=!1},[`${tg}cancel`](e){e.preventDefault(),this.started=!1}}}}function rg({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=100*Math.sign(-a);r.scroll(s)}}function ig({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(Kf,n));return{width:e,height:Math.max(Xf,Math.min(n*Wf,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 og(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(Uf),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(Uf),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(Uf),n=null)},i}const ag={command:{update:()=>{}}};function sg({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=ag,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{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()&&c&&c();const u=r(l);return o(i(u)).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:ig({layoutService:r}),request:c({definitionPath:o}),process:og(n),connectionless:r.meta.isSnapshot,processDataPage:a}),m=O((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==Uf)throw e})},50);return function(e,{onProcessing:t=Yf,onDataPage:n=Yf}={}){m(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var lg={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 cg={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 ug(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function mg(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 dg(e){return mg(e.qMatrix,e=>e[0].qElemNumber)-1}var hg={inTotal:function({layoutService:e}){const t=ug(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=ug(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=ug(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=dg(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const pg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function fg(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return pg(e,n);const r=((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})(t.qMatrix,n);return r.successful?r.count:pg(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return pg(e,n);return mg(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var gg={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=fg(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:c}=n,u=fg(t).area(e(),l,a.qArea),m=dg(a),d=a.qArea.qHeight+m,h=c===o?(r.inView-d)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+d/r.inView]}};function yg({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:m,SQUEEZE:d,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,S=v/l>=d;switch(f){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/h:S?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:c,fontSize:u,tiltAngle:m}=s.settings.settings.labels,{height:d}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return d>o;const h=(90-m)*(Math.PI/180);return d>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:d,label:y})?v/m:l:v/m}}function vg({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:m,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?lg:n?r?hg:gg:cg}({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=u({layoutService:r});return{inTotal:l,inView:yg({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(1e4/(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})=>m({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?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 Sg({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:m,viewState:d,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=vg({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:m,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})||d.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),d.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),d.set("scrollOffset",{start:a.start.item,end:a.end.item})));d.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})),d.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 c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=d.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}),u=g({pixelOffset:c,items:a});d.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const m=p.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(m,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),d.preventSet("scrollOffset",{start:u.start.item,end:u.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 Mg({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:m,axisKey:d,renderer:h,areaBuffer:p,processDataPage:f=()=>{}}={}}){const g=A(),y=function({qMode:e}){switch(e){case"K":return Zf;case"T":return Qf;default:return Jf}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(eg,[]),{add:t=>{const n=e.get(eg);n.length=0,n.push(t)},getCurrent:()=>e.get(eg)[0],getAll:()=>e.get(eg),contains:n=>t(e.get(eg)[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 S=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),M=sg({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:f}),E=Sg({chart:e,componentKey:n,state:g,dataStore:v,pageData:M,layoutService:i,dockService:o,itemWidths:s,getRect:m,axisKey:d,renderer:h,areaBuffer:S,viewState:l,rtl:c}),b=function({layoutService:e,dataStore:t}){return function(n){const r=x(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),C=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[ng({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:rg({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:E});return{interactions:C,query:{getCanScroll:()=>E.enabled(),getItemSize:()=>E.itemSize(),getScaleRange:()=>E.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>E.initialize(),scrollTo:e=>E.scrollToRelative(e),setSnapshotData:e=>b(e)}}}var Eg={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 xg({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 bg({layoutService:e,dockService:t,themeService:n,colorService:r,flags:i}){const{BAR:o,LINE:a,POINT:s}=Fl,l=n.getStyles(),c=xg({layoutService:e,key:"bar"}),u=xg({layoutService:e,key:"line"}),m=()=>{const e=c({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>i.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find(e=>e.key===t):void 0,h=(e,t)=>{const n=r.getPaletteColor;if(e?.color&&n){const r=n(e);return"none"===r&&e.index>0?e?.color??t:r??t}return t};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter(e=>"bar"===e.key).length,getWidthFn:()=>()=>c({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!m(),getStrokeWidth:()=>m(),getStrokeColor:()=>h(c({property:"strokeColor"}),o.STROKE.COLOR),label:{getStyle:()=>{const e=d("bar")?.bar?.label?.value;return{fill:h(e?.color,l.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??12,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>u({property:"lineCurve",defaultValue:a.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>u({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?a.WIDTH.FULL.DEFAULT:a.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=u({property:"lineType",defaultValue:a.TYPE.SOLID});return e&&a.TYPE[e.toUpperCase()]}},point:{getSize:()=>u({property:"dataPointSize",defaultValue:s.SIZE.DEFAULT}),label:{getStyle:()=>{const e=d("line")?.line?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{const e=d("marker")?.marker?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{const e=d("axis")?.axis?.title;return{fontFamily:e?.fontFamily??l.axis.title.fontFamily,fontSize:e?.fontSize??l.axis.title.fontSize,color:h(e?.color,l.axis.title.color)}}},label:{getStyle:()=>{const e=d("axis")?.axis?.label?.name;return{fill:h(e?.color,l.axis.label.name.color),fontSize:e?.fontSize??l.axis.label.name.fontSize,fontFamily:e?.fontFamily??l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=d("legend")?.legend?.title;return{fontFamily:e?.fontFamily??l.legend.title.fontFamily,fontSize:e?.fontSize??l.legend.title.fontSize,color:h(e?.color,l.legend.title.color)}}},label:{getStyle:()=>{const e=d("legend")?.legend?.label;return{fontFamily:e?.fontFamily??l.legend.label.fontFamily,fontSize:e?.fontSize??l.legend.label.fontSize,color:h(e?.color,l.legend.label.color)}}}}}}}function Cg({layoutService:e}){return I({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Ag({dataset:e,data:t,valueData:n}){const{source:r,label:i,value:o}=n,a=e(r.key).field(r.field);return se.shouldUseFormat(a.raw())?"-"===i||""===o||Number.isNaN(o)||"NaN"===o||t.null?.value?"-":a.formatter()(o):i}function Ng({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,layoutService:l,propertiesModel:c,custom:u}){const m=s.getStyles(),{isLineStacked:d}=l.meta,h=({data:e})=>e.major.value,p=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:f}=Xa.COMPONENT,{PRIMARY:g,SECONDARY:y}=Ka.AXIS,v=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=Xa.COMPONENT,{PRIMARY:a,SECONDARY:s}=Ka.AXIS,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[m]=t,{triggerer:d}=l,h=d===n.MAJOR?m.data.value:m.data.major.value;if(c){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(c&&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=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===h);if(c&&f&&!g.find(e=>e.data.end?.source?.field!==f.data.end?.source?.field)&&!g.find(e=>e.data.segment?.source?.field!==f.data.source?.field))return{key:f.key,bounds:f.bounds};const y=p||f;return!(c||!y||g.find(e=>e.data.end?.source?.field!==y.data.end?.source?.field)||g.find(e=>e.data.segment?.source?.field!==y.data.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:m.fontFamily},main:{key:Xa.COMPONENT.TOOLTIP,getGroupByValue:h,collectibles:[...o.meta.barComponentKeys.map(e=>({key:e,type:"bar",major:h})),...o.meta.pointComponentKeys.map(e=>({key:e,type:"point",major:h})),...o.meta.markers.map(e=>({key:e.key,type:e.type,major:h}))],triggers:[{keys:[Xa.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:p},placement:v},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${f}-max-${g}`,`${f}-max-${y}`,`${f}-min-${g}`,`${f}-min-${y}`,`${Xa.COMPONENT.BAR_OOB}-max-${g}`,`${Xa.COMPONENT.BAR_OOB}-max-${y}`,`${Xa.COMPONENT.BAR_OOB}-min-${g}`,`${Xa.COMPONENT.BAR_OOB}-min-${y}`,`${Xa.COMPONENT.DATA_OOB_MARKER}-max`,`${Xa.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:h,filter:p},placement:v},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:h,filter:p},placement:v}],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 m=u.hideBasic();m&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),m||(c.push(r.color({nodes:t,property:Xa.SCALE.COLOR})),c.push(...t.map(e=>{const{segment:t,end:o,point:a}=e.data,s=e.key.includes("point-component")&&d?a:t||o,{key:l,field:c}=s.source;return r.measure({label:i.dataset.title(l,c),value:Ag({dataset:n,data:e.data,valueData:s})})}))),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:h}=o.data;return u.isEnabled()&&h&&c.push(...h.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:c.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:Xa.COMPONENT.LEGEND_TOOLTIP,component:Xa.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:Og}=Xm,Tg=({picasso:e,chart:t,environment:d,flags:h,viewState:p,viewCache:f,actions:g,selectionService:y})=>{const v=s(),{width:S,height:M}=i(),[E,x]=n(),[b,C]=n(),A=a(),N=l(),O=c(),T=u(),L=m(),I=Qd({enable:!1===E?.layoutService?.meta?.isSnapshot});r(()=>{if(!(v&&t?.update&&d&&p&&y))return;const n=k({source:v,metaAdditionsFn:yf(h)}),{options:r,translator:i}=d,{direction:o}=r,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=Mf({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:A,layoutService:n}),l=w({app:N,translator:i}),c=D({chart:t,layoutService:n,config:{logicalSize:{width:S,height:M},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=hf({layoutService:n}),m=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return Mg({chart:e,actions:s,componentKey:Km(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:Eg,options:{axisKey:Xa.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:A,layoutService:n,dockService:c,seriesModel:u,viewState:p,rtl:"rtl"===d.options.direction,actions:g,picasso:e}):void 0,E=n.meta.isContinuous?Og({model:A,layoutService:n,viewState:p,viewCache:f}):void 0,b=q({theme:d.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),C=Hf({actions:g,appLayoutModel:O,appModel:N,chart:t,environment:d,genericObjectModel:A,layoutService:n,picasso:e,seriesModel:u,viewState:p}),I=bg({layoutService:n,dockService:c,themeService:b,colorService:C,flags:h}),R=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map(e=>e.ref),minorsSecondary:t.meta.secondarySeries.map(e=>e.ref)},virtuals:n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:u}),z=Af({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:E}),$=Af({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:E}),_=Cg({layoutService:n}),B=Bf({config:{measureAxesRef:"measureAxes.0",formatter:Xa.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:z,dockService:c,seriesModel:u,themeService:b}),F=Bf({config:{measureAxesRef:"measureAxes.1",formatter:Xa.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:$,dockService:c,seriesModel:u,themeService:b}),V=Ff({genericObjectModel:A,layoutService:n}),j=fs({flags:h,layout:v,app:N,model:A,picasso:e,chart:t,translator:i,localeInfo:O.qLocaleInfo,embed:L,options:r}),H=Ng({chart:t,actions:g,translator:i,rtl:a,dockService:c,seriesModel:u,colorService:C,themeService:b,layoutService:n,propertiesModel:V,custom:j}),U=Ca({layoutService:n,discreteModel:m}),Y=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Xa.SCALE.MAJOR,MAJOR_INNER:Xa.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Xa.SCALE.MINOR.PRIMARY,SECONDARY:Xa.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,BAR_SECONDARY:`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,AXIS:{MAJOR:Xa.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Xa.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Xa.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Xa.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Xa.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Xa.COLLECTION.MAIN}}}}(n),W=P({picassoInstance:e,plugins:T,pluginArgs:Y}),X=function({options:e,viewCache:t,layoutService:n}){const r={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||r.hasSlicedHats||r.isPartialUpdating||r.isSizeChanging||pa.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:r}}({options:r,viewCache:f,layoutService:n});x({alternativeService:l,selectionService:y,genericObjectModel:A,appModel:N,dockService:c,styleModel:I,layoutService:n,fieldModel:R,seriesModel:u,reducedModel:s,primaryExtremumModel:z,secondaryExtremumModel:$,primaryTickModel:B,secondaryTickModel:F,propertiesModel:V,colorService:C,themeService:b,appLayoutModel:O,tooltipService:H,disclaimerService:_,flags:h,...m&&{discreteModel:m},...E&&{continuousModel:E},refLineModel:U,pluginService:W,animationsModel:X})},[v,A,N,O,d,t?.update,p,y]);const[,R]=o(()=>{if(!E)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:r,primaryExtremumModel:i,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:c,disclaimerService:u,styleModel:m}=E,h=s?()=>{s.update(t.getLayout());const e=s.initialFetch(),n=!t.meta.isSnapshot&&d?.options?.viewState?.zoom;return n&&p.preventSet("zoom",n),e}:()=>Promise.resolve(),f=n.initialize().then(()=>{const e=n.getSettings().field;y&&y.setBrushAliases({colorField:e}),n.custom.updateLegend(m)});return Promise.all([c.initialize(),r.command.initialize(),A?a.command.initialize():Promise.resolve(),f,h(),g.scroll.attachDiscreteModel(l)]).then(()=>Promise.all([i.command.initialize(),o.command.initialize()]).then(async()=>{await e.initialize({properties:a.query.getProperties()||{}}),u.initialize(),C({...E})}))},[E,I]);if(R)throw R;return b};const Lg={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 Ig={query:{getCanScroll:()=>!0}};function Rg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function kg({setSelectionInfo:e,event:t,components:n,clear:r}){const i=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]===Xa.COMPONENT.LEGEND_CATEGORICAL}),r()}function wg({chart:e,actions:t}){const i=S(),o=s(),[a,l]=n();return r(()=>{if(!e?.update||!e.scale)return null;const n=e.scale(Xa.SCALE.MAJOR),r=$({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:Rg},selectionEvents:{start:kg}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}},[i,e?.update,e?.scale]),r(()=>{a?.setLayout&&o&&a.setLayout(o)},[o]),a}const Dg={version:"1.35.3",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},lineType:"line",stackedArea:!1,separateStacking:!0,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 qg=(e,t)=>n=>{const r=n.qHyperCubeDef.qMeasures,i=t.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA"),{lineType:o}=n,a=[0,0,0];let s;const l=i&&"area"===o?["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Area","Visualizations.Descriptions.ComboChart.Dimension.AreaMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarArea","Visualizations.Descriptions.ComboChart.Dimension.BarAreaMarker"]:["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"];if(!r.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<r.length;++e)s=ou(r[e].qDef.series),s===Ka.TYPE.BAR?a[0]=1:s===Ka.TYPE.LINE?a[1]=1:a[2]=1;const c=l[parseInt(a.join(""),2)-1];return e.get(c)},Pg=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===Ka.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===Ka.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function zg(e){const t=e.qHyperCubeDef.qMeasures,n=e.color?.mode;"byDimension"===n&&1===t.length&&ou(t[0].qDef?.series)===Ka.TYPE.LINE?e.color.mode="primary":"byDimension"===n&&t.length>1&&(e.color.mode="byMultiple")}function $g(e){const{translator:t,flags:n}=e;return{dimensions:{min:1,max:1,description:qg(t,n),added(e,t){cs.addCallbackCustomTooltip(t)},moved(e,t){cs.moveCallbackCustomTooltip(t,e)},removed(e,t){cs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){cs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:Pg(t),added({qDef:e},t){zg(t),e.series?.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ka.TYPE.LINE,axis:Ka.AXIS.SECONDARY}:e.series={type:Ka.TYPE.BAR,axis:Ka.AXIS.PRIMARY})},moved(e,t){zg(t)}}}}function _g(e){const t=$g(e);return{properties:Dg,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&&Z(!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 Bg=({models:e,chart:t,viewState:n})=>{M(r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:m}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:m}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:de(t,Xa.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then(e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}}).catch(()=>{}))}),E(()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:de(t,Xa.COMPONENT.LEGEND_CATEGORICAL)}}}),[n,t])};const Fg=e=>{const t=x(e,"qHyperCube.qMeasureInfo",[]).some(({series:e=Ka.NOPE_SERIES})=>ou(e)===Ka.TYPE.LINE);return me.continuous({layout:e,auto:()=>t&&ie.isTime(!0,e)})},Vg=(e,t,n)=>{let r;const i=n||0;r="function"==typeof e?.getMeasureLayouts?e.getMeasureLayouts():t.layout?.qHyperCube?.qMeasureInfo??[];return r.filter(e=>{const{series:t}=e||{};return 0===i?ih(t,!0):!ih(t,!0)})},jg=(e,t)=>{const n=Vg(e,t,0).filter(e=>e.series.type===Ka.TYPE.BAR),r=Vg(e,t,1).filter(e=>e.series.type===Ka.TYPE.BAR),i="stacked"===x(t.layout,"barGrouping.grouping");return!me.continuous({layout:t.layout})&&i&&(n.length>1||r.length>1)},Hg=(e,t,n,r,i=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>i??n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function Ug(e,t,n){const r=_({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground: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",show:(e,t)=>!Fg(t.layout),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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...Hg("bar.label.value","label.value",r,t,"12px"),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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:Hg("line.label.value","label.value",r,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:Hg("marker.label.value","label.value",r,t)}}}}},axisTitleSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:Hg("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:Hg("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Hg("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Hg("legend.label","legend.label",r,t)}}}:void 0}}}const Yg={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",show:(e,t)=>!Fg(t.layout),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 Wg(e){return!!e.qDef?.color?.on}function Xg(e){return Wg(e)&&"primary"===(e.qDef?.color?.mode??"primary")}function Kg(e){return Wg(e)&&"byExpression"===e.qDef?.color?.mode}function Gg(e){if(e?.color?.auto||"byExpression"!==e?.color?.mode)return[];const t=e?.color?.colorExpression;return t?[{qExpression:t,label:e?.color?.expressionLabel??"",id:"colorByExpression"}]:[]}function Jg(e){return Kg(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function Zg(e){(e?.qHyperCubeDef?.qMeasures??[]).forEach((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...Gg(n),...Jg(e)]:Jg(e)}(t,n,e))}function Qg(e){const t={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||Fg(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"}]},n={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=>ou(e.qDef?.series)===Ka.TYPE.MARKER},r={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show:e=>ou(e.qDef?.series)===Ka.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)},i={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)=>Wg(...e)},o=e.anything?.sense?.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>n.measureTitle?.(),component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:t,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:n,seriesMarkerFill:r}},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:i,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{const{primary:e}=o.getDataColorSpecials(),t=o.getDataColorPickerPalettes()[0]?.colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}},show:Xg},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:Kg}}}}}}}}}}}}const ey=10,ty=!0,ny=({series:e=Ka.NOPE_SERIES})=>e.axis!==Ka.AXIS.SECONDARY,ry=({series:e=Ka.NOPE_SERIES})=>e.axis===Ka.AXIS.SECONDARY;function iy(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map(e=>e.qDef)}function oy(e){return e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.LINE).length>0}const ay=(e,t,n)=>{const r=n.layout.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.LINE),i=r.filter(ny).length>1||r.filter(ry).length>1;return"area"===e.lineType&&iy(e,t).length>0&&i};function sy(e,t){const n=e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.BAR);return n.filter(e=>e.series.axis!==Ka.AXIS.SECONDARY).length>t||n.filter(e=>e.series.axis===Ka.AXIS.SECONDARY).length>t}function ly(e){return e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.MARKER).length>0}const cy=(e,t,n,r)=>{const i="vertical"===e.layout.orientation||Fg(e.layout)?"y":"x",o=Vg(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 uy(e){const{translator:t,flags:n,anything:r}=e,i=e?.anything?.sense?.theme,o=e?.anything?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>Zg(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e))}}},s=e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e)),l=(e,t)=>0!==e.filter(e=>e.series.axis===t).length,c={items:{disclaimer:{show:(e,t)=>s(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach(e=>{var t;x(t=e,"qDef.color.on",void 0)&&b(t,"qDef.color.on",!1)})}},simpleItems:{show:(e,t)=>!s(e)}}},u={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,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&sy(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&oy(n.layout),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){b(e,"dataPoint.show",!1),b(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,n,r)=>t.get(Vg(n,r,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&Vg(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&&Vg(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"}}}}}}},m={uses:"settings",items:{simpleStyling:Yg,simpleLabels:u,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:Ug(n,i,t),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)=>sy(n.layout,1)&&!Fg(n.layout)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",defaultValue:"line",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t,r)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&oy(r.layout)},stackedProps:{type:"items",grouped:!1,items:{stackedArea:{ref:"stackedArea",translation:"properties.style.stackedArea",type:"boolean",defaultValue:!1,show:(e,t,r)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&ay(e,t,r)},separateStacking:{ref:"separateStacking",translation:"properties.separateStacking",type:"boolean",defaultValue:!0,readOnly:e=>!e.stackedArea,show:(e,t,r)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&ay(e,t,r)}}},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)=>Fg(n.layout),convertFunctions:(d="vertical",{get:(e,t,n)=>Fg(n.layout)?d:e(t.type),set(e,t,n,r){t(n.type,Fg(r.layout)?d:e,d)}})},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)=>!Fg(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,n)=>oy(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>oy(e)},show:(e,t,n)=>oy(n.layout),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"}]}}},barLabels:{type:"items",snapshot:{tid:"property-barLabels",show:e=>sy(e,0)},show:(e,t,n)=>sy(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>sy(n.layout,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showBarSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&jg(t,n)},showTotalLabels:{ref:"dataPoint.showBarTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&jg(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>ly(e)},show:(e,t,n)=>ly(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const r=[],i=n.layout.qHyperCube.qMeasureInfo,o=l(i,0),a=l(i,1);return o&&r.push({translation:"properties.axis.primary",value:0}),a&&r.push({translation:"properties.axis.secondary",value:1}),r},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,r){const i=r.gridLine.axis??0,o=n.layout.qHyperCube.qMeasureInfo,a=l(o,0),s=l(o,1);return 0===i&&!a&&s?(b(r,"gridLine.axis",1),1):1===i&&a&&!s?(b(r,"gridLine.axis",0),0):i}}},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:a,simpleColors:c,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const r="vertical"===n.layout.orientation||Fg(n.layout)?"x":"y",i=iy(e,n).map(e=>e.qFallbackTitle||"").join(", ");let o;return o=i?t.get(`properties.${r}AxisWithInfo`,[i]):t.get(`properties.${r}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||Fg(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)=>!Fg(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:ey,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=ey: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:!o}},measureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>cy(n,r,t,0),show:(e,t,n)=>Vg(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>cy(n,r,t,0),show:(e,t,n)=>Vg(t,n,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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&ih(e?.series,ty))}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&Vg(t,n,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||Fg(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,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&Vg(t,n,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,n)=>Vg(t,n,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}=r?.measureAxes[0]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(b(i,"measureAxes.0.autoMinMax",!1),b(i,"measureAxes.0.minMax","min"),b(i,"measureAxes.0.min",0)):b(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>cy(n,r,t,1),show:(e,t,n)=>Vg(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>cy(n,r,t,1),show:(e,t,n)=>Vg(t,n,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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&!ih(e?.series,ty))}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&Vg(t,n,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||Fg(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,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&Vg(t,n,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,n)=>Vg(t,n,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}=r?.measureAxes[1]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(b(i,"measureAxes.1.autoMinMax",!1),b(i,"measureAxes.1.minMax","min"),b(i,"measureAxes.1.min",0)):b(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var d;n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(m.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 h={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){if(r?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;return!Fg(n.layout)}}}},measures:Qg(e)}};return{type:"items",component:"accordion",items:{data:h,sorting:{uses:"sortingWithDisclaimer"},addons:(()=>{const e={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=>ih(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,ty)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some(e=>!ih(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,ty)},dimRefLines:{uses:"dimReflines"},plugins:n?.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&n?.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Ha({translator:t,pluginOptions:[{value:"point",translation:t.get("Visualizations.Descriptions.Point")},{value:"line",translation:t.get("Visualizations.Descriptions.Line")}]}):void 0}};return e})(),settings:m}}}function my(e){return e.qHyperCubeDef.qMeasures.filter(e=>ou(e.qDef.series)===Ka.TYPE.LINE).length>0}function dy(e){const t=e.flags.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA");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)=>my(e)||!Fg(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)=>function(e,t){const n=e.qHyperCubeDef.qMeasures.filter(e=>ou(e.qDef.series)===Ka.TYPE.BAR);return t?n.filter(e=>e.qDef.series.axis===Ka.AXIS.PRIMARY).length>1||n.filter(e=>e.qDef.series.axis===Ka.AXIS.SECONDARY).length>1:n.length>1}(e,!df(e?.version??""))&&!Fg(t)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:e=>t&&my(e)},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)=>!Fg(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=>my(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>my(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e))}}}}}}const hy={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 py(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=hy[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 fy(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"});py(r,o,t,n,"bar"),py(r,o,t,n,"line"),py(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 gy(e){const t={},{tooltip:n}=e;if(n){t.chart_tooltip_custom=!n.auto;const e=n.chart?.object?.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const yy=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function vy(e){return{definition:uy(e),softDefinition:dy(e),support:{snapshot:yy,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:fy,extendMetrics:gy,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:$g(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&&Z(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),Zg(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){e.qHyperCubeDef.qDimensions.forEach(xt),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(xt)}(e),function(e){return df(e.version)&&(e.qHyperCubeDef.qMeasures.forEach(e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Ka.NOPE_SERIES),void 0===t.series.type&&(t.series.type=Ka.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ka.TYPE.BAR?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY),t.series.type===Ka.TYPE.BAR&&t.series.axis===Ka.AXIS.SECONDARY&&(t.series.axis=Ka.AXIS.PRIMARY)}),e.version=mf.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}});
7
+ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","qlik-chart-modules/react","qlik-object-conversion"],function(e){"use strict";var t,n,i,r,o,a,s,l,c,u,m,d,h,p,f,g,y,v,S,M,E,x,b,C,A,N,O,T,L,I,R,k,w,D,q,P,z,$,_,B,F,V,j,H,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,i=e.useEffect,r=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,m=e.useEmbed,d=e.useOptions,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,y=e.useLayout,v=e.useAction,S=e.useSelections,M=e.onTakeSnapshot,E=e.useImperativeHandle},function(e){x=e.getValue,b=e.setValue,C=e.createColor,A=e.cache,N=e.debouncer,O=e.throttler,T=e.pointLabelComponent,L=e.colorService,I=e.disclaimerService,R=e.tooltipService,k=e.layoutService,w=e.alternativeService,D=e.dockService,q=e.themeService,P=e.pluginService,z=e.storage,$=e.selectionService,_=e.fontResolver},function(e){B=e.default},function(e){F=e.default},function(e){V=e.default},function(e){j=e.reactRenderer,H=e.axisTitleComponent,U=e.disclaimerComponent},function(e){Y=e.default}],execute:function(){e("default",function(e){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(K).forEach(t=>{e.add(K[t])})}}(e.translator);const{flags:r}=e,a=e.anything?.sense?.isUnsupportedFeature,s=Kd();return{qae:_g(e),ext:vy(e),component(){const e=function(){const[e,t]=n();return i(()=>t(A()),[]),e}(),l=function(){const[e,t]=n();return i(()=>{t(z({viewRange:[0,1],scrollOffset:void 0}))},[]),e}(),c=function(){const e=d(),t=h(),r=m(),o=p(),[a,s]=n(),l=f();return i(()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:r,deviceType:l})},[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=g(),[t,r]=n(!1),[o,a]=n(!1),[s,l]=n(!1),c=function(){const e=g(),[t,r]=n(!1),[o,a]=n({}),[s,l]=n();return i(()=>()=>{a({})},[]),i(()=>{e&&r(!e.select&&!e.active)},[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach(e=>e(...t)),removeListener:(e,t)=>{const n=o[e]?.indexOf(t);n>-1&&o[e].splice(n,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}}(),u=function(){const e=g(),[t,r]=n(!1),[o,a]=n(!1),s=y(),l=h(),c=!!s.qSelectionInfo.qInSelections,u=!!s.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne;i(()=>{e&&r(!e.select&&!e.active)},[e]);const m=e=>{a("boolean"==typeof e?e:!o)};return v(()=>({key:"lasso",label:l.get(o?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:Lg,hidden:!t||!c||u,active:o,action:m}),[c,u,o,t,l.language()]),{action:m,enabled:()=>t,active:()=>o}}();let m=Ig;i(()=>{e&&(r(!e.active),a(!e.active),l(!e.passive))},[e]);const[d]=n({});return d.scroll={enabled:()=>t&&m.query.getCanScroll(),attachDiscreteModel:e=>{m=e||Ig}},d.interact={enabled:()=>o},d.tooltip={enabled:()=>s},d.lasso=u,d.select=c,d}(),S=function({picasso:e,environment:r}){const o=t(),[a,s]=n();return i(()=>{if(!r)return;o.style.overflow="hidden";const t=e({renderer:{prio:[r.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}},[r]),a}({picasso:s,environment:c}),M=wg({chart:S,actions:u}),E=Tg({picasso:s,chart:S,environment:c,flags:r,viewState:l,viewCache:e,actions:u,selectionService:M});!function({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:c,onZoomChange:u}}=Xm,[,m]=o(async()=>{if(!(t?.update&&n&&i&&a&&s))return;const{layoutService:o,colorService:m,continuousModel:d,discreteModel:h,refLineModel:p,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:y}=f.meta,{options:v}=i,{viewState:S={}}=v,{legendScrollOffset:M,scrollOffset:E}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",E),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const x=()=>{p&&p.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...yd,...y]}),g.meta.isPartialUpdating=!1};function b(o=!1){const c=fd({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}),u=o&&[vd({models:n}),...Sd({models:n}),...m.getData()];o?(t.layoutComponents({settings:c,data:u}),g.meta.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0):t.update({settings:c,data:u})}a.onChanged("scrollOffset",x),o.meta.isContinuous&&(a.onChanged("zoom",u({layoutService:o,continuousDataModel:d},x)),a.intercept("zoom",c({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),b(!0),o.setDataPages(C),o.meta.isContinuous||await h.command.initialize(),b(!1),pa.cacheProperties({viewCache:s,layout:o.getLayout()})},[t?.update,n,i]);if(m)throw m}({picasso:s,chart:S,models:E,environment:c,flags:r,viewState:l,viewCache:e,actions:u}),gd({picasso:s,chart:S,models:E,environment:c,flags:r,viewState:l,viewCache:e,actions:u,isUnsupportedFeature:a}),Bg({models:E,chart:S,viewState:l})}}});var W,X,K={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};function G(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J=function(){if(X)return W;X=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var i,r=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!r&&!o)return!1;for(i in n);return void 0===i||e.call(n,i)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(i)return i(t,n).value}return t[n]};return W=function e(){var t,n,i,l,c,u,m=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof m&&(p=m,m=arguments[1]||{},d=2),(null==m||"object"!=typeof m&&"function"!=typeof m)&&(m={});d<h;++d)if(null!=(t=arguments[d]))for(n in t)i=s(m,n),m!==(l=s(t,n))&&(p&&l&&(o(l)||(c=r(l)))?(c?(c=!1,u=i&&r(i)?i:[]):u=i&&o(i)?i:{},a(m,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(m,{name:n,newValue:l}));return m},W}(),Z=G(J);const Q=[["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}]],ee={};Q.forEach(([e,{width:t,height:n}])=>{ee[e]={width:t,height:n}});const te={getLayoutModes:()=>ee,getLayoutMode(e,t){let n;for(n=0;n<Q.length;++n)if(e>=Q[n][1].width&&t>=Q[n][1].height)return Q[n][0];return"SPARK"}};const ne=["$date","$timestamp","$time"],ie=["D","TS","T"],re={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>ne.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ie.some(t=>t===e.qNumFormat.qType)),isTimeDimension:(e,t)=>!!(e&&t&&(re.hasTimeTag(t)&&re.hasUnknownFormat(t)||re.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&re.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&re.canBeContinuousDimension(t[0])},maxNumberOfLines:12},oe=/^[A-Z][A-z0-9_]*$/i,ae={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},se={setValue:(e,t,n)=>{if(!t)return!1;const i=t.split("."),r=i[i.length-1];let o,a=e;for(o=0;o<i.length-1;++o)void 0===a[i[o]]&&(a[i[o]]=Number.isNaN(+i[o+1])?{}:[]),a=a[i[o]];if(void 0!==n){const e=a[r];return a[r]=n,{updated:n,previous:e}}return delete a[r],!1},getValue:(e,t,n)=>{const i=t.split(".");let r,o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}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||oe.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]})},generateId:()=>ae.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},le=e=>se.getValue(e,"qHyperCube.qDimensionInfo",[]),ce=e=>se.getValue(e,"qHyperCube.qMeasureInfo",[]),ue=e=>se.getValue(e,"barGrouping.grouping"),me={continuous({layout:e,properties:t,auto:n}){if(!re.canBeContinuous(e))return!1;const i=t||e;return se.getValue(i,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!i?.preferContinuousAxis},dimensionless:e=>!le(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ue(e)&&(le(e).length>1||ce(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&le(e).length>1&&1===ce(e).length},groupedByMeasure(e){return this.grouped(e)&&1===le(e).length&&ce(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ue(e)&&"butterfly"!==ue(e)||this.continuous({layout:e}))&&(le(e).length>1||ce(e).length>1)},stackedByDimension(e){return this.stacked(e)&&le(e).length>1&&1===ce(e).length},stackedByMeasure(e){return this.stacked(e)&&1===le(e).length&&ce(e).length>1},simple:e=>0===le(e).length||1===le(e).length&&1===ce(e).length,snapshot:e=>!!se.getValue(e,"snapshotData")};function de(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const he=e=>{throw e.isHandled=!0,e};const pe={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?pe.getVerticalDock(t):n?pe.getOppositeDock(pe.getHorizontalDock(t)):pe.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},fe=166/26,ge=12/11,ye={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*fe)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),i=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,i=i?i.length:0;const r=t+n+i;return{latin:e.length-r,cjk:r}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const i={latin:0,cjk:0};let r;void 0===t?e.forEach(e=>{r=ye.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk}):e.forEach(e=>{r=ye.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk});const o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount(e,t,n,i="qText"){const r=ye.getTotalCharacterRatios(t,n,i),o=r.latinRatio*e,a=r.cjkRatio*e;return Math.ceil(ye.stringWidthOverMWidth(o)+a*ge)}},ve=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Se=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Me=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ee={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ve.test(e),isRtlChar:e=>Se.test(e)||Me.test(e),detectTextDirection(e){const t=e?e.length:0;let n,i;for(n=0;n<t;n++){if(i=e[n],Ee.isLtrChar(i))return"ltr";if(Ee.isRtlChar(i))return"rtl"}return"ltr"}},xe={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 i=t.data,r=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&i.fillTooltip){const e=r("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(i.fillTooltip.value):i.fillTooltip.label?i.fillTooltip.label:i.fillTooltip.value,!n.coloring.label){const e=o(i.fillTooltip.source.key).field(i.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===i._fillColor?xe.getNodeFillColor(t):i._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=Ee.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=Ee.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Ee.detectTextDirection(i)},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 i=Ee.detectTextDirection(t.color.label),r=n?[":",t.color.label]:[t.color.label,":"],o=Ee.detectTextDirection(t.color.value);return[{content:r,style:{"text-align":n?"right":"left",direction:i}},{content:n?[t.color.value,xe.getColorSymbol(e,t)]:[xe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,i,r=!1){const o=Ee.detectTextDirection(e.label),a=i?[":",e.label]:[e.label,":"],s=Ee.detectTextDirection(e.value);let l;return l=r?i?[e.value,xe.getColorSymbol(t,n)]:[xe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":i?"right":"left",direction:o}},{content:l,style:{"text-align":i?"left":"right",direction:s,"vertical-align":"middle"}}]}};function be(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ce(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ae(){}var Ne=.7,Oe=1/Ne,Te="\\s*([+-]?\\d+)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Re=/^#([0-9a-f]{3,8})$/,ke=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),we=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),De=new RegExp(`^rgba\\(${Te},${Te},${Te},${Le}\\)$`),qe=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Le}\\)$`),Pe=new RegExp(`^hsl\\(${Le},${Ie},${Ie}\\)$`),ze=new RegExp(`^hsla\\(${Le},${Ie},${Ie},${Le}\\)$`),$e={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 _e(){return this.rgb().formatHex()}function Be(){return this.rgb().formatRgb()}function Fe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ve(t):3===n?new Ye(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?je(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?je(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=ke.exec(e))?new Ye(t[1],t[2],t[3],1):(t=we.exec(e))?new Ye(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=De.exec(e))?je(t[1],t[2],t[3],t[4]):(t=qe.exec(e))?je(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pe.exec(e))?Ze(t[1],t[2]/100,t[3]/100,1):(t=ze.exec(e))?Ze(t[1],t[2]/100,t[3]/100,t[4]):$e.hasOwnProperty(e)?Ve($e[e]):"transparent"===e?new Ye(NaN,NaN,NaN,0):null}function Ve(e){return new Ye(e>>16&255,e>>8&255,255&e,1)}function je(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ye(e,t,n,i)}function He(e){return e instanceof Ae||(e=Fe(e)),e?new Ye((e=e.rgb()).r,e.g,e.b,e.opacity):new Ye}function Ue(e,t,n,i){return 1===arguments.length?He(e):new Ye(e,t,n,null==i?1:i)}function Ye(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function We(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Xe(){const e=Ke(this.opacity);return`${1===e?"rgb(":"rgba("}${Ge(this.r)}, ${Ge(this.g)}, ${Ge(this.b)}${1===e?")":`, ${e})`}`}function Ke(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ge(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return((e=Ge(e))<16?"0":"")+e.toString(16)}function Ze(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new et(e,t,n,i)}function Qe(e){if(e instanceof et)return new et(e.h,e.s,e.l,e.opacity);if(e instanceof Ae||(e=Fe(e)),!e)return new et;if(e instanceof et)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new et(a,s,l,e.opacity)}function et(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function tt(e){return(e=(e||0)%360)<0?e+360:e}function nt(e){return Math.max(0,Math.min(1,e||0))}function it(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}be(Ae,Fe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_e,formatHex:_e,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Be,toString:Be}),be(Ye,Ue,Ce(Ae,{brighter(e){return e=null==e?Oe:Math.pow(Oe,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ne:Math.pow(Ne,e),new Ye(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ye(Ge(this.r),Ge(this.g),Ge(this.b),Ke(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:We,formatHex:We,formatHex8:function(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xe,toString:Xe})),be(et,function(e,t,n,i){return 1===arguments.length?Qe(e):new et(e,t,n,null==i?1:i)},Ce(Ae,{brighter(e){return e=null==e?Oe:Math.pow(Oe,e),new et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ne:Math.pow(Ne,e),new et(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Ye(it(e>=240?e-240:e+120,r,i),it(e,r,i),it(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new et(tt(this.h),nt(this.s),nt(this.l),Ke(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=Ke(this.opacity);return`${1===e?"hsl(":"hsla("}${tt(this.h)}, ${100*nt(this.s)}%, ${100*nt(this.l)}%${1===e?")":`, ${e})`}`}}));const rt=Math.PI/180,ot=180/Math.PI,at=.96422,st=.82521,lt=4/29,ct=6/29,ut=3*ct*ct,mt=ct*ct*ct;function dt(e){if(e instanceof ht)return new ht(e.l,e.a,e.b,e.opacity);if(e instanceof St)return Mt(e);e instanceof Ye||(e=He(e));var t,n,i=yt(e.r),r=yt(e.g),o=yt(e.b),a=pt((.2225045*i+.7168786*r+.0606169*o)/1);return i===r&&r===o?t=n=a:(t=pt((.4360747*i+.3850649*r+.1430804*o)/at),n=pt((.0139322*i+.0971045*r+.7141733*o)/st)),new ht(116*a-16,500*(t-a),200*(a-n),e.opacity)}function ht(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function pt(e){return e>mt?Math.pow(e,1/3):e/ut+lt}function ft(e){return e>ct?e*e*e:ut*(e-lt)}function gt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof St)return new St(e.h,e.c,e.l,e.opacity);if(e instanceof ht||(e=dt(e)),0===e.a&&0===e.b)return new St(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ot;return new St(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new St(e,t,n,null==i?1:i)}function St(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function Mt(e){if(isNaN(e.h))return new ht(e.l,0,0,e.opacity);var t=e.h*rt;return new ht(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}be(ht,function(e,t,n,i){return 1===arguments.length?dt(e):new ht(e,t,n,null==i?1:i)},Ce(Ae,{brighter(e){return new ht(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new ht(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 Ye(gt(3.1338561*(t=at*ft(t))-1.6168667*(e=1*ft(e))-.4906146*(n=st*ft(n))),gt(-.9787684*t+1.9161415*e+.033454*n),gt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),be(St,vt,Ce(Ae,{brighter(e){return new St(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new St(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Mt(this).rgb()}}));var Et={isDark:function(e){return vt(e).l<70}};function xt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}function bt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ct(e){var t;return 1===e.length&&(t=e,e=function(e,n){return bt(t(e),n)}),{left:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}var At=Ct(bt).right,Nt=Math.sqrt(50),Ot=Math.sqrt(10),Tt=Math.sqrt(2);function Lt(e,t,n){var i=(t-e)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=Nt?10:o>=Ot?5:o>=Tt?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=Nt?10:o>=Ot?5:o>=Tt?2:1)}function It(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=Nt?r*=10:o>=Ot?r*=5:o>=Tt&&(r*=2),t<e?-r:r}function Rt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var kt="$";function wt(){}function Dt(e,t){var n=new wt;if(e instanceof wt)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var i,r=-1,o=e.length;if(null==t)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t(i=e[r],r,e),i)}else if(e)for(var a in e)n.set(a,e[a]);return n}function qt(){}wt.prototype=Dt.prototype={constructor:wt,has:function(e){return kt+e in this},get:function(e){return this[kt+e]},set:function(e,t){return this[kt+e]=t,this},remove:function(e){var t=kt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===kt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===kt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===kt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===kt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===kt&&++e;return e},empty:function(){for(var e in this)if(e[0]===kt)return!1;return!0},each:function(e){for(var t in this)t[0]===kt&&e(this[t],t.slice(1),this)}};var Pt=Dt.prototype;qt.prototype={constructor:qt,has:Pt.has,add:function(e){return this[kt+(e+="")]=e,this},remove:Pt.remove,clear:Pt.clear,values:Pt.keys,size:Pt.size,empty:Pt.empty,each:Pt.each};var zt=Array.prototype,$t=zt.map,_t=zt.slice;function Bt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ft(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Vt(){}var jt=.7,Ht=1/jt,Ut="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xt=/^#([0-9a-f]{3,8})$/,Kt=new RegExp("^rgb\\("+[Ut,Ut,Ut]+"\\)$"),Gt=new RegExp("^rgb\\("+[Wt,Wt,Wt]+"\\)$"),Jt=new RegExp("^rgba\\("+[Ut,Ut,Ut,Yt]+"\\)$"),Zt=new RegExp("^rgba\\("+[Wt,Wt,Wt,Yt]+"\\)$"),Qt=new RegExp("^hsl\\("+[Yt,Wt,Wt]+"\\)$"),en=new RegExp("^hsla\\("+[Yt,Wt,Wt,Yt]+"\\)$"),tn={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 nn(){return this.rgb().formatHex()}function rn(){return this.rgb().formatRgb()}function on(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Xt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?an(t):3===n?new cn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?sn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?sn(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=Kt.exec(e))?new cn(t[1],t[2],t[3],1):(t=Gt.exec(e))?new cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Jt.exec(e))?sn(t[1],t[2],t[3],t[4]):(t=Zt.exec(e))?sn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qt.exec(e))?hn(t[1],t[2]/100,t[3]/100,1):(t=en.exec(e))?hn(t[1],t[2]/100,t[3]/100,t[4]):tn.hasOwnProperty(e)?an(tn[e]):"transparent"===e?new cn(NaN,NaN,NaN,0):null}function an(e){return new cn(e>>16&255,e>>8&255,255&e,1)}function sn(e,t,n,i){return i<=0&&(e=t=n=NaN),new cn(e,t,n,i)}function ln(e,t,n,i){return 1===arguments.length?((r=e)instanceof Vt||(r=on(r)),r?new cn((r=r.rgb()).r,r.g,r.b,r.opacity):new cn):new cn(e,t,n,null==i?1:i);var r}function cn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function un(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)}function mn(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function dn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function hn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fn(e,t,n,i)}function pn(e){if(e instanceof fn)return new fn(e.h,e.s,e.l,e.opacity);if(e instanceof Vt||(e=on(e)),!e)return new fn;if(e instanceof fn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new fn(a,s,l,e.opacity)}function fn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function gn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function yn(e){return function(){return e}}function vn(e){return 1===(e=+e)?Sn: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(i){return Math.pow(e+i*t,n)}}(t,n,e):yn(isNaN(t)?n:t)}}function Sn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):yn(isNaN(e)?t:e)}Bt(Vt,on,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:nn,formatHex:nn,formatHsl:function(){return pn(this).formatHsl()},formatRgb:rn,toString:rn}),Bt(cn,ln,Ft(Vt,{brighter:function(e){return e=null==e?Ht:Math.pow(Ht,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?jt:Math.pow(jt,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:un,formatHex:un,formatRgb:mn,toString:mn})),Bt(fn,function(e,t,n,i){return 1===arguments.length?pn(e):new fn(e,t,n,null==i?1:i)},Ft(Vt,{brighter:function(e){return e=null==e?Ht:Math.pow(Ht,e),new fn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?jt:Math.pow(jt,e),new fn(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new cn(gn(e>=240?e-240:e+120,r,i),gn(e,r,i),gn(e<120?e+240:e-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Mn=function e(t){var n=vn(t);function i(e,t){var i=n((e=ln(e)).r,(t=ln(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),a=Sn(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function En(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(n=0;n<i;++n)r[n]=e[n]*(1-o)+t[n]*o;return r}}function xn(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),a=new Array(i);for(n=0;n<r;++n)o[n]=Ln(e[n],t[n]);for(;n<i;++n)a[n]=t[n];return function(e){for(n=0;n<r;++n)a[n]=o[n](e);return a}}function bn(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function Cn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function An(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=Ln(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var Nn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,On=new RegExp(Nn.source,"g");function Tn(e,t){var n,i,r,o=Nn.lastIndex=On.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Nn.exec(e))&&(i=On.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Cn(n,i)})),o=On.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),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,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function Ln(e,t){var n,i,r=typeof t;return null==t||"boolean"===r?yn(t):("number"===r?Cn:"string"===r?(n=on(t))?(t=n,Mn):Tn:t instanceof on?Mn:t instanceof Date?bn:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?xn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?An:Cn:En))(e,t)}function In(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Rn(e){return+e}var kn=[0,1];function wn(e){return e}function Dn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function qn(e){var t,n=e[0],i=e[e.length-1];return n>i&&(t=n,n=i,i=t),function(e){return Math.max(n,Math.min(i,e))}}function Pn(e,t,n){var i=e[0],r=e[1],o=t[0],a=t[1];return r<i?(i=Dn(r,i),o=n(a,o)):(i=Dn(i,r),o=n(o,a)),function(e){return o(i(e))}}function zn(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),o=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=Dn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=At(e,t,1,i)-1;return o[n](r[n](t))}}function $n(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _n(e,t){return function(){var e,t,n,i,r,o,a=kn,s=kn,l=Ln,c=wn;function u(){return i=Math.min(a.length,s.length)>2?zn:Pn,r=o=null,m}function m(t){return isNaN(t=+t)?n:(r||(r=i(a.map(e),s,l)))(e(c(t)))}return m.invert=function(n){return c(t((o||(o=i(s,a.map(e),Cn)))(n)))},m.domain=function(e){return arguments.length?(a=$t.call(e,Rn),c===wn||(c=qn(a)),u()):a.slice()},m.range=function(e){return arguments.length?(s=_t.call(e),u()):s.slice()},m.rangeRound=function(e){return s=_t.call(e),l=In,u()},m.clamp=function(e){return arguments.length?(c=e?qn(a):wn,m):c!==wn},m.interpolate=function(e){return arguments.length?(l=e,u()):l},m.unknown=function(e){return arguments.length?(n=e,m):n},function(n,i){return e=n,t=i,u()}}()(e,t)}function Bn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Fn(e){return(e=Bn(Math.abs(e)))?e[1]:NaN}var Vn,jn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hn(e){if(!(t=jn.exec(e)))throw new Error("invalid format: "+e);var t;return new Un({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Un(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Yn(e,t){var n=Bn(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Hn.prototype=Un.prototype,Un.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Wn={"%":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.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):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 Yn(100*e,t)},r:Yn,s:function(e,t){var n=Bn(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Vn=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Bn(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 Xn(e){return e}var Kn,Gn,Jn,Zn=Array.prototype.map,Qn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ei(e){var t=void 0===e.grouping||void 0===e.thousands?Xn:function(e,t){return function(n,i){for(var r=n.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(n.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(Zn.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=e.decimal+"",o=void 0===e.numerals?Xn:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Zn.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Hn(e)).fill,u=e.align,m=e.sign,d=e.symbol,h=e.zero,p=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):Wn[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="=");var S="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",M="$"===d?i:/[%p]/.test(v)?a:"",E=Wn[v],x=/[defgprs%]/.test(v);function b(e){var n,i,a,d=S,b=M;if("c"===v)b=E(e)+b,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==m&&(C=!1),d=(C?"("===m?m:s:"-"===m||"("===m?"":m)+d,b=("s"===v?Qn[8+Vn/3]:"")+b+(C&&"("===m?")":""),x)for(n=-1,i=e.length;++n<i;)if(48>(a=e.charCodeAt(n))||a>57){b=(46===a?r+e.slice(n+1):e.slice(n))+b,e=e.slice(0,n);break}}f&&!h&&(e=t(e,1/0));var A=d.length+e.length+b.length,N=A<p?new Array(p-A+1).join(c):"";switch(f&&h&&(e=t(N+e,N.length?p-b.length:1/0),N=""),u){case"<":e=d+e+b+N;break;case"=":e=d+N+e+b;break;case"^":e=N.slice(0,A=N.length>>1)+d+e+b+N.slice(A);break;default:e=N+d+e+b}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),b.toString=function(){return e+""},b}return{format:c,formatPrefix:function(e,t){var n=c(((e=Hn(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Fn(t)/3))),r=Math.pow(10,-i),o=Qn[8+i/3];return function(e){return n(r*e)+o}}}}function ti(e,t,n,i){var r,o=It(e,t,n);switch((i=Hn(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fn(t)/3)))-Fn(Math.abs(e)))}(o,a))||(i.precision=r),Jn(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fn(t)-Fn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(e){return Math.max(0,-Fn(Math.abs(e)))}(o))||(i.precision=r-2*("%"===i.type))}return Gn(i)}function ni(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var i,r,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((i=t<e)&&(r=e,e=t,t=r),0===(a=Lt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(r=Math.ceil(t-e+1));++s<r;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(r=Math.ceil(e-t+1));++s<r;)o[s]=(e-s)/a;return i&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return ti(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r=t(),o=0,a=r.length-1,s=r[o],l=r[a];return l<s&&(i=s,s=l,l=i,i=o,o=a,a=i),(i=Lt(s,l,n))>0?i=Lt(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=Lt(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(l/i)*i,t(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(l*i)/i,t(r)),e},e}function ii(){var e=_n(wn,wn);return e.copy=function(){return $n(e,ii())},Rt.apply(e,arguments),ni(e)}Kn=ei({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Gn=Kn.format,Jn=Kn.formatPrefix;var ri=new Date,oi=new Date;function ai(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,i,o){var a,s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<i);return s},r.filter=function(n){return ai(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})},n&&(r.count=function(t,i){return ri.setTime(+t),oi.setTime(+i),e(ri),e(oi),Math.floor(n(ri,oi))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?function(t){return i(t)%e===0}:function(t){return r.count(0,t)%e===0}):r:null}),r}var si=ai(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});si.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ai(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):si:null},si.range;var li=6e4,ci=36e5,ui=864e5,mi=6048e5,di=ai(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()});di.range;var hi=ai(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())*li)/ui},function(e){return e.getDate()-1});function pi(e){return ai(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())*li)/mi})}hi.range;var fi=pi(0),gi=pi(1),yi=pi(2),vi=pi(3),Si=pi(4),Mi=pi(5),Ei=pi(6);fi.range,gi.range,yi.range,vi.range,Si.range,Mi.range,Ei.range;var xi=ai(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()});xi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ai(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},xi.range;var bi=ai(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*li)},function(e,t){return(t-e)/li},function(e){return e.getUTCMinutes()});bi.range;var Ci=ai(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*ci)},function(e,t){return(t-e)/ci},function(e){return e.getUTCHours()});Ci.range;var Ai=ai(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/ui},function(e){return e.getUTCDate()-1});function Ni(e){return ai(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)/mi})}Ai.range;var Oi=Ni(0),Ti=Ni(1),Li=Ni(2),Ii=Ni(3),Ri=Ni(4),ki=Ni(5),wi=Ni(6);Oi.range,Ti.range,Li.range,Ii.range,Ri.range,ki.range,wi.range;var Di=ai(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()});Di.range;var qi=ai(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 Pi(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 zi(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 $i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}qi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ai(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},qi.range;var _i,Bi,Fi={"-":"",_:" ",0:"0"},Vi=/^\s*\d+/,ji=/^%/,Hi=/[\\^$*+?|[\]().{}]/g;function Ui(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function Yi(e){return e.replace(Hi,"\\$&")}function Wi(e){return new RegExp("^(?:"+e.map(Yi).join("|")+")","i")}function Xi(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function Ki(e,t,n){var i=Vi.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Gi(e,t,n){var i=Vi.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ji(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function Zi(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function Qi(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function er(e,t,n){var i=Vi.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function tr(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function nr(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ir(e,t,n){var i=Vi.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function rr(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function or(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function ar(e,t,n){var i=Vi.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function sr(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function lr(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function cr(e,t,n){var i=Vi.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function ur(e,t,n){var i=Vi.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function mr(e,t,n){var i=Vi.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function dr(e,t,n){var i=ji.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function hr(e,t,n){var i=Vi.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function pr(e,t,n){var i=Vi.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function fr(e,t){return Ui(e.getDate(),t,2)}function gr(e,t){return Ui(e.getHours(),t,2)}function yr(e,t){return Ui(e.getHours()%12||12,t,2)}function vr(e,t){return Ui(1+hi.count(xi(e),e),t,3)}function Sr(e,t){return Ui(e.getMilliseconds(),t,3)}function Mr(e,t){return Sr(e,t)+"000"}function Er(e,t){return Ui(e.getMonth()+1,t,2)}function xr(e,t){return Ui(e.getMinutes(),t,2)}function br(e,t){return Ui(e.getSeconds(),t,2)}function Cr(e){var t=e.getDay();return 0===t?7:t}function Ar(e,t){return Ui(fi.count(xi(e)-1,e),t,2)}function Nr(e){var t=e.getDay();return t>=4||0===t?Si(e):Si.ceil(e)}function Or(e,t){return e=Nr(e),Ui(Si.count(xi(e),e)+(4===xi(e).getDay()),t,2)}function Tr(e){return e.getDay()}function Lr(e,t){return Ui(gi.count(xi(e)-1,e),t,2)}function Ir(e,t){return Ui(e.getFullYear()%100,t,2)}function Rr(e,t){return Ui((e=Nr(e)).getFullYear()%100,t,2)}function kr(e,t){return Ui(e.getFullYear()%1e4,t,4)}function wr(e,t){var n=e.getDay();return Ui((e=n>=4||0===n?Si(e):Si.ceil(e)).getFullYear()%1e4,t,4)}function Dr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ui(t/60|0,"0",2)+Ui(t%60,"0",2)}function qr(e,t){return Ui(e.getUTCDate(),t,2)}function Pr(e,t){return Ui(e.getUTCHours(),t,2)}function zr(e,t){return Ui(e.getUTCHours()%12||12,t,2)}function $r(e,t){return Ui(1+Ai.count(qi(e),e),t,3)}function _r(e,t){return Ui(e.getUTCMilliseconds(),t,3)}function Br(e,t){return _r(e,t)+"000"}function Fr(e,t){return Ui(e.getUTCMonth()+1,t,2)}function Vr(e,t){return Ui(e.getUTCMinutes(),t,2)}function jr(e,t){return Ui(e.getUTCSeconds(),t,2)}function Hr(e){var t=e.getUTCDay();return 0===t?7:t}function Ur(e,t){return Ui(Oi.count(qi(e)-1,e),t,2)}function Yr(e){var t=e.getUTCDay();return t>=4||0===t?Ri(e):Ri.ceil(e)}function Wr(e,t){return e=Yr(e),Ui(Ri.count(qi(e),e)+(4===qi(e).getUTCDay()),t,2)}function Xr(e){return e.getUTCDay()}function Kr(e,t){return Ui(Ti.count(qi(e)-1,e),t,2)}function Gr(e,t){return Ui(e.getUTCFullYear()%100,t,2)}function Jr(e,t){return Ui((e=Yr(e)).getUTCFullYear()%100,t,2)}function Zr(e,t){return Ui(e.getUTCFullYear()%1e4,t,4)}function Qr(e,t){var n=e.getUTCDay();return Ui((e=n>=4||0===n?Ri(e):Ri.ceil(e)).getUTCFullYear()%1e4,t,4)}function eo(){return"+0000"}function to(){return"%"}function no(e){return+e}function io(e){return Math.floor(+e/1e3)}!function(e){_i=function(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Wi(r),u=Xi(r),m=Wi(o),d=Xi(o),h=Wi(a),p=Xi(a),f=Wi(s),g=Xi(s),y=Wi(l),v=Xi(l),S={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:fr,e:fr,f:Mr,g:Rr,G:wr,H:gr,I:yr,j:vr,L:Sr,m:Er,M:xr,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:no,s:io,S:br,u:Cr,U:Ar,V:Or,w:Tr,W:Lr,x:null,X:null,y:Ir,Y:kr,Z:Dr,"%":to},M={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:qr,e:qr,f:Br,g:Jr,G:Qr,H:Pr,I:zr,j:$r,L:_r,m:Fr,M:Vr,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:no,s:io,S:jr,u:Hr,U:Ur,V:Wr,w:Xr,W:Kr,x:null,X:null,y:Gr,Y:Zr,Z:eo,"%":to},E={a:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=p[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=m.exec(t.slice(n));return i?(e.w=d[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=y.exec(t.slice(n));return i?(e.m=v[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return C(e,t,n,i)},d:or,e:or,f:mr,g:tr,G:er,H:sr,I:sr,j:ar,L:ur,m:rr,M:lr,p:function(e,t,n){var i=c.exec(t.slice(n));return i?(e.p=u[i[0].toLowerCase()],n+i[0].length):-1},q:ir,Q:hr,s:pr,S:cr,u:Gi,U:Ji,V:Zi,w:Ki,W:Qi,x:function(e,t,i){return C(e,n,t,i)},X:function(e,t,n){return C(e,i,t,n)},y:tr,Y:er,Z:nr,"%":dr};function x(e,t){return function(n){var i,r,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=Fi[i=e.charAt(++s)])?i=e.charAt(++s):r="e"===i?" ":"0",(o=t[i])&&(i=o(n,r)),a.push(i),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function b(e,t){return function(n){var i,r,o=$i(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=zi($i(o.y,0,1))).getUTCDay(),i=r>4||0===r?Ti.ceil(i):Ti(i),i=Ai.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=Pi($i(o.y,0,1))).getDay(),i=r>4||0===r?gi.ceil(i):gi(i),i=hi.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.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),r="Z"in o?zi($i(o.y,0,1)).getUTCDay():Pi($i(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,zi(o)):Pi(o)}}function C(e,t,n,i){for(var r,o,a=0,s=t.length,l=n.length;a<s;){if(i>=l)return-1;if(37===(r=t.charCodeAt(a++))){if(r=t.charAt(a++),!(o=E[r in Fi?t.charAt(a++):r])||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return S.x=x(n,S),S.X=x(i,S),S.c=x(t,S),M.x=x(n,M),M.X=x(i,M),M.c=x(t,M),{format:function(e){var t=x(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=x(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=b(e+="",!0);return t.toString=function(){return e},t}}}(e),_i.format,_i.parse,Bi=_i.utcFormat,_i.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 ro=1e3,oo=6e4,ao=36e5,so=864e5,lo=2592e6,co=31536e6;function uo(e){return new Date(e)}function mo(e){return e instanceof Date?+e:+new Date(+e)}function ho(e,t,n,i,r,o,a,s,l){var c=_n(wn,wn),u=c.invert,m=c.domain,d=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),S=l("%Y"),M=[[a,1,ro],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,oo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,ao],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,so],[i,2,1728e5],[n,1,6048e5],[t,1,lo],[t,3,7776e6],[e,1,co]];function E(s){return(a(s)<s?d:o(s)<s?h:r(s)<s?p:i(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:S)(s)}function x(t,n,i,r){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(i-n)/t,a=Ct(function(e){return e[2]}).right(M,o);a===M.length?(r=It(n/co,i/co,t),t=e):a?(r=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(r=Math.max(It(n,i,t),1),t=s)}return null==r?t:t.every(r)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?m($t.call(e,mo)):m().map(uo)},c.ticks=function(e,t){var n,i=m(),r=i[0],o=i[i.length-1],a=o<r;return a&&(n=r,r=o,o=n),n=(n=x(e,r,o,t))?n.range(r,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?E:l(t)},c.nice=function(e,t){var n=m();return(e=x(e,n[0],n[n.length-1],t))?m(function(e,t){var n,i=0,r=(e=e.slice()).length-1,o=e[i],a=e[r];return a<o&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}(n,e)):c},c.copy=function(){return $n(c,ho(e,t,n,i,r,o,a,s,l))},c}function po(){return Rt.apply(ho(qi,Di,Oi,Ai,Ci,bi,di,si,Bi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const fo={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"}}},go=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:i}=this.settings.settings,[r,o]=t(),a=Math.abs(r)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=fo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:go(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:go(t.shadow.endOffset)}}})(n),c="horizontal"===n&&i,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function vo({viewState:e,viewCache:t,layoutService:n,dockService:i,rtl:r}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:r,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let So;function Mo(){So=So||document.createElement("canvas").getContext("2d")}const Eo={measureTextWidth(e){Mo();const{width:t}=So.measureText(e);return t},lineWrap(e,t,n,i){let r,o;Mo();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,m,d=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof i&&a.length>=i)return a.slice(0,i);for(n&&(So.font=n),o=0;o<a.length;o++){for(m=a[o]||"",d=m.split(/\s+/),[h]=d,u="",r=1;r<d.length;r++)if(l=`${h} ${d[r]}`,c=Eo.measureTextWidth(l),c>t&&("number"!=typeof i||i>s.length)?(s.push(h),h=d[r]):h=l,"number"==typeof i&&s.length>=i){u=d.slice(r+1).join(" ");break}"number"!=typeof i||s.length<i?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${u}`}return s},wordWrap(e,t,n,i,r){if(Mo(),!e||!e.length)return[];n&&(So.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Eo.measureTextWidth(c)<=t?o.push(c):(s=Eo.splitWord(c,t,void 0,i-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?Eo.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=i?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>i?(o=o.splice(0,i),o[o.length-1]=Eo.truncate(o[o.length-1],t,n,r).text):(c=o[o.length-1],c&&c.length>1&&Eo.measureTextWidth(c)>t&&(o[o.length-1]=Eo.truncate(c,t,n,r).text)),o},truncate(e,t,n,i="…"){Mo();let r,o,a,s,l=e;const c=Eo.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(So.font=n),e&&t){if(Eo.measureTextWidth(l)>t){for(r=Math.min(u,l.length);r>0;r--)if(o=l.substring(0,r-1),a=o.trim()+i,Eo.measureTextWidth(a)<=t){s=l.substring(r-1),l=a;break}r||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,i){let r;Mo();let o,a=e,s="",l=[];if(Eo.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/i);for(r=Math.min(e.length,c);r>0&&(a=e.substring(0,r),o=e.substring(r-1,r)," "===o?a=e.substring(0,r-1):a+="-",s=e.substring(r),!(Eo.measureTextWidth(a)<=t));r--);return(!r&&!a||Eo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Eo.measureTextWidth(s)>t?(s=Eo.explodeWord(s,t,n-1,i),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,i)=>(Mo(),e&&t?(n&&(So.font=n),Eo.explodeWord(e,t,i,Math.max(1,Eo.measureTextWidth("i")))):[]),wrapText(e,t,n,i,r){let o;return Number.isNaN(t)?[e]:(o=i>1?Eo.lineWrap(e,t,n,i):[e],o=Eo.wordWrap(o,t,n,i,r),o)},getFontHeight:e=>(Mo(),e&&(So.font=e),1.5*Eo.measureTextWidth("m")),tokenize(e,t,n,i,r,o,a=1){Mo(),t&&(So.font=t);const s=Eo.getFontHeight(),l=a*s;let c=[],u=0,m=[];if(o<s)return[];const d=o?Math.max(1,Math.floor(o/l)):i||1;return Array.isArray(i)?(i.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),i.forEach(e=>{c.push(Number.isNaN(e)||e<=0?d-u:e)})):c=[Number.isNaN(i)||i<=0?d:Math.min(d,i)],Array.isArray(e)?e.forEach((e,n)=>{m.length<d&&(m=m.concat(Eo.wrapText(e,r,t,c[n])))}):m=Eo.wrapText(e,r,t,c[0],n),m}},xo={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",c=i,u=r,m=t<.5?90:-90;return o&&(s="y",l="x",c=r,u=i,m=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};Z.bind(null,!0);const bo=Math.log(10);function Co(e){return 10**e}const Ao={pow10:Co,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/bo,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/bo),i=e/Co(n);return t=i<=1?1:i<=2?2:i<=5?5:10,t*Co(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/bo);const i=e/Co(t);return i<1?(n=5,t--):n=i<2?1:i<5?2:5,n*Co(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return Co(Math.floor(Math.log(Math.abs(e))/bo))},getFraction(e){if(0===e)return 0;return e/Co(Math.floor(Math.log(Math.abs(e))/bo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/bo),i=e/Co(n);return t=Math.ceil(i),7!==t&&9!==t||t++,i>1&&i<=1.5?t=1.5:i>2&&i<=2.5&&(t=2.5),t*Co(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},No=[[2,4,6],[2,4],[3]],Oo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function To(e,t,n){const i=e?e.length:0;let r,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function Lo(e,t,n){let i;const r=e?e.length:0;for(i=0;i<r;i++)To(e[i],t,n)}!function(){let e,t;for(Lo(No,1,10),e=0;e<Oo.length;e++)if(Oo[e])for(t=0;t<Oo[e].length;t++)Array.isArray(Oo[e][t])&&Lo(Oo[e][t])}();const Io={isInside(e,t,n,i){if(!i)return!0;const r=e.position-e.radius,o=e.position+e.radius;return r>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,i=e.position<t.position?t:e;return i.position-i.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 i=Io.findSegmentPositionMeetMin(e,t);return Io.findSegmentPositionMeetMax({center:i,max:i+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const i=Io.findSegmentPositionMeetMax(e,n);return Io.findSegmentPositionMeetMin({center:i,min:i-e.radius},t)},layoutPositionFromMin(e,t,n,i=0){const r=e.length-1;let o,a,s=t;for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.position=Io.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-i)/2),s=o.position+o.radius+i/2;a.position=Io.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,i=0){const r=e.length-1;let o,a,s;const l=Math.max(0,e[r].position+e[r].radius-n);if(0===l)return;let c,u=0;for(o=r;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,Io.getGap(s,a)-i),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=r;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,i=0){const r=e.length-1;if(!(r<0)){if(0===r){const i=e[0];return void(i.position=Io.findSegmentPositionMeetMaxThenMin(i,t,n))}Io.layoutPositionFromMin(e,t,n,i),Io.adjustPositionFromMax(e,t,n,i)}}},Ro=(e,t,n,i=1)=>{const r=e.bandwidth();return n?"start"===t?r:"end"===t?r*(1-i):r*(2-i)/2:"start"===t?0:"end"===t?r*i:r*i/2},ko=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,wo=e=>e.filter(ko),Do=(e,t)=>wo(se.getValue(e,t,[])),qo=e=>ko(e)&&(!1!==e.showValue||!1!==e.showLabel),Po=e=>e.filter(qo),zo=(e,t)=>Po(se.getValue(e,t,[])),$o=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,_o=(e,t,n)=>{const{dimensionRefLineInfo:i}=t;if(i[e])return i[e][n]},Bo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<i},Fo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=i+r},Vo=({value:e,qMin:t})=>"NaN"!==t&&e<t,jo=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ho={isRefLineVisible:ko,getVisibleRefLines:wo,getRefLines:Do,getMeasureRefLines:e=>Do(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Do(e,"refLine.dimRefLines"),isRefLineLabelVisible:qo,getVisibleRefLineLabels:Po,getRefLineLabels:zo,getMeasureRefLineLabels:e=>zo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:zo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:i,align:r,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=Ro(s,r,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!i)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=i;let c;return l=Ro(s,r,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:i,minOrder:r})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:i});for(let i=0;i<n.length;i++){const{id:a,order:s}=n[i],l=e([t,a]);if(void 0!==l)return l-o*(s-r)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=Ro(s,r,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:i})=>{const{isGroupedByDimension:r}=i.meta,o={},a=se.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():se.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=se.getValue(l,c,[]),m=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,i=t[m];o[i]||(o[i]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():r?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],i=u[t][1],r=t+d,a=n[m];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,r),o[a].maxOrder=Math.max(o[a].maxOrder,r),o[a].innerValues[o[a].innerValues.length]={id:i.qElemNumber,order:r}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:r,maxOrder:r,innerValues:[{id:i.qElemNumber,order:r}],dataNode:u[t]},0===t?0===r&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+d,i=t[m];o[i]||(o[i]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:$o,extractInfoFromInputValue:_o,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=$o({refLineLayout:e,layoutService:n});return _o(i,t,"id")},isDiscreteMinOutOfBounds:Bo,isDiscreteMaxOutOfBounds:Fo,isContinuousMinOutOfBounds:Vo,isContinuousMaxOutOfBounds:jo,isOutOfRange:({value:e,qMin:t,qMax:n})=>Vo({value:e,qMin:t})||jo({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Fo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Bo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Uo=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function Yo(e){return e.showValue?`… ${e.valueString}`:"…"}function Wo(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Uo({label:r,labelStyle:t});r.lines=Eo.tokenize(r.title,o,Yo(r),3,n),r.maxNumLines=r.lines.length}}function Xo({title:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=Eo.tokenize(e,t,n,i,r),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function Ko({oobs:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=e.map(e=>Xo({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:i,maxWidth:r})),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 Go(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const Jo=3,Zo=2;function Qo({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const i=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${i}]`,"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 ea=({label:e,dataPages:t,qMin:n,qMax:i})=>{if(void 0!==n&&void 0!==i){const{inputValue:t}=e;if(Ho.isContinuousMaxOutOfBounds({value:t,qMax:i}))return 1;if(Ho.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ho.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ho.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},ta={hasEngineFormat:Qo,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:i,orientation:r,rtl:o,isContinuous:a,isDimension:s}){const l=Ho.getInvert({orientation:r,rtl:o,isContinuous:a}),c="S"===i.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=i.getHyperCubeValue(c),{canBeContinuous:m}=i.meta;let d,h;if(s&&m){const e=i.getLayoutValue("qHyperCube.qDimensionInfo.0");d=e.qMin,h=e.qMax}for(let r=0;r<e.length;r++){const o=e[r],{value:s,align:c,valueInfo:m}=o,p=ea({label:o,dataPages:u,qMin:d,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Ho.getScaledPosition({scale:t,size:n,value:s,valueInfo:m,align:c,invert:l,layoutService:i,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:i,localeInfo:r}){let o;if(n)for(let n=0;n<e.length;n++){const i=e[n],{value:a,inputValue:s,inputValueLabel:l}=i;o=Qo({inputValue:s,inputValueLabel:l,localeInfo:r})?l:t?t(a):a,i.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,i.title=ta.getTitle(i)}else if(i)for(let t=0;t<e.length;t++){const n=e[t],{valueText:i,inputValue:a,inputValueLabel:s}=n;o=Qo({inputValue:a,inputValueLabel:s,localeInfo:r})?s:i,n.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,n.title=ta.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ee.lrm}(${o})${Ee.lrm}`,n.title=ta.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const i=e[n];i.totalWidth=t(i.title,i).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map(n=>t(n,e).width)),getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,i=0){const r=e.length-1;if(r<0)return;let o,a;if([o]=e,o.cMin=t,0!==r){for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-i)/2,a.cMin=o.cMax+i;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 i=t-1,r=e.filter(e=>e.maxNumLines===t),o=Math.min(n,r.length);for(let e=r.length-1;e>=r.length-o;e--)r[e].maxNumLines=i},reduceTotalMaxNumLines(e,t,n){const i=Math.floor(n/t);let r=3;do{const t=ta.getTotalNumLines(e)-i;if(t<=0)return;ta.reduceLabelsHavingMaxNumLines(e,r,t),r--}while(r>1)},reduceMaxNumLines(e,t,n=0){for(let i=0;i<e.length;i++){const r=e[i];r.maxNumLines=Math.max(1,Math.min(r.maxNumLines,Math.floor((Math.max(0,r.cMax-r.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,i){for(let r=0;r<e.length;r++){const o=e[r];o.width=Math.min(t,ta.measureLabelMaxLineWidth(o,i)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const i=e[n],{center:r}=i,o=i[t],a=o/2;i.segment={center:r,range:o,min:r-a,max:r+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:i,upperLimit:r,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:m,rtl:d,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map(e=>e),y=n;ta.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:u,rtl:d,isContinuous:p,isDimension:f}),Go(e,"center"),ta.addLabelsNeighborInfo(e,i,r,o),Wo(e,a,s),ta.reduceTotalMaxNumLines(g,l,r-(g.length-1)*o),"vertical"===u&&(ta.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Uo({label:r,labelStyle:t});r.lines.length>r.maxNumLines&&(r.lines=Eo.tokenize(r.title,o,Yo(r),r.maxNumLines,n))}}(e,a,s)),ta.addLabelsSize(e,s,l,m),ta.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:i,area:r,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=i,{minorCenter:u}=r,{fontSize:m,fontFamily:d,fontStyle:h,fontWeight:p,textDecoration:f,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,i=t.length,r=t.map((t,r)=>{const g={type:"text",text:t,title:Xo({title:e.title,font:a,ellipsis:Yo(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||m,fontFamily:e.fontFamily||d,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(r-(i-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:i,label:r,lineHeight:o,background:a}){const{lines:s}=r,{borderRadius:l=Jo,padding:c={}}=a,{top:u=Zo,bottom:m=Zo,left:d=Zo,right:h=Zo}=c,p=s.length,f={type:"rect",rx:l,ry:l,fill:r.background.fill,width:r.width+(d+h),height:r.height+(u+m),value:r.value,dock:i};return f[n]=e,f[t]=r.segment.position,f.x-=r.width/2+d,f.y-=p*o/2+u,f}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(r)}),y}};function na(e,t,n){let i;const r=typeof t;if("string"===r||"object"===r)i=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;i=e&&e[0]?e[0].formatter():null}return i}function ia(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:i,bottom:r,maxLabelWidth:o}=t;let a=1;return ta.getMaxTextWidth(e)>o&&(Wo(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+i+r}(t,n):function(e,t){const{left:n,right:i,maxLabelWidth:r}=t;return Math.min(r,ta.getMaxTextWidth(e))+n+i}(t,n)}function ra(e,t){return t?e.domain():[0,1]}function oa(e,t,n,i="value"){let r=e.filter(e=>e[i]>=t);r=r.filter(e=>e[i]<=n);const o=e.filter(e=>e[i]<t),a=e.filter(e=>e[i]>n);return{filteredLabels:r,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function aa(e){let t,n=0;for(let i=1;i<10;i++)t=e(i),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 sa(e,t){return e>9?t[1]:t[0]}function la({alignment:e,dockValue:t,oobs:n,style:i,rect:r,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:m,majorAxis:d,minorAxis:h,minorDimension:p,dock:f}=s,g=r[p],y=xo.createOob({oob:xo.getDefaultSettings({size:i.size,fill:i.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:r.width,rendHeight:r.height,flipXY:m,symbol:o});y.dock=f;const v=`c${d}`,S=`c${h}`,M={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[v]=a;const E={type:"text",text:u>9?"9+":u,title:Ko({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle",dock:f};return E[h]=g/2,E[d]=a,[y,M,E]}const ca=e=>{const t=Uo({labelStyle:e}),n=Eo.getFontHeight(t)*(e.lineHeightMultiplicator||1),i=e.gap||12,r=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:i,maxLabelWidth:r,top:o,bottom:a,left:s,right:l}},ua=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 ma={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:i,localeInfo:r}=this.settings,o=!!i||n.meta.canBeContinuous,a=ua(this.settings.labels),s=na(this.chart,this.settings.formatter,e);ta.addLabelTitles({labels:a,formatter:s,isContinuous:i,canBeContinuous:o,localeInfo:r});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:i,layoutService:r})=>{if(n){const[i,r]=ra(t,n);return oa(e,i,r)}if(i){const t=r.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:i}=t;if("NaN"!==n&&"NaN"!==i)return oa(e,n,i,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:i,canBeContinuous:o,layoutService:n});let m;if(this.measureText=(e,n)=>{const{fontSize:i,fontFamily:r,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:i||t.label.fontSize,fontFamily:r||t.label.fontFamily})},u&&u.length){const e=ca(t.label),{dock:n}=this.settings.layout;return ta.measureLabelsWidth(u,this.measureText),m=ia(n,u,e),m}const d=aa(this.measureText),h=l?sa(l,d):0,p=c?sa(c,d):0;return m=Math.max(h,p),m},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:i,theme:r,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||i.meta.canBeContinuous,c=ua(this.settings.labels),{dock:u,rtl:m}=this.settings.layout,{padding:d}=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)}(u),p=function(e,t,n){const i=e[t.minorDimension];return{minorSize:i,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(i-n.right-n.left)/2+n.left:(i-n.top-n.bottom)/2+n.top}}(this.rect,h,d),{orientation:f,majorDimension:g}=h,{majorSize:y}=p,v=ca(n.label),{font:S,lineHeight:M,gap:E,maxLabelWidth:x}=v,b=na(this.chart,this.settings.formatter,e),C=y;ta.addLabelTitles({labels:c,formatter:b,isContinuous:o,canBeContinuous:l,localeInfo:s}),ta.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:i,orientation:f,rtl:m,isContinuous:o,isDimension:a});const[A,N]=ra(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:I,upperCircleSize:R,lowerOobSpace:k,upperOobSpace:w}=function({labels:e,minValue:t,maxValue:n,orientation:i,rtl:r,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:m,filteredLabels:d}=oa(e,t,n,c),h="scaledValue"!==c&&Ho.getInvert({orientation:i,rtl:r,isContinuous:o}),p=function(e,t,n){return n?t:e}(m,u,h),f=function(e,t,n){return n?e:t}(m,u,h),g=p.length,y=f.length,v=aa(l),S=sa(g,v),M=sa(y,v),E=function(e,t,n,i,r){return("vertical"===i?r.top:r.left)+(e>0?t+n:0)}(g,a.oob.size,S,i,s),x=function(e,t,n,i,r){return("vertical"===i?r.bottom:r.right)+(e>0?t+n:0)}(y,a.oob.size,M,i,s);return{filteredLabels:d,lowerOobs:p,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:E,upperOobSpace:x}}({labels:c,minValue:A,maxValue:N,orientation:f,rtl:m,isContinuous:o,style:n,padding:d,measureText:this.measureText,prop:o?"value":"scaledValue"}),D=k,q=y-w;Go(T),Go(L);const P=la({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+I/2,areaProps:h,radius:I/2,font:S}),z=la({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+R/2),areaProps:h,radius:R/2,font:S});ta.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:D,upperLimit:q,labelStyle:v,lineHeight:M,gap:E,maxLabelWidth:x,majorDimension:g,orientation:f,measureText:this.measureText,rtl:m,layoutService:i,isContinuous:o,isDimension:a}),Io.layout(O.map(e=>e.segment),D,q,n.label.gap);const $=O.filter(e=>Io.isInside(e.segment,D,q,o));return ta.createLabels({labels:$,style:n.label,maxLabelWidth:x,areaProps:h,area:p,lineHeight:M,font:S,theme:r}).concat([...P,...z])}};var da={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function ha(e){const{qHyperCube:t,...n}=e,{qAxisData:i,qDataPages:r,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=Z(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=da;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==x(e,t)&&b(e,t,void 0));const i=t.substring(0,n),r=t.substring(n+2),o=r.startsWith(".")?r.substring(1):r;x(e,i,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var pa={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:i}){return r=>{if(e||t||n){if("line"===r.type)return r.tickValue??"axis";if("text"===r.type)return`${r.tickValue} ${r.text}`;if("container"===r.type){const e=r.children.filter(e=>"text"===e.type).map(e=>e.text);return`${r.data.value} ${e.join("")}`}return Math.random()}if(i){if("line"===r.type&&void 0===r.tickValue)return"axis";const e=r.transform&&r.transform.match(/rotate/gi)?"rotated":"horizontal";return`${r.data.group?`${r.data.group.value} `:""}${r.data.value} ${r.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:i,dock:r}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,m=a.height-s.height;e?("left"===r&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==r&&"right"!==r||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==r&&"bottom"!==r||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||i?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+m)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=i,e.y-=r):e.transform=`translate(${-i}, ${-r})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x;0===t.y-n.y&&0===i||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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=r,e.y-=i):(e.x-=i,e.y-=r)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,r=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-=r,e.y2-=r):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=i,e.x2-=i);else{const t="x"===e.major.p?i/e.major.size:r/e.major.size,n="y"===e.minor.p?r/e.minor.size:i/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 i=t.x-n.x;0===t.y-n.y&&0===i||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach(e=>{switch(e.type){case"circle":e.cx-=i,e.cy-=r;break;case"rect":e.x-=i,e.y-=r;break;case"path":e.transform=`translate(${-i}, ${-r})`}})}},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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach(e=>{"image"===e.type?(e.x-=i,e.y-=r):(e.cx-=i,e.cy-=r)})}},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 i=t.x-n.x,r=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-i,l=-r;e.forEach(e=>{switch(e.dock){case"right":i>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":r>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=ha(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=ha(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:fa,extractInfoFromInputValue:ga,resolveValue:ya}=Ho;var va={resolveValue:ya,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const i=fa({refLineLayout:e,layoutService:n});return ga(i,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const i=fa({refLineLayout:e,layoutService:n});return ga(i,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:i}=t,{canBeContinuous:r}=n.meta,o=fa({refLineLayout:e,layoutService:n});return i[o]&&r?i[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=fa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:r}=t;return r[i]}};const Sa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:i,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:m})=>{const d={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:r.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||i.meta.isContinuous?(d.scale=s,d.value=t.refLineExpr.value):(d.valueInfo=va.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:i}),d.value=()=>{const e=Ho.getScaledPosition({scale:a.scale(s),value:va.resolveValue({refLineLayout:t,refLineModel:n,layoutService:i}),valueInfo:d.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:i,isContinuous:m});return Number.isNaN(e)?void 0:e}),d};function Ma({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,dockService:r,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:m,path:d,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!p.length)return!1;const f={key:u,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:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==r.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return p.forEach(o=>{f.lines[l].push(Sa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:i,dockService:r,chart:a,scale:s,axis:l,invert:g,component:m,isContinuous:y}))}),f}const Ea=({isDimension:e,layoutService:t,animationsEnabled:n,style:i,labels:r,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:m,localeInfo:d})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:r,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:m,isDimension:e,localeInfo:d,style:{label:{fontFamily:i.referenceLine.label.name.fontFamily,fontSize:i.referenceLine.label.name.fontSize,fontStyle:i.referenceLine.label.name.fontStyle,fontWeight:i.referenceLine.label.name.fontWeight,textDecoration:i.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?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:i.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:i.referenceLine.outOfBounds.fontFamily,fontSize:i.referenceLine.outOfBounds.fontSize,fill:i.referenceLine.outOfBounds.color,background:{fill:i.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:pa.refLineLabels.trackBy,compensateForLayoutChanges:pa.refLineLabels.compensateForLayoutChanges}}),xa=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:r,theme:o,isContinuous:a})=>{const s=i.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:m,fontStyle:d,fontWeight:h,textDecoration:p}=c||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:m,fontStyle:d,fontWeight:h,textDecoration:p,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=r,f.value=e.refLineExpr.value):(f.value=()=>va.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>va.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>va.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function ba({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,animationsEnabled:r,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:m,key:d,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=>xa({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:a,theme:c,isContinuous:g}));return f.push(Ea({isDimension:e,rtl:m,style:s,dock:o,key:d,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:r,theme:c,isContinuous:g,localeInfo:u})),f}function Ca({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:i,isGroupedByDimension:r}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=me.dimensionless(o),l=Ho.getMeasureRefLines(o),c=Ho.getDimensionRefLines(o,s),u=Ho.getMeasureRefLineLabels(o),m=Ho.getDimensionRefLineLabels(o,s);let d={},h={};const p=()=>!(!c||!c.length)&&!c.every(t=>{const o=Ho.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(i){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:i,qMax:r}=n;return Ho.isOutOfRange({value:t,qMin:i,qMax:r})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&r){const n={valueInfo:h[t]},i="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",r=e.getHyperCubeValue(i);return Ho.isOutOfDataPages({label:n,dataPages:r})}return!0})(o)}),f={isKMode:a,canBeContinuous:i,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:m,dimensionRefLineInfo:h,dimensionValuesInfo:d,query:{getRefLines:e=>Ho.getRefLines(o,e),getRefLineLabels:e=>Ho.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(d=Ho.getDimensionValuesInfo({layout:o,canBeContinuous:i,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=d,c.forEach(t=>{const n=Ho.getInputValue({refLineLayout:t,layoutService:e});d[n]&&(h[n]?(h[n].innerValues=d[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,d[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,d[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||d[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||d[n].isMaxOrderOk):h[n]={id:d[n].id,qText:d[n].qText,innerValues:d[n].innerValues,minOrder:d[n].minOrder,maxOrder:d[n].maxOrder,isMinOrderOk:d[n].isMinOrderOk,isMaxOrderOk:d[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)}))}};return f.update(),f}function Aa(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Na({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const i=C(n);return i.setAlpha(e?.alpha>=0?e.alpha:1),i.isInvalid()?void 0:i.getRGBA()}function Oa({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:i}=e,r=""===e.measureValue?void 0:+e.measureValue;if(Ao.isNumber(r))return r;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return Ao.isNumber(s)&&!(s>=a||0===o)&&1===o?t[i]?.dataNode[s+1]?.qNum:void 0}const Ta=3,La=10,Ia={index:-1,color:"#595959"};function Ra({chart:e,chartModel:t,discreteModel:n,colorService:i,themeService:r,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:m,key:d}){if(!Array.isArray(m)||0===m.length)return!1;const h={resolveUIColor:i.getMain().getPaletteColor},p=r.getTheme(),f="horizontal"===a.meta.major.orientation,g=!(!f||!s),{canBeContinuous:y,isContinuous:v,isButterfly:S}=o.meta,M=o.getLayout(),E=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=C(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const i=n?.bgColor?.color;return Na({color:i,colorModel:t})}({layout:M,colorModel:h})??p.getStyle("object","","backgroundColor"),x=Ho.getDimensionValuesInfo({layout:M,canBeContinuous:y,discreteModel:n,layoutService:o}),b=v?m:m.filter(e=>!!x[e.dimensionValue]),A={};b.map(e=>e.dimensionValue).forEach(e=>{x[e]&&(A[e]?(A[e].innerValues=x[e].innerValues,A[e].minOrder=Math.min(A[e].minOrder,x[e].minOrder),A[e].maxOrder=Math.max(A[e].maxOrder,x[e].maxOrder),A[e].isMinOrderOk=A[e].isMinOrderOk||x[e].isMinOrderOk,A[e].isMaxOrderOk=A[e].isMaxOrderOk||x[e].isMaxOrderOk):A[e]={id:x[e].id,dataNode:x[e].dataNode,qText:x[e].qText,innerValues:x[e].innerValues,minOrder:x[e].minOrder,maxOrder:x[e].maxOrder,isMinOrderOk:x[e].isMinOrderOk,isMaxOrderOk:x[e].isMaxOrderOk},A[e].numInnerValues=(A[e].maxOrder||0)-(A[e].minOrder||0)+1)}),b.forEach(e=>{const t=Oa({point:e,dimensionValueInfo:A,layoutService:o});if(e.validMeasureValue=S&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=A[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),i=t[e.measureIndex+1]?.qNum;if("number"==typeof i&&0!==i){const t=Math.sign(i);e.validMeasureValue=n.reduce((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e},0)}}}const n=Na({colorModel:h,color:e.style?.label?.color||Ia}),i=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=i?n:void 0,e.labelColor=i?r.getTheme().getContrastingColorTo(n):n,e.hasBackground=i,e.maxLabelWidth=100});const N={scale:l,fn:({datum:t})=>{const n=e.scale(l),i=t.value.dimensionValue;if(v)return n("string"==typeof i?""===i?void 0:+i:i);if(void 0===A[i])return;return Ho.getScaledPosition({scale:n,value:A[i].id,valueInfo:A[i],size:e.component(u)?.rect[f?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},O={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"point",data:b,settings:{x:f?N:O,y:f?O:N,strokeWidth:({datum:e})=>e.value.style?.lineThickness??Ta,stroke:({datum:e})=>Na({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?Na({colorModel:h,color:e.value.style?.fill}):E,size:({datum:e})=>`${e.value.style?.dataPointSize??La}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:pa.points.compensateForLayoutChanges}}}const ka=2;const wa=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,Da=!0,qa=!1,Pa={index:0,color:"none"},za={index:-1,color:"#595959"},$a={index:-1,color:"#595959"},_a=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},Ba=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},Fa=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},Va=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>re.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!re.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===wa(n.layout),convertFunctions:{get:(e,t,n,i)=>void 0===i.measureValue?1:0,set(e,t,n,i,r){0===e?(r.measureValue=0,delete r.measureIndex):(r.measureIndex=0,delete r.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===wa(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===wa(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=(i=n.layout,i?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0);var i}}}),ja=()=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:Pa},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:za},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:$a},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:3,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:10,min:3,max:30,step:1}}),Ha=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),Fa(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(Fa),re.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":_a(e);break;case"line":t=e,t.points?.forEach(_a)}var t}):e.plugins.forEach(e=>{switch(e.type){case"point":Ba(e);break;case"line":t=e,t.points?.forEach(Ba)}var t}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:Va({translator:e})},styleSection:{component:"items",items:ja()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:Va({translator:e})},styleSection:{component:"items",items:ja(),show:(e,t,n)=>{const i=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return i?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:qa,showAlpha:Da,defaultValue:za},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return n};var Ua=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,i=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=i.length):(n=arguments[1],t=arguments[2]),t&&i?(i.length>n&&(i=i.substr(0,n)),new e(i,t)):null}},Ya=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,i){let r,o;if(t.length===n)return o=this._value,this.setValue(i),o;const a=t.charAt(n);return this._nextMap?(r=this._nextMap[a],r||(r=new e,this._nextMap[a]=r)):(this._nextMap={},r=new e,this._nextMap[a]=r),r.put(t,n+1,i)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return Ua.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return Ua.newInstanceIfNeeded(e,t,this._value);const i=n.getLongestMatch(e,t+1);return i||Ua.newInstanceIfNeeded(e,t,this._value)}},Wa=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new Ya);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new Wa;let i,r,o;for(i in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[i]&&e.hasOwnProperty(i)&&(t[e[i]]=i);for(r in t)"function"!=typeof t[r]&&t.hasOwnProperty(r)&&(o=t[r].toLowerCase().substr(1),n.put(o,String.fromCharCode(r)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var Xa={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",MARKER_LABEL:"marker-label",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",PRIMARY_LINE:"stacked-collection-primary-line",SECONDARY_LINE:"stacked-collection-secondary-line",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_PRIMARY_LINE:"reduced-collection-primary-line",REDUCED_SECONDARY_LINE:"reduced-collection-secondary-line",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ka={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const Ga={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 Ja(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Za={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function r(e){const t=e;t.onload=null,t.onerror=null,i()}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,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},r(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},i()):(e={height:c,width:u},i()),a(e)},s.onerror=()=>{r(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{r(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function Qa(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const r=function(e){let t,n,i,r,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",i=t.host||"localhost",r=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+i+r+o}return""}(n);r&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,r),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,r));const{height:o,width:a,imageError:s}=await Za.getImageSize(i,t);return{src:i,size:t,height:o,width:a,imageError:s}}async function es(e,t,n,i){const{app:r,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const m=i.data?.customTooltipAttrExps?.value||[];let d;if(-1!==u&&m[u]&&(d=m[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return Qa(s,l,r);if("url"===c)return async function(e,t,n,i,r){let o,a=n.ref;if(r&&r.label&&(a=r.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&Ja(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:r,imageError:s}=await Za.getImageSize(t,i);o={src:t,size:i,height:n,width:r,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Za.getImageSize(a,i);o={src:a,size:i,height:e,width:t,imageError:n}}return o}(r,o,s,l,d);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&d&&d.label){return async function(e,t,n,i){let r;const o=i.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(Ja(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:o,imageError:a}=await Za.getImageSize(e,n);r={src:e,size:n,height:i,width:o,imageError:a}}}catch(e){}return r}(r,n[u],l,d)}return[]}const ts={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const r=t,o=[];for(let t=0;t<r.length;t++)o.push(es(e,i,n,r[t]));const a=await Promise.all(o);for(let e=0;e<r.length;e++)r[e].data.customTooltipImages=[a[e]];return r},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},ns={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let r=t;return r=await ts.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),r},checkIfPromisesExist:({customTooltipModel:e})=>ts.checkIfPromisesExist({customTooltipModel:e})};const is=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,i=e?.qHyperCubeDef?.qMeasures,r=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:Ga.CHART.CHART_PARENT_TYPE,qId:Ga.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:i,qInterColumnSortOrder:r,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},rs=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:Ga.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const os={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",i=Ga.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:i,height:i,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Ga.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":i}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:i,customTooltipModel:r,rtl:o})=>{const a=r,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await os.hide({app:e,customTooltipModel:r});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,r=Ga.CHART.STATE,o=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=r,await e.addSessionAlternateState(r,o),i.miniChartToken.alternateState=r)}({app:e,properties:t,customTooltipModel:r});const s=await async function({app:e,properties:t,customTooltipModel:n}){const i=n;i.miniChartToken.sessionObj?.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const r=Ga.CHART.STATE,o=is(t,r),a=await e.createSessionObject(o),s=rs(t);if(a.id!==Ga.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);i.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===a.id)return i.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:r});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(Ga.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await r.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch(t){await os.hide({app:e,customTooltipModel:r})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(os.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Ga.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=Ga.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function as(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ss(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=Ga.CUSTOM,r={};return r[e]=!0,r[t]=!0,r[n]=!0,r[i]=!0,r}function ls(e){const t=ss();return e.filter(e=>t[e.id])}const cs={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const r=t.element.getBoundingClientRect();return{cx:n-r.left,cy:i-r.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const r={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||r[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(r).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&r[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(i=i.concat(t[0]))}}),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:r,extractedNodes:o=[],hide:a}){if(r&&!a){const{layout:a,chart:s}=r,{attrExps:l}=cs.getAttrExprData(a);o.length||n.length?ns.handlePromises({customTooltipModel:r,nodes:cs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:i}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else r?.miniChartToken?.alternateState&&os.hide({app:i.app,customTooltipModel:r}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>ns.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,i=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[i]||(n[i]=[]),n[i]},getAttrExprData(e){let t=[],n="";const i=e.qHyperCube?.qDimensionInfo||[];if(i.length>0){const r=i.length-1;t=e.qHyperCube?.qDimensionInfo?.[r]?.qAttrExprInfo||[],n=`qDimensionInfo/${r}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[Ga.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[Ga.CUSTOM.QUARANTINE]=[],e.forEach(e=>{i.quarantine[Ga.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=i}(ls(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[Ga.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[Ga.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=as(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const r=this.getAttrExps(e,n[i]);if(0===ls(r).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...r,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let i=[];const r=as(e)||[];[...r,t].forEach(e=>{const t=ls(e.qAttributeExpressions||[]);t.length>0&&(i=t)});const o=ss(),a=r.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(i));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=>e.tooltip?.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:Ee.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ee.detectTextDirection(e.src),i=[],r={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),r.style["text-align"]="center",r.style["white-space"]="nowrap"}else r.style["background-size"]="contain",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center",r.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",r,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function us(e,t,n,i){const r=t.qHyperCube?.[n]?.[i]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return a?(r.forEach((e,t)=>{const r=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===r?"NaN":function(e,t){let n;switch(e.id){case Ga.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Ga.CUSTOM.TITLE:case Ga.CUSTOM.DESCRIPTION:case Ga.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,r);o.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const ms={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>us(t,e,i,n)}}};const ds={getCustomAttrExps(e,t,n){const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},r=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(r))return i;return function(e,t,n,i){const r={[Ga.CUSTOM.TITLE]:!0,[Ga.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=cs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===Ga.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,r="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:r})}else if(r[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===Ga.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),i}(n,r.map(t=>xe.getMeasure(e,t)),e,i)}};function hs({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach(e=>{i.push(ds.getCustomAttrExps(n,e,t))}),i}(e,t,n);return i.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:ps}=Ga;function fs({flags:e,layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},m=function({layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:cs,miniChartToken:{},embed:s}}({layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l}),d="rtl"===c.direction,h=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&x(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const i=hs({dataset:e,nodes:n,layout:t});return{title:i.customTooltipInfoAttrExpsArr.find(e=>e.id===ps.TITLE)?.title,description:i.customTooltipInfoAttrExpsArr.find(e=>e.id===ps.DESCRIPTION)?.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>cs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>cs.getImageRow(e,{h:t,rtl:d}),addImages:({nodes:i})=>{const r=cs.getDataNodes(o,i),{attrExps:a}=cs.getAttrExprData(t);return ns.handlePromises({customTooltipModel:m,nodes:r,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(h()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof i?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>os.createContainer({layout:t,ctx:{h:e,rtl:d}}),createLimitationRow:()=>cs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),d),show:({nodes:e,properties:t})=>os.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:d}),hasAlternateState:()=>!!m.miniChartToken?.alternateState,hide:()=>os.hide({app:n,customTooltipModel:m}),destroy:()=>os.destroyVisualization({customTooltipModel:m})}}}function gs({key:e,source:t,layoutService:n,fieldModel:i,colorService:r,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=i.main,l=o.filter(e=>e.type===Ka.TYPE.BAR),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map(({ref:e,typeIndex:i,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map(e=>({field:e.ref})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"},typeIndex:i,...r.getDatumProps(o),customTooltipAttrExps:ms.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 ys({key:e,series:t,source:n,fieldModel:i,colorService:r,layoutService:o,forceCreate:a=!1,isLineSeries:s=!1}){if(t.length||a){const{major:a,majorNumeric:l}=i.main,{isContinuous:c,isLineStacked:u}=o.meta,m=e=>"NaN"!==e.qNum?e.qNum:0,d=c?l:a,h=o.getLayoutValue("separateStacking",!0),p=[{key:e,data:{extract:t.map(({ref:e,refIndex:t,typeIndex:i,options:s},l)=>({source:n,field:a,value:c?e=>e.qNum:void 0,props:{major:{field:d},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?m:void 0,reduceLabel:"none"},start:0,line:l,typeIndex:i,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:ms.getNode(o.getLayout(),o.meta),...r.getDatumProps(t)}}))}}];return s&&u&&(p[0].data.stack={stackKey:e=>e.value,value:e=>e.end.value,offset:h?"diverging":"none"},t.forEach((e,t)=>{const{props:n}=p[0].data.extract[t];n.point={field:n.end.field,label:n.end.label},n.end.value&&(n.point.value=n.end.value)})),p}return[]}function vs({key:e,layoutService:t,fieldModel:n,series:i}){const{meta:r}=t;if(r.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=i.filter(e=>e.type===Ka.TYPE.BAR),s=r.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:r.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:r.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Ss={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var Ms={OPTIONS:Ss,DEFAULT:Ss.MINI_CHART};function Es({layoutService:e,discrete:t}){return({h:n,rect:i,orientation:r,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===r,c=i[l?"width":"height"];let u=a.qArea.qTop/s*c,m=a.qArea.qHeight/s*c;if(m<o){const e=(o-m)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+m+e-c)),m=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:m}:{top:u,left:0,height:m}}})}}function xs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}const bs=e=>({miniChart:e===Ms.OPTIONS.MINI_CHART.value,bar:e===Ms.OPTIONS.BAR.value,none:e===Ms.OPTIONS.NONE.value}),Cs=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return bs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return bs(Ms.DEFAULT.value);const i=e.getLayoutValue("dimensionAxis.continuousAuto"),r=e.getLayoutValue("preferContinuousAxis");return bs(!n&&(i||!i&&r)?Ms.OPTIONS.NONE.value:Ms.OPTIONS.MINI_CHART.value)};function As({layoutService:e,override:t}){const n=Cs({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ms.OPTIONS.MINI_CHART.value,n.bar=t.value===Ms.OPTIONS.BAR.value,n.none=t.value===Ms.OPTIONS.NONE.value),n}function Ns({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),m=t.component(e),d="horizontal"===o.meta.major.orientation,h=d?l-u.left-m.rect.computedInner.x:c-u.top-m.rect.computedInner.y,p=d?m.rect.computedInner.width:m.rect.computedInner.height,f=d&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[y,v]=xs({layoutService:r,viewState:n,viewCache:i}),S=g<y,M=g>v,E=!S&&!M;return{pixel:f,relative:g,thumb:E?f-y*p:0,beforeThumb:S,afterThumb:M,onThumb:E}}}function Os({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[m,d]=xs({layoutService:r,viewState:n,viewCache:i});return{size:u,thumbSize:(d-m)*u}}}function Ts({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ns({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),u=Os({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;i.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Ls="data-scrollbar-handle";function Is({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ls)||""}const Rs="scrollbarResize",ks=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function ws({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s}){const l=Ns({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Rs}`,options:{event:Rs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Rs]=this[Rs]||{},ks(t)&&Is({e:t})&&(this[Rs].panningEvent=t.srcEvent),!!this[Rs].panningEvent))}},events:{[`${Rs}start`](n){n.preventDefault(),this[Rs]=this[Rs]||{},this[Rs].panningEvent&&t.component(e).emit("dragStart",this[Rs].panningEvent)},[`${Rs}move`](n){if(n.preventDefault(),this[Rs]=this[Rs]||{},!this[Rs].panningEvent)return;const o=i.get("zoom"),a=r.get("continuousMin"),s=r.get("continuousMax"),c=r.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,m=Is({e:this[Rs].panningEvent});let d="start"===m?Math.min(u,o.max):o.min,h="end"===m?Math.max(u,o.min):o.max;d===h&&(d-="start"===m?c:0,h+="end"===m?c:0),i.set("zoom",{min:d,max:h}),t.component(e).emit("render")},[`${Rs}end`](n){n.preventDefault(),this[Rs]=this[Rs]||{},delete this[Rs].panningEvent,t.component(e).emit("dragEnd")},[`${Rs}cancel`](n){n.preventDefault(),this[Rs]=this[Rs]||{},delete this[Rs].panningEvent,t.component(e).emit("dragEnd")}}}}const Ds="scrollbarPan";function qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ns({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),u=Os({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ds}`,options:{event:Ds,threshold:0,enable(i,r){return this[Ds]=this[Ds]||{},!(r&&!this[Ds].isPanning)||!!n.scroll.enabled()&&((!r||r.target===t.element)&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some(t=>t.key===e))}},events:{[`${Ds}start`](n){n.preventDefault();const a=c(n);if(this[Ds]=this[Ds]||{},this[Ds].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?i.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&i.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Ds].relative=a.relative,this[Ds].zoom=i.get("zoom"),this[Ds].zoom.span=this[Ds].zoom.max-this[Ds].zoom.min,this[Ds].zoom.fullSpan=o-n}else if(a.onThumb)this[Ds].offset=a.thumb;else{const e=u();this[Ds].offset=a.beforeThumb?0:e.thumbSize}},[`${Ds}move`](n){n.preventDefault();const a=c(n);if(this[Ds]=this[Ds]||{},o.meta.isContinuous){const e=a.relative-this[Ds].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ds].zoom,l=r.get("continuousMin"),c=r.get("continuousMax");i.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ds].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ds}end`](n){n.preventDefault(),this[Ds]=this[Ds]||{},this[Ds].isPanning=!1,t.component(e).emit("unlockState")},[`${Ds}cancel`](n){n.preventDefault(),this[Ds]=this[Ds]||{},this[Ds].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ps({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Ts({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}),ws({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})]}function zs({componentKey:e,chart:t,actions:n,layoutService:i}){const r=(r,o)=>{if(!i.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(r,o)};return{type:"native",events:{mousemove:e=>r("hover",e),mouseleave:()=>r("leave")}}}const $s={background:"rgba(0, 0, 0, 0.1)"},_s={top:-1,bottom:-1,width:6},Bs={width:2,background:"#595959"};var Fs={before:$s,after:$s,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:_s,endHandle:_s,startHandleBorder:Bs,endHandleBorder:Bs};const Vs={background:"rgba(0, 0, 0, 0.1)"},js={top:-1,bottom:-1,width:6},Hs={width:2,background:"#595959"};var Us={before:Vs,after:Vs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:js,endHandle:js,startHandleBorder:Hs,endHandleBorder:Hs};const Ys={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Ws={pointerEvents:"initial"},Xs={pointerEvents:"none"};const Ks="ew-resize",Gs="default";function Js(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,i=n?e.computedInner.width:e.computedInner.height,r=t.range(),o=n&&t.rtl;return{size:i,start:(o?1-r[1]:r[0])*i,end:(o?1-r[0]:r[1])*i}}function Zs(){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?Ks:Gs}function Qs(e,t,n){const{min:i}=this.settings.settings.size.thumb;if(n-t<i){const r=(i-(n-t))/2,o=Math.max(0,0-(t-r))-Math.max(0,n+r-e);return{size:e,start:t-r+o,end:n+r+o}}return{size:e,start:t,end:n}}function el(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function tl(){const{size:e,start:t,end:n}=Js.call(this);this.renderer.render(this.elements(this.h,Qs.call(this,e,t,n)))}function nl(){const{state:e,settings:t,style:n}=this,i=t.settings.style;return e.style[i]||(e.style[i]=function({id:e,style:t}){const n="slim"===e?Us:Fs;return{container:{...Ys},before:{...Ys,...n.before,...t.before},after:{...Ys,...n.after,...t.after},thumb:{...Ys,...n.thumb,...t.thumb},startHandle:{...Ys,...Ws,...n.startHandle},endHandle:{...Ys,...Ws,...n.endHandle},startHandleBorder:{...Ys,...Xs,...n.startHandleBorder},endHandleBorder:{...Ys,...Xs,...n.endHandleBorder}}}({id:t.settings.style,style:n[i]})),e.style[i]}var il={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(){tl.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||!el.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Is({e:e});t&&(this.state.hover[t]=!0),Zs.call(this),tl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Zs.call(this),tl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Is({e:e});t&&(this.state.drag[t]=!0),Zs.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Zs.call(this),tl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:i}=this.settings.settings.size.area,r="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[r]*i))},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:i}=Js.call(this);return this.elements(e,Qs.call(this,t,n,i))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:i}){const{settings:r}=this.settings,o=r.injections().map(t=>t({h:e,rect:this.rect,orientation:r.orientation,minThumbSize:r.size.thumb.min}));return function({h:e,size:t,start:n,end:i,properties:r,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const m={[r.end]:t-n},d={[r.start]:i},h={left:-3},p={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?d:m},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?m:d},class:"scrollbar--after"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...c?f:h},class:"scrollbar--start-handle",[Ls]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...c?h:f},class:"scrollbar--end-handle",[Ls]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[r.start]:n,[r.end]:t-i},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[y,M,v,...u])}({h:e,size:t,start:n,end:i,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:nl.call(this),continuous:r.isContinuous,invert:"horizontal"===r.orientation&&r.rtl,injections:o})}};function rl({layoutService:e}){return e.meta.isContinuous&&As({layoutService:e}).miniChart}function ol({models:e}){const{layoutService:t,fieldModel:n,seriesModel:i,colorService:r}=e,{primarySeries:o,secondarySeries:a}=i.meta,s=i.query.series(Ka.TYPE.LINE),l=s.filter(e=>e.isPrimary),c=s.filter(e=>!e.isPrimary),u=[...ys({forceCreate:!0,key:Xa.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:r,layoutService:t}),...ys({key:Xa.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:r,layoutService:t}),...ys({key:Xa.COLLECTION.LINE,series:s,fieldModel:n,colorService:r,layoutService:t}),...ys({key:Xa.COLLECTION.PRIMARY_LINE,series:l,fieldModel:n,colorService:r,layoutService:t,isLineSeries:!0}),...ys({key:Xa.COLLECTION.SECONDARY_LINE,series:c,fieldModel:n,colorService:r,layoutService:t,isLineSeries:!0}),...gs({key:Xa.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:r,series:o}),...gs({key:Xa.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:r,series:a}),...vs({key:Xa.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...vs({key:Xa.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return rl(e)&&(u.push(...ys({key:Xa.COLLECTION.REDUCED,source:Xa.DATA.REDUCED,series:i.query.all(),fieldModel:n,colorService:r,layoutService:t})),u.push(...ys({key:Xa.COLLECTION.REDUCED_PRIMARY_LINE,source:Xa.DATA.REDUCED,series:l,fieldModel:n,colorService:r,layoutService:t,isLineSeries:!0})),u.push(...ys({key:Xa.COLLECTION.REDUCED_SECONDARY_LINE,source:Xa.DATA.REDUCED,series:c,fieldModel:n,colorService:r,layoutService:t,isLineSeries:!0})),u.push(...ys({key:Xa.COLLECTION.REDUCED_PRIMARY,source:Xa.DATA.REDUCED,series:o,fieldModel:n,colorService:r,layoutService:t})),u.push(...ys({key:Xa.COLLECTION.REDUCED_SECONDARY,source:Xa.DATA.REDUCED,series:a,fieldModel:n,colorService:r,layoutService:t})),u.push(...gs({key:Xa.COLLECTION.REDUCED_STACKED_PRIMARY,source:Xa.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.primarySeries.filter(e=>e.type===Ka.TYPE.BAR),colorService:r})),u.push(...gs({key:Xa.COLLECTION.REDUCED_STACKED_SECONDARY,source:Xa.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.secondarySeries.filter(e=>e.type===Ka.TYPE.BAR),colorService:r}))),u}const al=({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 sl({models:e}){const{dockService:t,seriesModel:n,layoutService:i}=e,r=2===n.meta.measureAxes.length;if(r)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!r){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===i.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 ll=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:al({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:sl({models:e})}},cl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:r.meta.groupSize,maxPxStep:al({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:sl({models:e})}};function ul({viewState:e,models:t,environment:n}){const{fieldModel:i,dockService:r}=t,{orientation:o}=r.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:i.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 ml({viewCache:e,mainMajor:t}){return Z(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function dl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const i=t.get("qTimeAxisCache");return i[n]&&i[n][0]===e?i[n][1]:void 0},set:(e,n,i=0)=>{t.get("qTimeAxisCache")[i]=[e,n]},key:({distance:i})=>{const{min:r,max:o}=e.get("zoom"),a=(o-r)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map(e=>e.qName);return[i,Number.parseFloat(a).toFixed(12),...s].toString()}}}function hl({picasso:e,viewState:t,viewCache:n,models:i,environment:r}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=i,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,m=l.getStyles(),d={type:"time",data:{field:u},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===r.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:dl({viewState:t,viewCache:n,layoutService:o})};return{[Xa.SCALE.MAJOR]:Z(!0,{},d,{ticks:{level:"outer"}}),[Xa.SCALE.MAJOR_INNER]:Z(!0,{},d,{ticks:{level:"inner"}})}}function pl({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{meta:o}=t.layoutService,a=o.isTime?{...hl({picasso:e,viewState:n,viewCache:i,models:t,environment:r})}:o.isContinuous?{[Xa.SCALE.MAJOR]:ul({models:t,viewState:n,environment:r})}:o.isBarSeriesGrouped?{[Xa.SCALE.MAJOR]:cl({models:t,environment:r})}:{[Xa.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?cl({models:t,environment:r}):ll({models:t,environment:r})};return rl(t)?{...a,[Xa.SCALE.REDUCED]:ml({viewCache:i,mainMajor:a[Xa.SCALE.MAJOR]})}:a}function fl({fields:e,tickModel:t,dockService:n,environment:i}){const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||r,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function gl({layoutService:e,tickModel:t,dockService:n,environment:i}){if(!rl({layoutService:e}))return;const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||r,min:t.query.getMin,max:t.query.getMax}}var yl={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 vl=["all","labels"];function Sl({models:e,flags:t}){const{layoutService:n,dockService:i,seriesModel:r,themeService:o,styleModel:a,animationsModel:s}=e,l=n.getLayoutValue("measureAxes");if(!l||!l.length)return[];const c=o.getStyles(),u=a.query.axis.label.getStyle(),{measureAxes:m}=r.meta;return m.filter(e=>{const t=e.isPrimary?0:1;return vl.some(e=>l[t].show===e)}).map(e=>({type:"axis",key:e.isPrimary?Xa.COMPONENT.AXIS.MINOR.PRIMARY:Xa.COMPONENT.AXIS.MINOR.SECONDARY,renderer:Aa(t),scale:e.scale,layout:{dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:yl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:c.axis.line.major.color},ticks:{stroke:c.axis.line.major.color},minorTicks:{stroke:c.axis.line.minor.color}},animations:{enabled:s.enabled,trackBy:pa.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock})}}))}var Ml={INACTIVE:.5},El={LOWER:3,UPPER:13};const xl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),i=n?n.qMatrix:[];return ye.getAdjustedMaxGlyphCount(t,i,0,"qText")};function bl({models:e,environment:t,flags:n}){const{layoutService:i,dockService:r,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,c=i.getLayoutValue("dimensionAxis"),u=o.query.axis.label.getStyle(),m=xl({layoutService:i}),{orientation:d}=r.meta.major,h="horizontal"===d,p=h?c.label:"auto",f=a.getStyles(),{auto:g,spacing:y}=i.getLayoutValue("gridLine",{});return{type:"axis",key:Xa.COMPONENT.AXIS.MAJOR,renderer:Aa(n),scale:Xa.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[d.toUpperCase()]},settings:{labels:{mode:c.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:r.meta.minor.size/4,maxGlyphCount:m,tiltThreshold:m>El.LOWER&&m<El.UPPER?1:void 0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{show:!g&&0===y,stroke:f.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:Ml.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:pa.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isHorizontal:h})}}}function Cl({models:e,flags:t}){const{dockService:n,styleModel:i,themeService:r,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=i.query.axis.label.getStyle(),c=r.getStyles(),{auto:u,spacing:m}=o.getLayoutValue("gridLine",{});return{type:"axis",key:Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:Aa(t),scale:Xa.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[s.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{show:!u&&0===m,stroke:c.axis.line.major.color}},animations:{enabled:a.enabled,trackBy:pa.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Al({models:e,environment:t,flags:n}){const{layoutService:i}=e,r=i.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:i.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:i,styleModel:r,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,c="bottom"===n.meta.major.dock?0:1,u=i.getStyles(),m=r.query.axis.label.getStyle(),d=s?1:0,{auto:h,spacing:p}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:yl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(m.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:c,justify:d},guideLine:{major:{justify:d},minor:{align:c}},line:{show:!1}},style:{label:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:pa.axes.trackBy({isTime:!0}),compensateForLayoutChanges:pa.axes.compensateForLayoutChanges({isTime:!0})}};return[Z(!0,{},f,{key:Xa.COMPONENT.AXIS.TIME_INNER,scale:Xa.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!h&&0===p}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color},line:{stroke:u.axis.line.major.color}}}),Z(!0,{},f,{key:Xa.COMPONENT.AXIS.TIME_OUTER,scale:Xa.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):i.meta.isContinuous?[Cl({models:e,flags:n})]:[bl({models:e,environment:t,flags:n})]}const Nl=({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,Ol=({layoutService:e,seriesModel:t,rtl:n,orientation:i})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:r})=>e([r.value,n&&"horizontal"===i?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===i?1:0])+e.bandwidth():null;function Tl({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=>!0===e.data?.null?.value?0:1,...t},inactive:{opacity:e=>!0===e.data?.null?.value?0:Ml.INACTIVE,...n}}}]}}function Ll(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i}(e,t)}const Il=(e,t)=>`${e}-${t.id}`,Rl=4,kl=12,wl=4;function Dl({chart:e,layoutService:t,dockService:n,markerKey:i,markerType:r}){if(t.meta.isContinuous)return()=>`${wl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(i),s=t.resources.scale(Xa.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Rl,Math.min(kl,l));o.size=`${"bar"===r?2*c:c}px`}return o.size}}const ql=({series:e,isPrimary:t,seriesModel:n})=>e?"qMeasureInfo/0"===e.ref:t?n.meta.primarySeries.some(e=>"qMeasureInfo/0"===e.ref):n.meta.secondarySeries.some(e=>"qMeasureInfo/0"===e.ref),{isDark:Pl}=Et;const zl=({chart:e,models:t,series:n,environment:i})=>{const{layoutService:r,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m=a.getColor(),{fill:d,marker:h}=n.options,{isContinuous:p}=r.meta,f="rtl"===i.options.direction,{orientation:g}=s.meta.major,y="horizontal"===g,v=(n.isPrimary?l:c).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return Ll(t,v)},M=Il(Xa.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:Xa.SCALE.MAJOR,fn:Ol({layoutService:r,seriesModel:o,rtl:f,orientation:g}),ref:p?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return i=n,Math.min(Math.max(0,i),1);var i}},fill:d||"bar"===h?m:"none",opacity:e=>!0===e.datum.null?.value||S(e.datum)?0:1,stroke:e=>{const t=m(e);return d?Pl(t)?Ue(t).brighter(.5).toString():function(e){return Ue(e).darker().toString()}(t):t},size:Dl({chart:e,layoutService:r,dockService:s,markerKey:M,markerType:h}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let i;return"triangle"!==e||t||(i=n?"left":"right"),"bar"===e&&(i=t?"horizontal":"vertical"),i?{type:e,direction:i}:{type:e}})({marker:h,horizontal:y,rtl:f})},brush:Tl({layoutService:r,active:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:Ml.INACTIVE}}),animations:{enabled:u.enabled,isMainComponent:ql({series:n}),trackBy:pa.markers.trackBy,compensateForLayoutChanges:pa.markers.compensateForLayoutChanges}}};function $l({property:e="end",isHorizontal:t,isColor:n,fallback:i,rtl:r}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(Xa.SCALE.MAJOR),c=s(Xa.SCALE.COLOR),u=t&&r?[...a.points].reverse():a.points,m=u.reduce((t,n,i)=>{const r="NaN"===n[e].value||Number.isNaN(n[e].value),o=u[i+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return r?t.length&&a&&t.push(n):t.push(n),t},[]),d="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=m.map(d),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<m.length;t++){const r=m[t],o=r.color&&r.color.value,a=n?o||i:c(o)||i,s=0===t,l=t===m.length-1,u=y[t];if("NaN"===r[e].value||Number.isNaN(r[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=m[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:u});const i=m[t+1];i&&"NaN"!==i[e].value&&!Number.isNaN(i[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(y[t+1]-u)/2).toFixed(5)))}):v.push({color:a,offset:u})}}const S=v.reduce((e,t,n)=>{if(t.virtual){const t=v[n-1],i=v[n+1],r=t.offset+(i.offset-t.offset)/2;e.push({color:t.color,offset:r},{color:i.color,offset:r})}else e.push(t);return e},[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:S}}}function _l({environment:e,models:t,measureIndex:n}){const{layoutService:i,colorService:r,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=i.meta,{mode:l,type:c,nil:u}=r.getSettingsForMeasure(n),m="horizontal"===o.meta.major.orientation;if(!l||"constant"===c)return r.getColor();if("measure"===l&&"categorical"===c)return r.getColor();const d=i.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(d?.on)return"byExpression"===d.mode?$l({isHorizontal:m,isColor:!0,fallback:u,rtl:a}):r.getColor();const h=i.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return u;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?$l({isHorizontal:m,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:i},resources:{scale:r}}=n,o=r(Xa.SCALE.COLOR),a=i.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))}));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:m,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:i}){return function(r){const{datum:{points:o},resources:{scale:a}}=r,s=a(Xa.SCALE.COLOR),l=o.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),c=Math.min(...l),u=Math.max(...l),m=t?Math.min(0,c):c,d=(t?Math.max(0,u):u)-m,h=0===d?1:d,p=s.domain(),f=[];for(let e=0;e<p.length-1;e++){const t=p[e],i=s(t)||n;f.push({color:i,offset:Math.min(1,Math.max(0,(t-m)/h))});const r=p[e+1];f.push({color:i,offset:Math.min(1,Math.max(0,(r-m)/h))})}return{type:"gradient",x1:!e&&i?1:0,x2:e||i?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:m,fallback:u,rtl:a})}const Bl=({models:e,environment:t,series:n})=>{const{layoutService:i,seriesModel:r,dockService:o,styleModel:a,animationsModel:s,colorService:l}=e,c="rtl"===t.options.direction,{orientation:u}=o.meta.major,m=Ol({layoutService:i,seriesModel:r,rtl:c,orientation:u}),{isArea:d,isLineStacked:h}=i.meta,p=i.getLayoutValue("separateStacking",!0),{fieldType:f}=l.getSettings(),g={key:Il(Xa.COMPONENT.LINE,n),type:"line",data:{filter:h?e=>n.ref===e.point.source.field:e=>n.ref===e.end.source.field,collection:n.isPrimary?Xa.COLLECTION.PRIMARY_LINE:Xa.COLLECTION.SECONDARY_LINE},settings:{coordinates:{major:{scale:Xa.SCALE.MAJOR,fn:m},minor:{scale:n.scale,ref:"end",fn:e=>{if(h&&p){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}return e.scale(e.datum.end.value)}},layerId:h?{ref:Il(Xa.COMPONENT.LINE,n)}:"undefined"},layers:{curve:a.query.line.getCurveFn(),line:{stroke:_l({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round",showMinor0:!1}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:Tl({layoutService:i,active:{stroke:void 0,strokeWidth:void 0,opacity:Ml.INACTIVE},inactive:{opacity:Ml.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!ql({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}};return h&&(g.settings.coordinates.minor0={scale:n.scale,fn:e=>{if(p){const t=e.datum.point.value<0?e.datum.end.value:e.datum.start.value;return e.scale(t)}return e.scale(e.datum.start.value)}}),d&&(g.settings.layers.area={fill:_l({models:e,environment:t,measureIndex:n.refIndex}),opacity:"measure"===f||"expression"===f?.6:.3},g.brush.consume.push({context:"selection",data:["selectionDimension","end","color","major"],filter:e=>(e=>void 0===e.strokeLinejoin)(e),style:{active:{opacity:.15},inactive:{opacity:.15}}})),g};var Fl={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Vl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,i=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}),r=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some(e=>!i({item:e})):(e,t)=>0!==e&&!i({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some(e=>!i({item:e})):(e,t)=>e!==t.length-1&&!i({item:t[e+1]});return({index:e,items:t})=>({before:r(e,t),after:o(e,t)})}const jl=3,Hl=20;function Ul({models:e,series:t,environment:n}){const{layoutService:i,colorService:r,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u,animationsModel:m}=e,d=i.getLayoutValue("dataPoint.show",!1),{orientation:h}=a.meta.major,p="horizontal"===h,f="SPARK"===a.meta.chart.mode,g=r.getColor(),{POINT:y}=Fl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},i=Vl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return 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},{})}({items:t}));const{value:r}=e.line,o=n.map[r],a=`${e.major.value}-${r}`,s=o.keys.indexOf(a),{before:l,after:c}=i({index:s,items:o.items});return!l&&!c}}({series:t,layoutService:i}),S="rtl"===n.options.direction,M=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:E,isLineStacked:x}=i.meta,b=i.getLayoutValue("separateStacking",!0),C=({end:e})=>{const{value:t}=e;return Ll(t,M)};return{type:"point",key:Il(Xa.COMPONENT.POINT,t),data:{filter:x?void 0:e=>t.ref===e.end.source.field,collection:t.isPrimary?Xa.COLLECTION.PRIMARY_LINE:Xa.COLLECTION.SECONDARY_LINE},preferredSize:()=>({edgeBleed:{top:p?y.SIZE.DEFAULT/2:0}}),settings:{[p?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{if(x&&b){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return i=n,Math.min(Math.max(0,i),1);var i}},[p?"x":"y"]:{scale:Xa.SCALE.MAJOR,fn:Ol({layoutService:i,seriesModel:o,rtl:S,orientation:h}),ref:"major"},sizeLimits:{minPx:jl,maxPx:Hl},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>e.null?.value||C(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0},brush:Tl({layoutService:i,active:{r:e=>e.r+Fl.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{if(!0===e.data.null?.value||C(e.data))return 0;if(!E||d)return 1;const{event:t,components:n=[]}=u?.getSelectionInfo()||{};if("continuousRange"===t)return 0;if("tap"!==t)return 1;return[Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some(e=>n.indexOf(e)>=0)?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:m.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.points.compensateForLayoutChanges}}}const Yl=(e,{dataset:t},n=!1)=>{const{value:i,label:r,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return se.shouldUseFormat(a.raw())?a.formatter()(i):r};function Wl({chart:e,models:t,environment:n,flags:i,lineSeries:r}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m="rtl"===n.options.direction,d=o.getLayoutValue("dataPoint");if(!d)return!1;if(!d.show||!d.showLineLabels)return!1;if(!r.length)return!1;const h=o.meta.isLineStacked?t=>((e,{dataset:t})=>{const{value:n,label:i,source:r}=e.point,o=t(r.key).field(r.field);return se.shouldUseFormat(o.raw())?o.formatter()(n):i})(t,e):t=>Yl(t,e),p=s.query.point.label.getStyle();return{type:"point-label",key:Xa.COMPONENT.POINT_LABEL,renderer:Aa(i),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:m,label:h,pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${Xa.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0})),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find(e=>e.id===t).isPrimary?l:c).query.getExtrema();return!Ll(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Xa.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:u.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}const Xl=({chart:e,models:t,environment:n,flags:i,markerSeries:r})=>{const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m="rtl"===n.options.direction,d=s.query.marker.label.getStyle(),h=o.getLayoutValue("dataPoint");return!!h?.showMarkerLabels&&(!!r.length&&{type:"point-label",key:Xa.COMPONENT.MARKER_LABEL,renderer:Aa(i),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:m,label:t=>Yl(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${Xa.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0})),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find(e=>e.id===t).isPrimary?l:c).query.getExtrema();return!Ll(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Xa.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:d.fontFamily,fontSize:d.fontSize,fill:d.fill},animations:{enabled:u.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}})};var Kl="max",Gl="min";const Jl=({chart:e,dock:t})=>{let n=t;const i=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}`),r=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`),o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`);return i?n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}`:r?n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`:o&&(n=`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`),n},Zl=({dockPosition:e,orientation:t,rtl:n})=>{let i=1;return e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.PRIMARY}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Kl}-${Ka.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(i=4),e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}-${Ka.AXIS.PRIMARY}`&&e!==`@${Xa.COMPONENT.SLICED_HAT}-${Gl}-${Ka.AXIS.SECONDARY}`||"vertical"!==t||n||(i=4),i};function Ql({chart:e,models:t,environment:n,lineSeries:i}){const{layoutService:r,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=r.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!i.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===o.meta.major.orientation,{show:m}=r.getLayoutValue("dimensionAxis",{});if("none"!==m){const{dock:e}=o.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const d=c?"left":"right";return{type:"label-space",key:Xa.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:yl.LABEL_SPACE,dock:Jl({chart:e,dock:u?"top":d})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Xa.COMPONENT.LINE}-${i[0].id}`);if(!t?.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],r=a.query.getExtrema(),o=e.scale(Xa.SCALE.MINOR.PRIMARY)(r.implicit.line.max),l=u||c?o:1-o,m=i.filter(e=>e.isPrimary).length>0,d=s.query.getExtrema(),h=e.scale(Xa.SCALE.MINOR.SECONDARY)(d.implicit.line.max),p=u||c?h:1-h,f=i.filter(e=>!e.isPrimary).length>0;return m&&l<n||f&&p<n?10:0}}}const ec={min:"Min",max:"Max"};function tc(e,t,n){return function(e,t,n){const{hasExplicitMax:i}=n.meta,{max:r}=n.explicit;return!!i&&Math.max(e,t)>r&&r<=Math.min(e,t)}(e,t,n)||function(e,t,n){const{hasExplicitMin:i}=n.meta,{min:r}=n.explicit;return!!i&&Math.min(e,t)<r&&r>=Math.max(e,t)}(e,t,n)}function nc(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i<=0}function ic(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i>=0}function rc(e,t){return nc(e,t)||ic(e,t)}function oc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${ec[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Kl?e.implicit.bar.max:e.implicit.bar.min,i=Number(n.toFixed(13));return t===Kl?!nc(i,e):!ic(i,e)}({extrema:e,type:t}))}var ac=Object.freeze({__proto__:null,isMaxOutOfBounds:nc,isMinOutOfBounds:ic,isOutOfBounds:rc,isSegmentOutOfBounds:tc,shouldShowOob:oc});const sc={min:"Min",max:"Max"},lc=({chart:e,models:t,markerSeries:n,lineSeries:i,barSeries:r,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:m,layoutService:d,seriesModel:h,themeService:p,fieldModel:f,animationsModel:g}=t,y="rtl"===o.options.direction,{dock:v,opposite:S,orientation:M}=s.meta.major,E=l.query.getExtrema(),x=c.query.getExtrema(),b=a===Kl,{isBarSeriesGrouped:C,isLineStacked:A}=d.meta,N=d.getLayoutValue("separateStacking",!0),O=(({chart:e,type:t,opposite:n,dock:i})=>{let r=t===Kl?n:i;const o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),s=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`),l=e.component(Xa.COMPONENT.LABEL_SPACE),c=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`),m=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`);return o?r=`@${Xa.COMPONENT.SLICED_HAT}-${t}`:a?r=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`:s?r=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`:c||u||m?l&&t===Kl?r=`@${Xa.COMPONENT.LABEL_SPACE}`:c?r=`@${Xa.COMPONENT.BAR_OOB}-${t}`:u?r=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`:m&&(r=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`):l&&t===Kl&&(r=`@${Xa.COMPONENT.LABEL_SPACE}`),r})({chart:e,type:a,opposite:S,dock:v}),T=Ol({layoutService:d,seriesModel:h,rtl:y,orientation:M}),L=i?.length>0&&A,I=i.concat(n);if(!I.length)return!1;const R=b?E.implicit.bar.max:E.implicit.bar.min,k=Number(R.toFixed(13));if(!C&&r.length&&ac[`is${sc[a]}OutOfBounds`](k,E))return!1;if(!E.meta.hasExplicit&&!x.meta.hasExplicit)return!1;const w=b?"max":"min",D=Math[w](Number(E.implicit.line[w].toFixed(13)),Number(E.implicit.marker[w].toFixed(13))),q=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),P=I.filter(e=>e.isPrimary),z=I.filter(e=>!e.isPrimary),$=P.length>0,_=z.length>0,{major:B,majorNumeric:F}=f.main,V=e=>"NaN"!==e.qNum?e.qNum:0,j=d.meta.isContinuous?F:B;return{type:"data-out-of-bounds-marker",key:`${Xa.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:O,minimumLayoutMode:yl.OUT_OF_BOUNDS_MARKER},data:{extract:[...P.map(({ref:e,typeIndex:t,options:n,type:i})=>({field:B,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:i===Ka.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"primary"}})),...z.map(({ref:e,typeIndex:t,options:n,type:i})=>({field:B,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:i===Ka.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"secondary"}}))],stack:L?{stackKey:e=>e.value,value:e=>e.end.value,offset:N?"diverging":"none",stackByKey:["primary","secondary"]}:void 0},settings:{type:a,primaryExtremum:b?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:b?()=>m.query.getMax():()=>m.query.getMin(),isLineStacked:A,separateStacking:A&&N,primarySeries:P,secondarySeries:z,orientation:M,rtl:y,major:{scale:Xa.SCALE.MAJOR,fn:T},markerOffset:Zl({dockPosition:O,orientation:M,rtl:y})},brush:Tl({layoutService:d}),show:()=>{if(b){if($&&D>u.query.getMax())return!0;if(_&&q>m.query.getMax())return!0}if(!b){if($&&D<u.query.getMin())return!0;if(_&&q<m.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:pa.lineOobs.compensateForLayoutChanges}}},cc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function uc({chart:e,models:t,viewState:n,viewCache:i,axis:r}){const o=A(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Xa.COMPONENT.BAR}-${r}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=cc[a.meta.chart.mode];return 0===Math.abs(i.get("continuousMax")-i.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),r=Math.abs(i.get("continuousMax")-i.get("continuousMin")),s=Math.abs(t-e),l=cc[a.meta.chart.mode],c=Math.min(s/r/.2,1),u=2*(1-(m=1-c))+l*m;var m;return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const mc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:i,isBarSeriesStackedInBothAxis:r})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/i.query.getItemSize(),t=n.query.bar.getWidthFn()(),r=t+e;return r>1?t-(r-1):t}:n.query.bar.getWidthFn():t||r?.9:.7;function dc(e){return Math.min(Math.max(0,e),1)}const hc=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:m,secondaryExtremumModel:d,animationsModel:h}=t,{isContinuous:p,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:y}=o.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,M=r?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY;if(!(r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const E=f?{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return dc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return dc(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return dc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=!0===e.datum.null?.value?v(e):e.datum.end.value;return dc(e.scale(t))}}},x=(r?m:d).query.getExtrema(),b=f?({start:e,end:t})=>tc(e.value,t.value,x):({end:e})=>rc(e.value,x);return{type:"box",key:`${Xa.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary===r).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:f?r?Xa.COLLECTION.STACKED_PRIMARY:Xa.COLLECTION.STACKED_SECONDARY:r?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY},preferredSize:p?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:o,axis:S}),ref:p?{start:"major",end:"major"}:void 0},minor:E,box:{width:mc({isContinuous:p,isBarSeriesGrouped:g,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:y}),minWidthPx:p?uc({chart:e,models:t,viewState:n,viewCache:i,axis:S}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>!0===e.datum?.null?.value||b(e.datum)?0:1},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Tl({layoutService:o,active:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:Ml.INACTIVE}}),animations:{enabled:h.enabled,isMainComponent:ql({isPrimary:r,seriesModel:l}),trackBy:pa.bars.trackBy,compensateForLayoutChanges:pa.bars.compensateForLayoutChanges}}},pc=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:m,isContinuous:d,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,g=r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!m||0===g)return!1;return{key:`${Xa.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:r?Xa.COLLECTION.STACKED_TOTAL_PRIMARY:Xa.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:o,axis:f}),ref:d?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:r?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:mc({isContinuous:d,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:p}),minWidthPx:d?uc({chart:e,models:t,viewState:n,viewCache:i,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function fc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:i}=t,r=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map(e=>{const t=r.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Et.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:i,simplifiedPlacement:e}):r.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const i=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:i}}({simplifiedPlacement:e,fill:t,isHorizontal:n})}),label:t.label}}function gc(e,t,n,i){const r=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,i);let o="up";return"vertical"===t&&r<0?o="down":"horizontal"===t&&(o=r>=0&&!n||r<0&&n?"right":"left"),o}const yc=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!r||!o&&!!i},vc=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!!r&&(!!o||!1!==i)};function Sc(e,t,n,i){const r=[];return void 0!==e&&(r[e]={position:"outside",onBackground:!0,justify:0,overflow:i}),void 0!==t&&(r[t]={position:"inside",onBackground:!1,justify:n}),r}const Mc=({models:e,environment:t,flags:n,isPrimary:i})=>{const{layoutService:r,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:c}=r,{isBarSeriesStacked:u}=c,m="rtl"===t.options.direction,d=s.getStyles(),h=a.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),f=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!(i?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!yc(p,c))return!1;let g;!u&&(g=u?1:0);const y={label:e=>Yl(e.data,e,u),simplifiedPlacements:Sc(g,0===g?1:0,u?.5:1,c.isContinuous),style:d.label.value},v=[fc(e,y)],S=[{component:`${Xa.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>gc(t.data.end.value,e.dockService.meta.minor.orientation,m,0),labels:v,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{type:"labels",key:`${Xa.COMPONENT.BAR_LABEL}-${f}`,renderer:Aa(n),layout:{minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:S},animations:{enabled:l.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}};function Ec(e,t,n,i){const r=[{position:e,onBackground:!0,justify:0,overflow:i}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return r}function xc({chart:e,models:t,environment:n,flags:i,isPrimary:r}){const{meta:o}=t.layoutService,a="rtl"===n.options.direction,s=t.themeService.getStyles(),l=t.styleModel.query.bar.label.getStyle(),c=t.layoutService.getLayoutValue("dataPoint",{}),u=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!vc(c,o))return!1;const m=!yc(c,o),d=l.useContrastColor,h=e.formatter(r?Xa.FORMATTER.PRIMARY:Xa.FORMATTER.SECONDARY)||(e=>e),p=e=>h(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Ec("outside",m,d,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Ec("opposite",m,d,o.isContinuous),style:s.label.value},y=[fc(t,f),fc(t,g)];return{type:"labels",key:`${Xa.COMPONENT.STACK_BAR_LABEL}-${u}`,renderer:Aa(i),layout:{displayOrder:2,minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:[{component:`${Xa.COMPONENT.STACK_BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>gc(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,a),labels:y,fontSize:parseInt(l.fontSize,10),fontFamily:l.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}var bc=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i<0}});const Cc={min:"Min",max:"Max"};function Ac({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:m}=t,{isBarSeriesStacked:d,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=d?pc({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):hc({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),y=o?l.query.getExtrema():c.query.getExtrema(),v=n===Kl,S=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${Cc[t]}`]}(y,n)||function(e,t,n){const i=n?e.implicit.bar.max:e.implicit.bar.min,r=Number(i.toFixed(13));return!bc[`has${Cc[t]}Hat`](r,e)}(y,n,v)||function(e,t,n){const i=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${Cc[t]}`]&&i(e.explicit[t])}(y,n,v))return!1;let M="end";d&&(M=v?"sumOfPositives":"sumOfNegatives");const E=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.scale(o?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY)[n]());const x=(({chart:e,type:t,isPrimary:n,dock:i})=>{let r=i;const o=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),a=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`);return o&&a&&(r=n?i:`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),r})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Xa.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:x},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:Z({},g.settings.box,{fill:d?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=E(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[M].value);return v?n>t:n<t},width:mc({isContinuous:h,isBarSeriesGrouped:p,styleModel:u,discreteModel:m,isBarSeriesStackedInBothAxis:f}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Tl({layoutService:a})}}const Nc={min:"Min",max:"Max"},Oc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Tc({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u,animationsModel:m}=t,{end:d,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,f=p?pc({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):hc({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),g=o?l.query.getExtrema():c.query.getExtrema(),y=n===Kl?g.implicit.bar.max:g.implicit.bar.min,v=Number(y.toFixed(13)),S=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;if(!f)return!1;if(!ac[`is${Nc[n]}OutOfBounds`](v,g))return!1;const M=(({chart:e,type:t,end:n,start:i,isPrimary:r})=>{let o=t===Kl?n:i;const a=e.component(Xa.COMPONENT.LABEL_SPACE),s=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`),l=e.component(`${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`),c=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`),u=e.component(`${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.SECONDARY}`);return s?o=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.PRIMARY}`:l?o=`@${Xa.COMPONENT.SLICED_HAT}-${t}-${Ka.AXIS.SECONDARY}`:c&&u&&!r?o=`@${Xa.COMPONENT.BAR_OOB}-${t}-${Ka.AXIS.PRIMARY}`:a&&t===Kl&&(o=`@${Xa.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:h,isPrimary:o});let E="end";p&&(E=n===Kl?"sumOfPositives":"sumOfNegatives");const x={type:"box-out-of-bounds",key:`${Xa.COMPONENT.BAR_OOB}-${n}-${S}`,layout:{dock:M},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:pe.getDockValue(n===Kl?d:h),oob:Z({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){if(!0===e.datum.null?.value)return!1;const t=p&&0===e.datum[E].value,i=ac[`is${Nc[n]}OutOfBounds`](e.datum[E].value,g,n),r=(!t||function({type:e,item:t,prop:n,extrema:i}){const r=t.datum[Oc[n]].value;return 0!==r&&ac[`is${Nc[e]}OutOfBounds`](r,i,e)}({type:n,item:e,prop:E,extrema:g}))&&i;return r}})},brush:Tl({layoutService:a}),animations:{enabled:m.enabled,compensateForLayoutChanges:pa.barOobs.compensateForLayoutChanges}};return x}function Lc(e){return Math.min(Math.max(0,e),1)}const Ic=({chart:e,models:t,type:n,isPrimary:i})=>{const{discreteModel:r,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(i?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:m}=s.meta,d=e.scale(i?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY),h=i?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,p=i?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Kl;if(!oc({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);return{type:"box",key:`${Xa.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary===i).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:l?i?Xa.COLLECTION.STACKED_TOTAL_PRIMARY:Xa.COLLECTION.STACKED_TOTAL_SECONDARY:i?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Xa.SCALE.MAJOR,fn:Nl({layoutService:s,axis:h}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:i?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Lc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Lc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Lc(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Lc(e.scale(t))}}},box:{width:mc({isContinuous:c,isBarSeriesGrouped:u,styleModel:o,discreteModel:r,isBarSeriesStackedInBothAxis:m}),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:d.max();return f?n>d.max():n<d.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Rc(e,t,n,i,r){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:i||r?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const kc=({chart:e,models:t,type:n,environment:i,flags:r,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,seriesModel:m,themeService:d,animationsModel:h}=t,p=d.getStyles(),f=u.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:y}=g,v=e.formatter(o?Xa.FORMATTER.PRIMARY:Xa.FORMATTER.SECONDARY),S=a.getLayoutValue("dataPoint",{}),M="horizontal"===s.meta.major.orientation,E="rtl"===i.options.direction;if(!(o?m.meta.primaryBarSeriesCount:m.meta.secondaryBarSeriesCount)||!y&&!yc(S,g)||y&&!vc(S,g))return!1;const x=o?l.query.getExtrema():c.query.getExtrema();if(!x.meta.hasExplicit)return!1;const b=n===Kl?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Kl?nc(b,x):ic(b,x)))return!1;let C=e=>Yl(e.data,e);g.isBarSeriesStacked&&(C=n===Kl?function(e){if(!0===e.data.null?.value)return"";if(nc(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return v?v(t):t}return""}:function(e){if(!0===e.data.null?.value)return"";if(ic(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return v?v(t):t}return""});const A={label:C,simplifiedPlacements:Rc("outside",0,g.isContinuous,M,E),style:p.label.value},N={label:C,simplifiedPlacements:Rc("opposite",0,g.isContinuous,M,E),style:p.label.value},O=[fc(t,A),fc(t,N)],T=o?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY,L="horizontal"===s.meta.major.orientation?"down":"right",I=[{component:`${Xa.COMPONENT.GHOST_BAR_OOB}-${n}-${T}`,selector:"rect",strategy:{type:"bar",settings:{direction:L,labels:O,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${Xa.COMPONENT.BAR_OOB_LABEL}-${n}-${T}`,type:"labels",renderer:Aa(r),layout:{minimumLayoutMode:yl.VALUE_LABEL},settings:{sources:I},animations:{enabled:h.enabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}},wc=({chart:e,models:t,viewState:n,viewCache:i})=>[hc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),hc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],Dc=({chart:e,models:t,viewState:n,viewCache:i})=>[pc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),pc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],qc=({chart:e,models:t,environment:n,flags:i})=>{const r=xc({chart:e,models:t,environment:n,flags:i,isPrimary:!0}),o=xc({chart:e,models:t,environment:n,flags:i,isPrimary:!1});return[Mc({models:t,environment:n,flags:i,isPrimary:!0}),Mc({models:t,environment:n,flags:i,isPrimary:!1}),r,o]},Pc=({chart:e,models:t,viewCache:n,viewState:i})=>[Ac({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),Ac({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],zc=({chart:e,models:t,viewCache:n,viewState:i})=>[Tc({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),Tc({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),Tc({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),Tc({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],$c=({chart:e,models:t})=>[Ic({chart:e,models:t,type:"max",isPrimary:!0}),Ic({chart:e,models:t,type:"min",isPrimary:!0}),Ic({chart:e,models:t,type:"max",isPrimary:!1}),Ic({chart:e,models:t,type:"min",isPrimary:!1})],_c=({chart:e,models:t,environment:n,flags:i})=>[kc({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!0}),kc({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!0}),kc({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!1}),kc({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!1})],Bc=({chart:e,environment:t,flags:n,models:i,viewState:r,viewCache:o})=>{const{seriesModel:a}=i,s=a.query.series(Ka.TYPE.BAR).slice(-1),l=a.query.series(Ka.TYPE.LINE),c=a.query.series(Ka.TYPE.MARKER);return[...wc({chart:e,models:i,viewState:r,viewCache:o}),...Dc({chart:e,models:i,viewState:r,viewCache:o}),...l.map(e=>Bl({models:i,environment:t,series:e})),...l.map(e=>Ul({models:i,series:e,environment:t})),...c.map(n=>zl({chart:e,models:i,series:n,environment:t})),Wl({chart:e,models:i,environment:t,flags:n,lineSeries:l}),Xl({chart:e,models:i,environment:t,flags:n,markerSeries:c}),...qc({chart:e,models:i,environment:t,flags:n}),...Pc({chart:e,models:i,viewCache:o,viewState:r}),...zc({chart:e,models:i,viewCache:o,viewState:r}),...$c({chart:e,models:i}),..._c({chart:e,models:i,environment:t,flags:n}),lc({chart:e,models:i,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"max"}),lc({chart:e,models:i,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"min"}),Ql({chart:e,models:i,environment:t,lineSeries:l})]},Fc={NONE:0,WIDE:1,NARROW:3};function Vc({models:e}){const{dockService:t,seriesModel:n,layoutService:i,themeService:r,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=i.getLayoutValue("gridLine",{});if(!a&&s===Fc.NONE)return!1;const c=r.getStyles(),u=n.meta.primarySeries.length>0;return{key:Xa.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:yl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===Fc.WIDE)||((e,t)=>t%2==0),stroke:c.grid.line.major.color},minorTicks:{show:!a&&s===Fc.NARROW,stroke:c.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(l??0)&&u?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}function jc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:i,dockService:r,seriesModel:o,secondaryExtremumModel:a,secondaryTickModel:s,layoutService:l,animationsModel:c}=e,u=0===(l.getLayoutValue("gridLine",{})?.axis??0),m=t.query.getExtrema(),d=a.query.getExtrema();if(!m.meta.includesZero&&!d.meta.includesZero)return!1;return{key:Xa.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:yl.GRID_LINE},show:()=>(()=>{const e=o.meta.primarySeries.length>0,t=o.meta.secondarySeries.length>0;return u&&e&&n.query.getMin()<=0&&n.query.getMax()>=0||!u&&t&&s.query.getMin()<=0&&s.query.getMax()>=0})(),lines:{["horizontal"===r.meta.minor.orientation?"x":"y"]:[{value:0,scale:u?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,line:{stroke:i.getStyles().grid.line.highContrast.color}}]},animations:{enabled:c.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}function Hc({models:e}){const{layoutService:t,themeService:n,animationsModel:i}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:yl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:i.enabled,trackBy:pa.lines.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}};return o?[Z(!0,{},s,{key:"time-inner-grid",x:{scale:Xa.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),Z(!0,{},s,{key:"time-outer-grid",x:{scale:Xa.SCALE.MAJOR}})]:[Z(!0,{},s,{key:"continuous-grid",x:{scale:Xa.SCALE.MAJOR},minorTicks:{show:!0}})]}function Uc({models:e}){return[Vc({models:e}),jc({models:e}),...Hc({models:e})]}function Yc({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:m}=e,d=a.getLayoutValue("dimensionAxis");if(!d)return!1;const{show:h}=d;if("all"!==h&&"title"!==h)return!1;const p=o.getAlternatives(),{orientation:f}=s.meta.major,g=m.query.axis.title.getStyle();return{type:"axis-title",key:Xa.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:s.meta.major.dock,minimumLayoutMode:yl.AXIS_TITLE.MAJOR[f.toUpperCase()]},data:{infos:a.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:l,cache:i,model:c,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:g.color,fontFamily:g.fontFamily,fontSize:g.fontSize}}}}const Wc=(e,t,n)=>e.query.seriesByAxis(n).map(e=>({...t[e.refIndex],explicitColumn:e.refIndex}));function Xc({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,seriesModel:l,appModel:c,genericObjectModel:u,selectionService:m,styleModel:d}=e,h=a.getLayoutValue("measureAxes");if(!h||!h.length)return[];const p=o.getAlternatives(),f=d.query.axis.title.getStyle(),{measureAxes:g}=l.meta;return g.filter(e=>e.isPrimary?"all"===h[0].show||"title"===h[0].show:"all"===h[1].show||"title"===h[1].show).map(e=>{const o=a.getHyperCube(),{isPrimary:d}=e;return{type:"axis-title",key:d?Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:d?s.meta.minor.dock:s.meta.minorSecondary.dock,minimumLayoutMode:yl.AXIS_TITLE.MINOR},data:{infos:Wc(l,o.qMeasureInfo,d),alternatives:p.measures},resources:{app:c,cache:i,model:u,selections:m.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex(e=>"colorByExpression"===e.id);if(-1!==n){const i=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(i)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}})}function Kc({models:e,environment:t,actions:n,viewCache:i,flags:r}){return[Yc({models:e,environment:t,actions:n,viewCache:i,flags:r}),...Xc({models:e,environment:t,actions:n,viewCache:i,flags:r})]}function Gc({models:e,environment:t,viewState:n,viewCache:i}){const{discreteModel:r,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:m}=o.meta,d="rtl"===t.options.direction;return!(c&&!m)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:i,viewState:r,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const m=As({layoutService:e,override:l});if(m.none)return!1;const{orientation:d}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===d?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?i.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:d,rtl:s,isContinuous:e.meta.isContinuous,range:()=>xs({layoutService:e,viewState:r,viewCache:o})}};m.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{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&&c&&(h.settings.injections=()=>[Es({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:i,discrete:r,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:d,scrollbarOverride:{predicate:()=>u,value:Ms.OPTIONS.BAR.value},deviceType:t.deviceType})}function Jc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r}){const{layoutService:o}=t,a=hc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r});if(!a)return!1;const s=r?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY;return a.key=`${Xa.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?r?Xa.COLLECTION.REDUCED_STACKED_PRIMARY:Xa.COLLECTION.REDUCED_STACKED_SECONDARY:r?Xa.COLLECTION.REDUCED_PRIMARY:Xa.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=r?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Xa.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}const Zc=(e,t)=>t?e.isPrimary?Xa.COLLECTION.REDUCED_PRIMARY_LINE:Xa.COLLECTION.REDUCED_SECONDARY_LINE:Xa.COLLECTION.REDUCED;function Qc({environment:e,models:t}){const n=t.flags.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA"),i=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ka.TYPE.LINE).map(r=>{const o=Bl({models:t,environment:e,series:r});return o.key=Il(Xa.COMPONENT.MINI_CHART.LINE,r),o.data.collection=Zc(r,n),o.settings.coordinates.minor.scale=r.isPrimary?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=Xa.SCALE.REDUCED,o.settings.layers.line.strokeWidth=1,o.settings.layers.line.strokeDasharray=(...e)=>void 0===i(...e)?void 0:"1, 1",o.layout={dock:"@scrollbar"},o})}function eu({models:e,environment:t}){return e.seriesModel.query.series(Ka.TYPE.MARKER).map(n=>{const i=zl({models:e,environment:t,series:n});return i.key=Il(Xa.COMPONENT.MINI_CHART.MARKER,n),i.data.collection=Xa.COLLECTION.REDUCED,i.settings.y.scale=n.isPrimary?Xa.SCALE.MINOR.REDUCED_PRIMARY:Xa.SCALE.MINOR.REDUCED_SECONDARY,i.settings.x.scale=Xa.SCALE.REDUCED,i.layout={dock:"@scrollbar"},i})}function tu({chart:e,models:t,viewState:n,viewCache:i,environment:r}){return rl(t)?[Jc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),Jc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1}),...Qc({environment:r,models:t}),...eu({models:t,environment:r})]:[]}function nu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:i,isTime:r}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!i)return[!1];const a=yl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return r?[{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Xa.SCALE.MAJOR_INNER,layout:{dock:`@${Xa.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Xa.SCALE.MAJOR,layout:{dock:`@${Xa.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Xa.SCALE.MAJOR,layout:{dock:`@${Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function iu({chart:e,models:t,environment:n}){const{refLineModel:i,layoutService:r,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c,animationsModel:u}=t,m=l.qLocaleInfo,{options:d,theme:h}=n,p="rtl"===d.direction,f=c.query.series(Ka.TYPE.BAR).filter(e=>e.isPrimary),g=c.query.series(Ka.TYPE.BAR).filter(e=>!e.isPrimary),y=c.query.series(Ka.TYPE.LINE),v=c.query.series(Ka.TYPE.MARKER),S=c.query.all(),M=S.some(e=>e.isPrimary),E=S.some(e=>!e.isPrimary),x=M&&E,b={resolveUIColor:o.getPaletteColor},C=u.enabled,A=M?ba({refLineModel:i,layoutService:r,colorModel:b,dock:x?a.meta.minor.dock:a.meta.minor.opposite,scale:Xa.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Xa.FORMATTER.PRIMARY,theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=E?ba({refLineModel:i,layoutService:r,colorModel:b,dock:x?a.meta.minor.opposite:a.meta.minor.dock,scale:Xa.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Xa.FORMATTER.SECONDARY,theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Ma({refLineModel:i,layoutService:r,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Xa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),!!E&&Ma({refLineModel:i,layoutService:r,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Xa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),Ma({isDimension:!0,refLineModel:i,layoutService:r,colorModel:b,dockService:a,chart:e,scale:Xa.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:p,key:Xa.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`:g.length?`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`:y.length?`${Xa.COMPONENT.LINE}-${y[0].id}`:v.length?`${Xa.COMPONENT.MARKER}-${v[0].id}`:`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,minimumLayoutMode:yl.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...ba({isDimension:!0,refLineModel:i,layoutService:r,colorModel:b,dock:a.meta.major.opposite,scale:Xa.SCALE.MAJOR,style:s.getStyles(),theme:h,localeInfo:m,rtl:p,key:Xa.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function ru({layoutService:e}){return!!rl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Xa.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function ou(e){return e?.type||Ka.TYPE.BAR}function au({models:e,environment:t}){const{layoutService:n,colorService:i,dockService:r,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u,isLineStacked:m}=n.meta;if(!s)return!1;const{options:d}=t,h=n.getLayoutValue("color",{}),p=e=>e.filter(e=>ou(e)===Ka.TYPE.LINE).map(e=>({key:Il(Xa.COMPONENT.LINE,e),typeIndex:e.typeIndex})),f=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex,g=n.getHyperCubeValue("qMeasureInfo").map(e=>e.color?.on);return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Xa.COLLECTION.LINE},settings:{getSelectionInfo:()=>a?.getSelectionInfo?.()||{},seriesInfo:{primary:p(o.meta.primarySeries),secondary:p(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=>i.getSettingsForMeasure(e),colorByData:e=>!g[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:o.meta.barSeriesCount,isLineStacked:m,orientation:r.meta.major.orientation,rtl:"rtl"===d.direction}}}function su({models:{fieldModel:e}}){return{[Xa.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Xa.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var lu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:cu}=lu;function uu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=cu}=t?.meta||{},{qHyperCube:i}=e.getLayout();return i.qSize.qcy*i.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:mu}=lu,du=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=mu}=t?.meta||{},{qHyperCube:i}=e.getLayout();return i.qDimensionInfo.length>1&&!uu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:hu}=lu,{MAX_NUM_POINTS:pu,DEFAULT_NUM_POINTS:fu,DEFAULT_NUM_LINES:gu}=lu,{DEFAULT_NUM_POINTS:yu}=lu,vu=({layoutService:e,largeDataService:t})=>{if(!uu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=yu}=t?.meta||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{const{dimensions:n=[]}=e?.meta?.size||{},{maxNumLines:i=gu,maxNumPoints:r=fu,hasInjectedData:o=!1}=t?.meta||{};if(du({layoutService:e,largeDataService:t})*n[0]<=r)return n[0];const a=Math.max(1,Math.min(i,n[1])),s=r/a,l=Math.floor(n[0]<=s?s:s/4),c=2*a*(a+1);return o&&(a>gu||r>fu)?Math.min(l,Math.ceil(pu/c)):l})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=hu}=t?.meta||{},{measureCount:i=1}=e?.meta||{},r=4+2*(i-1);return Math.floor(n/(i*r))})({layoutService:e,largeDataService:t})};function Su({model:e,layoutService:t,largeDataService:n,definitionPath:i="/qHyperCubeDef"}){return{shouldFetchReduced:()=>uu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>vu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>du({layoutService:t,largeDataService:n}),fetch:(r,o)=>(({start:e,end:t,model:n,layoutService:i,largeDataService:r,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:vu({layoutService:i,largeDataService:r}),qMaxNbrTicks:300,qMaxNumberLines:du({layoutService:i,largeDataService:r})};return n.getHyperCubeContinuousData(o,a,!1)})({start:r,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:i})}}function Mu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Eu({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 i=n+e,r=i+t;return 1===t&&0===e&&(i=n-.5,r=n+.5),{zoom:{min:i,max:r}}}(n,t.get("continuousMin"))}}}function xu(){const e=()=>{},t=[],n={};return e.set=(e,i)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1),t.push(e),n[e]=i},e.forEach=e=>{t.forEach((t,i)=>e(n[t],i))},e.has=e=>e in n,e}function bu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const i=[],r=xu(),o=xu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?r.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r.forEach((e,t)=>i.splice(t,0,e)),o.forEach(e=>i.push(e)),i}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const i=[];let r,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?r=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r&&i.unshift(r),o&&i.push(o),i}({start:e,end:t,matrix:n})}function Cu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Au(e,t,n){const i={qDataPages:(n.qDataPages||[]).map(n=>{const i=bu(e,t,n.qMatrix),r=Cu(n.qArea,i);return{...n,qArea:r,qMatrix:i}})};return n.qAxisData&&n.qAxisData.qAxis&&(i.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map(n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((n,i)=>((i.qStart>=e&&i.qStart<=t||i.qEnd>=e&&i.qEnd<=t||i.qStart<e&&i.qEnd>t)&&n.push(i),n),[])}))}}(e,t,n.qAxisData)),i}const Nu=2**.5,Ou=1/Nu,Tu=Ou**44;function Lu(e){return e.qIsOtherCell}function Iu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach(e=>{if(!e.some(Lu)){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(Lu)||t++}),t}(n)}const Ru={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var ku={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 i=t[e],r=t[e+1];i.data={},r||1===i.end?r?(i.data.start=i.value,i.data.end=r.value,i.end=r.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.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 i=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return n}};function wu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Du(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function qu(e,t){const{localProps:{size:n},props:{anchor:i}}=t,r=function({props:e,localProps:{size:t},style:n,renderer:i}){const r=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=>i.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,i)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:m}=i;e.start===e.end&&(m=c.width+2*r,1===e.end&&(u-=m));const d={x:u+r,y:r,width:m-2*r,height:t.height-2*r},h=s(`${l[0]}…`).width,p=Math.max(0,d.width-c.width),f=Math.max(0,d.height-c.height),g=o*p,y=a*f;return{show:d.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:d,style:n.label,segment:{x:u+g,width:c.width+2*r},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:i}){const[r,o]=n.domain(),a=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:(n,i)=>{const s=a*i.width,l=wu(i.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=r&&n.value<=o,x1:l,y1:0,x2:l,y2:wu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const i=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:i,height:t.height}}(e,n,i);return{rect:t,label:r.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const i=e[n-1],r=t[n-1].label;if(i&&i.start===i.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!Du(n.segment,r.segment)}}(e,a),a}function Pu(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:i=>{const r=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=wu(i.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:wu(r,n.minorGuideLine.strokeWidth),x2:o,y2:wu(t.guideLine.minor.size+r,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function zu(e){return e.filter(e=>e.show).map(e=>Z({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue}))}var $u={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),i=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const i=wu(1,t.line.strokeWidth);return{show:n.line.show,x1:wu(0,t.line.strokeWidth),y1:i,x2:wu(e.width,t.line.strokeWidth),y2:i,style:t.line}}(this),this.state.major=qu(n,this),this.state.minor=Pu(i,this)},render(){return[...zu([this.state.line]),...(e=this.state.major.map(e=>e.label),e.filter(e=>e.show).map(e=>Z({},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}))),...zu(this.state.major.map(e=>e.guideLine)),...zu(this.state.minor.map(e=>e.guideLine))];var e}};function _u(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 Bu(e){return e.qTags.indexOf("$qualified")>-1}function Fu({qAxis:e}){const t=[],n=[];for(let i=0;i<e.length;i++){const r=i+1,o=e[i],a=e[r];_u(o,a)?(Bu(a)?(t.push(r),n.push(i)):(t.push(i),n.push(r)),i++):(t.push(i),n.push(i))}return{qualified:t,nonQualified:n}}function Vu({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let i,r=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(r=c.index,i=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const i=t[l+2];i&&i.queries.minor(n)&&(a=i.index);break}}}if(!Number.isNaN(r)&&Number.isNaN(o)&&"auto"!==o){o=r,r=NaN;const e=t[i+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(r)&&(r="auto",o="auto");return{outer:r,inner:o,minor:a,isDayOrShorter:s}}}}function ju({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:i}){const r=n;return{isDayOrShorter:()=>(r.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,r.isDayOrShorter),count:()=>e.length,maxRange:()=>(r.maxRange=e.length?Math.max(...e.map(e=>Math.abs(i(e.qStart)-i(e.qEnd)))):0,r.maxRange),rangeAndWidth(){const n=i.clamp();return i.clamp(!1),r.rangeAndWidth=e.map(e=>({range:Math.abs(i(e.qStart)-i(e.qEnd)),width:t(`${e.qText}`).width+16})),i.clamp(n),r.rangeAndWidth}}}function Hu({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>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Uu({qualified:e,nonQualified:t,qAxis:n,measureText:i,reqAutoFitWidth:r,scale:o},{attributesFactory:a=ju,queryFactory:s=Hu}={attributesFactory:ju,queryFactory:Hu}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:i,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:r})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function Yu({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:i=0,scale:r},{metaFactory:o=Uu,mapper:a=Fu,resolver:s=Vu}={metaFactory:Uu,mapper:Fu,resolver:Vu}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:m}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:i,scale:r}),d=s({qualifiedMeta:u,nonQualifiedMeta:m});return{resolve:t=>{const i=n.key({distance:t});if(n.get(i))return n.get(i);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 r=d.resolve(t);return n.set(i,r),r}}}function Wu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Xu=Wu(0).getTime();function Ku(e){return(e.getTime()-Xu)/86400/1e3}const Gu=new Date,Ju=new Date;function Zu(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,i,o)=>{const a=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<i);return a},r.filter=n=>Zu(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}),n&&(r.count=(t,i)=>(Gu.setTime(+t),Ju.setTime(+i),e(Gu),e(Ju),Math.floor(n(Gu,Ju))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?t=>i(t)%e===0:t=>r.count(0,t)%e===0):r:null)),r}const Qu=1e3,em=6e4,tm=36e5,nm=864e5,im=6048e5,rm=Zu(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qu)},(e,t)=>(t-e)/Qu,e=>e.getUTCSeconds());rm.range;const om=Zu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qu)},(e,t)=>{e.setTime(+e+t*em)},(e,t)=>(t-e)/em,e=>e.getMinutes());om.range;const am=Zu(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*em)},(e,t)=>(t-e)/em,e=>e.getUTCMinutes());am.range;const sm=Zu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qu-e.getMinutes()*em)},(e,t)=>{e.setTime(+e+t*tm)},(e,t)=>(t-e)/tm,e=>e.getHours());sm.range;const lm=Zu(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*tm)},(e,t)=>(t-e)/tm,e=>e.getUTCHours());lm.range;const cm=Zu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*em)/nm,e=>e.getDate()-1);cm.range;const um=Zu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nm,e=>e.getUTCDate()-1);um.range;const mm=Zu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nm,e=>Math.floor(e/nm));function dm(e){return Zu(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*em)/im)}mm.range;const hm=dm(0),pm=dm(1),fm=dm(2),gm=dm(3),ym=dm(4),vm=dm(5),Sm=dm(6);function Mm(e){return Zu(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/im)}hm.range,pm.range,fm.range,gm.range,ym.range,vm.range,Sm.range;const Em=Mm(0),xm=Mm(1),bm=Mm(2),Cm=Mm(3),Am=Mm(4),Nm=Mm(5),Om=Mm(6);Em.range,xm.range,bm.range,Cm.range,Am.range,Nm.range,Om.range;const Tm=Zu(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());Tm.range;const Lm=Zu(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());Lm.range;const Im=Zu(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Im.every=e=>isFinite(e=Math.floor(e))&&e>0?Zu(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Im.range;const Rm=Zu(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Rm.every=e=>isFinite(e=Math.floor(e))&&e>0?Zu(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,Rm.range;const km=1,wm=2,Dm=3,qm=4,Pm=5,zm=6;function $m({timeScale:e,labels:t,distance:n,isDayOrShorter:i,cache:r,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=r.key({distance:n});let u;r.get(c,1)?u=r.get(c,1):(u=function(e,t,n,i,r,o){function a(e){return Rm.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=rm.count(e,t),l=am.count(e,t),c=lm.count(e,t),u=um.count(e,t),m=Em.count(e,t),d=Lm.count(e,t),h=Rm.count(e,t),p=n/i.second.width-1,f=n/i.minute.width-1,g=n/i.date.width-1,y=n/i.year.width-1,v={type:"year",desc:"year",count:h,interval:Rm.every(1),formatter:i.year.formatter,offset:e=>Rm.offset(e,-1),floor:Rm.floor};if(s<=p)v.type=km,v.desc="second",v.count=s,v.interval=rm.every(1),v.formatter=i.second.formatter,v.offset=e=>rm.offset(e,-1),v.floor=rm.floor;else if(s/2<=p)v.type=km,v.desc="every other second",v.count=s/2,v.interval=rm.every(2),v.formatter=i.second.formatter,v.offset=e=>rm.offset(e,-2),v.floor=rm.floor;else if(s/5<=p)v.type=km,v.desc="every 5 second",v.count=s/5,v.interval=rm.every(5),v.formatter=i.second.formatter,v.offset=e=>rm.offset(e,-5),v.floor=rm.floor;else if(s/15<=p)v.type=km,v.desc="every 15 second",v.count=s/15,v.interval=rm.every(15),v.formatter=i.second.formatter,v.offset=e=>rm.offset(e,-15),v.floor=rm.floor;else if(s/30<=p)v.type=km,v.desc="every 30 second",v.count=s/30,v.interval=rm.every(30),v.formatter=i.second.formatter,v.offset=e=>rm.offset(e,-30),v.floor=rm.floor;else if(l<=f)v.type=wm,v.desc="minute",v.count=l,v.interval=am.every(1),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-1),v.floor=am.floor;else if(l/2<=f)v.type=wm,v.desc="every 2 minute",v.count=l/2,v.interval=am.every(2),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-2),v.floor=am.floor;else if(l/5<=f)v.type=wm,v.desc="every 5 minute",v.count=l/5,v.interval=am.every(5),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-5),v.floor=am.floor;else if(l/10<=f)v.type=wm,v.desc="every 10 minute",v.count=l/10,v.interval=am.every(10),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-10),v.floor=am.floor;else if(l/15<=f)v.type=wm,v.desc="every 15 minute",v.count=l/15,v.interval=am.every(15),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-15),v.floor=am.floor;else if(l/30<=f)v.type=wm,v.desc="every 30 minute",v.count=l/30,v.interval=am.every(30),v.formatter=i.minute.formatter,v.offset=e=>am.offset(e,-30),v.floor=am.floor;else if(c<=f)v.type=Dm,v.desc="hour",v.count=c,v.interval=lm.every(1),v.formatter=i.minute.formatter,v.offset=e=>lm.offset(e,-1),v.floor=lm.floor;else if(c/2<=f)v.type=Dm,v.desc="every 2 hour",v.count=c/2,v.interval=lm.every(2),v.formatter=i.minute.formatter,v.offset=e=>lm.offset(e,-2),v.floor=lm.floor;else if(c/3<=f)v.type=Dm,v.desc="every 3 hour",v.count=c/3,v.interval=lm.every(3),v.formatter=i.minute.formatter,v.offset=e=>lm.offset(e,-3),v.floor=lm.floor;else if(c/6<=f)v.type=Dm,v.desc="every 6 hour",v.count=c/6,v.interval=lm.every(6),v.formatter=i.minute.formatter,v.offset=e=>lm.offset(e,-6),v.floor=lm.floor;else if(c/12<=f||r)v.type=Dm,v.desc="every 12 hour",v.count=c/12,v.interval=lm.every(12),v.formatter=i.minute.formatter,v.offset=e=>lm.offset(e,-12),v.floor=lm.floor;else if(u<=g)v.type=qm,v.desc="day",v.count=u,v.interval=um.every(1),v.formatter=i.date.formatter,v.offset=e=>um.offset(e,-1),v.floor=um.floor;else if(u/2<=g)v.type=qm,v.desc="every 2 day",v.count=u/2,v.interval=um.every(2),v.formatter=i.date.formatter,v.offset=e=>um.offset(e,-2),v.floor=um.floor;else if(u/3<=g)v.type=qm,v.desc="every 3 day",v.count=u/3,v.interval=um.every(3),v.formatter=i.date.formatter,v.offset=e=>um.offset(e,-3),v.floor=um.floor;else if(m<=g)v.type=qm,v.desc="week",v.count=m,v.interval=Em.every(1),v.formatter=i.date.formatter,v.offset=e=>Em.offset(e,-1),v.floor=um.floor;else if(m/2<=g)v.type=qm,v.desc="every 2 week",v.count=m/2,v.interval=Em.every(2),v.formatter=i.date.formatter,v.offset=e=>Em.offset(e,-2),v.floor=um.floor;else if(d<=g)v.type=Pm,v.desc="month",v.count=d,v.interval=Lm.every(1),v.formatter=i.date.formatter,v.offset=e=>Lm.offset(e,-1),v.floor=um.floor;else if(d/3<=g)v.type=Pm,v.desc="quarter",v.count=d/3,v.interval=Lm.every(3),v.formatter=i.date.formatter,v.offset=e=>Lm.offset(e,-3),v.floor=um.floor;else if(d/6<=g)v.type=Pm,v.desc="half year",v.count=d/6,v.interval=Lm.every(6),v.formatter=i.date.formatter,v.offset=e=>Lm.offset(e,-6),v.floor=um.floor;else if(h<=y)v.type=zm,v.desc="year",v.count=h,v.interval=Rm.every(1),v.formatter=i.year.formatter,v.offset=e=>Rm.offset(e,-1),v.floor=Rm.floor;else if(h/2<=y)v.type=zm,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=i.year.formatter,v.offset=e=>Rm.offset(e,-2),v.floor=Rm.floor;else if(h/5<=y)v.type=zm,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=i.year.formatter,v.offset=e=>Rm.offset(e,-5),v.floor=Rm.floor;else if(h/10<=y)v.type=zm,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=i.year.formatter,v.offset=e=>Rm.offset(e,-10),v.floor=Rm.floor;else{const e=Math.max(1,Math.floor(h/y));v.type=zm,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=i.year.formatter,v.offset=t=>Rm.offset(t,-e),v.floor=Rm.floor}return v}(s,l,n,t.all(),i,a),r.set(c,u,1));const m=e.ticks(u.interval);m.length?s.getTime()!==m[0].getTime()&&m.unshift(u.offset(m[0])):m.push(u.floor(s));const d=m.map((e,t,n)=>{const i=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:u.formatter}});let h=[];if(!o&&u.type<=Dm){const n=t.getFormat("date"),i=e.ticks(um.every(1));i.length&&s.getUTCDate()!==i[0].getUTCDate()&&i.unshift(um.offset(i[0],-1)),h=(i.length?i:[um.floor(s)]).map((e,t,i)=>{const r=i[t+1]?i[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:n.formatter}})}return{inner:d,outer:h}}const _m=86400,Bm=1440,Fm={};function Vm(e,t,n,i){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:i}}function jm(e,t,n){const{generator:i,anchor:r,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=po().domain([Wu(l),Wu(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const m="object"==typeof i?i:{type:i};let d;d="d3"===m.type?(e,r)=>$m({timeScale:u,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===m.initialMin?u.domain()[0]:Wu(i.initialMin)}):e=>function(e,t,n,i,r,o=!1){if(Fm[[t,n,i,i,o]])return Fm[[t,n,i,i,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Wu(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),m=i-n,d=t/(r-i),h=d/1440,p=d/_m,f=366*d,g=3*d*30,y=a.second.width/p,v=a.minute.width/h,S=a.date.width/g,M=a.year.width/f;let E,x,b,C=0,A=0,N=null,O=null,T=null,L=null,I=null,R=null;const k={outer:[],inner:[]};for(y<1?(N=1,A=1/_m):y<2?(N=2,A=1/_m*2):y<5?(N=5,A=1/_m*5):y<10?(N=10,A=1/_m*10):y<30?(N=30,A=1/_m*30):v<1?(O=1,A=1/Bm):v<2?(O=2,A=1/Bm*2):v<5?(O=5,A=1/Bm*5):v<10?(O=10,A=.006944444444444445):v<30?(O=30,A=.020833333333333336):v<60?(T=1,A=1/24):v<120?(T=2,A=2/24):v<360?(T=6,A=.25):v<720?(T=12,A=.5):S<1/90?(A=1,L=1):S<2/90?(A=2,L=2):S<7/90?(A=7,L=7):S<31/90?(I=1,A=31):S<1?(I=3,A=90):M<1?(R=1,A=366):M<2?(R=2,A=732):M<5?(R=5,A=1826.25):(R=10,A=3652.5),x=Math.floor((m+n%1)/A);C<r;){b=x+1,E=R?Vm("year",[l+x*R,0,1],[l+b*R,0,1],a.year.formatter):I?Vm("month",[l,c+x*I,1],[l,c+b*I,1],a.date.formatter):L?Vm("day",[l,c,u+x*L],[l,c,u+b*L],a.date.formatter):T?Vm("hour",[l,c,u,0+x*T],[l,c,u,0+b*T],a.minute.formatter):O?Vm("minute",[l,c,u,0,0+x*O],[l,c,u,0,0+b*O],a.minute.formatter):Vm("second",[l,c,u,0,0,0+x*N],[l,c,u,0,0,0+b*N],a.second.formatter),C=Ku(E.start),k.inner.push(E);const e=Math.floor(C);if(!(o||R||I||L)){const t={type:"day",start:Wu(e),end:Wu(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)}x++}return k.min=i,k.max=r,Fm[[t,n,i,i,o]]=k,k}(n,e,m.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let i;i="start"===r?t.qStart:"end"===r?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(i),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:i,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)=>d(t,n)[a].map(t=>{let n;return n="start"===r?Ku(t.start):"end"===r?Ku(t.end):(Ku(t.start)+Ku(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Ku(t.start),end:Ku(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return h}const Hm=/t+/i;const Um={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 Ym(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 Wm="continuousPan";var Xm={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:i=Ru,viewCache:r,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Su,snapshotFetcherFactory:c=Eu,cacheFetcherFactory:u=Mu,cache:m={initial:{},merged:{}}}=s,d=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:r}),p=u({cache:m}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,i;({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])),r.set("continuousMin",y),r.set("continuousMax",v),r.set("minimiumZoomSpan",(n=y,i=v,Math.max(1e-6,(i-n)*Tu))),g=t.meta.isSnapshot?h:d,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:i}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",i),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=Cu(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return i.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),m.initial=t,m.merged=t,e}).then(e=>Au(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 i=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,i=t[t.length-1][0].qNum,r=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?r.push(e[t]):a.qNum>i&&o.push(e[t])}return[...r,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),r=Cu(e.qArea,i);return{...e,qArea:r,qMatrix:i}}),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),i=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),r=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}=i[a];for(let n=0,i=o.qTicks.length;n<i;n++){const i=o.qTicks[n];i.qStart<e?s.push(i):i.qStart>t&&l.push(i)}r[a].qTicks=[...s,...r[a].qTicks,...l]}}return{qAxis:r}}(e.qAxisData,t.qAxisData)),n}(m.initial,e)).then(e=>(i.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),m.merged=e,e)).then(n=>Au(e,t,n)).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then(n=>Au(e,t,n)),fetchMinMaxData:()=>Promise.resolve(m.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Z({},e,{...m.initial})},getInitialLayout(){const e=this.getInitialCube();return Z({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Iu(m.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=i.query.getShouldProcess()?[i.query.getFilteredDataPage({dataPage:m.merged.qDataPages[0]})]:m.merged.qDataPages;t.qDataPages=n,t.qAxisData=m.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:i}=e;function r(e,n,r){return i[e](n,r).then(e=>(i.updateLayout(e),t(),e))}const o=N((e,t)=>r("fetch",e,t),50);return({min:e,max:t},{min:i,max:a})=>!n.meta.isContinuous||e===i&&t===a?Promise.resolve(null):r("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,i=NaN;return(r,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),i=e.get("minimiumZoomSpan"),Math.abs(r.max-r.min)<i?o:{min:Math.min(r.max,Math.max(t,r.min)),max:Math.max(r.min,Math.min(n,r.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:i=50,rtl:r=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O((e,i)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:i}=e;return i-=t.element.getBoundingClientRect().left,i-=n.rect.x,Math.max(0,Math.min(1,i/n.rect.width))}(e,n,l),c=r?1-o:o,{min:u,max:m}=t.get("zoom"),d=Math.abs(m-u),h=d-(i>0?Ou:Nu)*d,p=u+h*c,f=m-h*(1-c),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)})}},i)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r}){return{type:"Pan",key:"continuous:pan",options:{event:Wm,pointers:1,threshold:10,enable(i,r){return this.started===Wm||!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some(t=>t.key===e)}},events:{[`${Wm}start`](n){n.preventDefault(),this.started=Wm;const{min:r,max:o}=i.get("zoom");this[Wm]={min:r,max:o,size:t.component(e).rect.computedInner.width,span:o-r}},[`${Wm}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Wm],s=-e.deltaX/a;i.set("zoom",{min:Math.min(n+s*t,r.get("continuousMax")-t),max:Math.max(o+s*t,r.get("continuousMin")+t)})},[`${Wm}end`](e){e.preventDefault(),this.started=!1},[`${Wm}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:ku,timeAxis:$u},picassoScales:{time:function e(t,n={}){const i=function(e,t,n){const i={};return Object.keys(t).forEach(r=>{const o=e[r],a=typeof o;"function"===a?i[r]=o(n):"object"!==a||Array.isArray(o)?i[r]="undefined"===a?t[r]:o:i[r]=Z(!0,{},t[r],o)}),i}(t,Um,n),{qAxis:r}=i,o=ii(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,i=+e.max;return Number.isNaN(n)&&Number.isNaN(i)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),i=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===i&&(n-=.5,i+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+i)?1:i}}(i,r);let c,u,m=[];const d=function(e){return Number.isNaN(+e)?NaN:o(e)};d.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[i.ticks.level];if(Number.isNaN(+o)||(m=u.transform(r[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(r[n.minor].qTicks,{isMinor:!0});m=m.concat(e)}return"auto"===o&&(m=u.generate(e,n.isDayOrShorter)),m},d.invert=e=>o.invert(e),d.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),d.range=e=>Array.isArray(e)?o.range(e):o.range(),d.norm=e=>(Ym(a,d),a.instance(e)),d.normInvert=e=>(Ym(a,d),a.instance.invert(e)),d.copy=()=>e(t,n),d.clamp=(e=!0)=>(o.clamp(e),o.clamp()),d.min=()=>Math.min(s,l),d.max=()=>Math.max(s,l),o.range(i.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=i.invert;const h=function(e){const t={},{measureText:n,fn:i,localeInfo:r}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return r&&Hm.test(r.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=r&&r.qDateFmt?r.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=i(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),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 i=Wu(t[0].data.start),r=Wu(t[n-1].data.start);return um.count(i,r)/n>=1?o.date:lm.count(i,r)/n>0?o.minute:am.count(i,r)/n>0?o.second:o.date},t}(i);return u=jm(o.copy(),i,h),c=Yu({qAxis:r,measureText:i.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:i.cache,scale:d}),d.data=()=>({fields:[{formatter:d.formatter,id:()=>`qHyperCube/${i.field}`,key:()=>i.field,raw:x(n,"fields.0.raw",()=>({}))}]}),d.formatter=()=>h.getFormatFromTicks(m).formatter,d}}};const Km=e=>e.meta.seriesComponentKeys[0],Gm=(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 Jm({chart:e,models:t,actions:n,viewState:i,viewCache:r,environment:o}){const{event:{onZoom:a}}=Xm,{layoutService:s,seriesModel:l}=t,c=Km(l),u=s.meta.isContinuous?a({chart:e,viewState:i,viewCache:r},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:c}):()=>{};return{type:"native",events:{wheel(t){const i={x:t.clientX,y:t.clientY},r=e.componentsFromPoint(i);if(n.interact.enabled()){const[e]=r.filter(e=>e.key===Xa.COMPONENT.LEGEND_CATEGORICAL);Gm(t,e)}if(n.scroll.enabled()){const[e]=r.filter(e=>e.key===c);e&&(u(i,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const Zm="continuousPinchZoom";function Qm({chart:e,models:t,environment:n,viewState:i,viewCache:r,actions:o,selectables:a}){const s=Xm.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:m,tooltipService:d}=t,h="rtl"===n.options.direction,p=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ps({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})],native:zs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:i,viewCache:r,discrete:u,layoutService:l,dockService:c,rtl:h}),g={type:"hammer",enable:!0,gestures:[...m.custom.legendInteractions(),...a.gestures.sort((e,t)=>(t.prio||0)-(e.prio||0)),...f.gestures,...p.gestures]},y=[Jm({chart:e,models:t,actions:o,viewState:i,viewCache:r,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),y.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Km(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r}),function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r,rtl:o}){const a={last:0},s=Xm.event.onZoom({viewCache:r,viewState:i,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:Zm,pointers:2,threshold:0,enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some(t=>t.key===e)},events:{[`${Zm}start`](e){a.last=e.scale,e.preventDefault()},[`${Zm}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:Km(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r,rtl:h})),[g,...y]}const ed=({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}}}),td="lasso",nd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:i},r)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:i,options:{event:td,enable(e,n){if(this.started===td||!n)return!0;if(!r.actions.select.enabled()||!r.actions.lasso.enabled()||!r.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!==td&&(r.actions.select.emit("start",td),this.chart.component(e).emit("lassoStart",t),this.started=td)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),r.actions.select.emit("end",td),"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});const id=({targets:e,requireFailure:t,recognizeWith:n,components:i,eventName:r="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:r,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:{[r](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let i,r;return e.center?(({x:i}=e.center),({y:r}=e.center)):(i=e.clientX,r=e.clientY),{x:i-n.left,y:r-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,m=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),d=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&d&&d.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(!m.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",r,e)),m.length&&i){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof i?i(t,m):i;this.chart.brushFromShapes(m,{components:e}),o.actions.select.emit("end",r),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(d&&o.actions.tooltip.enabled())if(m.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,d,{nodes:n,opts:o,customTooltipModel:e})}else d.emit("show",t,{nodes:m})}else h&&d.emit("hide")}}}};const rd=({key:e,requireFailure:t,recognizeWith:n,eventName:i="tap"},r)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${i}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!r.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:{[`${i}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const od=({eventName:e,key:t,fillTargets:n=[],requireFailure:i,recognizeWith:r},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:i,recognizeWith:r,options:{event:e,enable(i,r){if(this.started===e||!r)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:r.center.x,y:r.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}-`))}(r,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 ad(e,t){const n=function(e){const{key:t,targets:n,fillTargets:i,targetSelector:r,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:m,onEdited:d}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:d?{bubbleEnd(){d()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:m},target:{components:i,selector:r,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),i=od(e,t,"range");return{interactions:[e.onEdited?rd(e,t):null,i].filter(Boolean),components:[n]}}const sd=/axis|legend/,ld=e=>e.some(e=>sd.test(e.type));function cd({actions:e,models:t}){const{seriesModel:n,layoutService:i,colorService:r,flags:o}=t,a=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...n.query.series(Ka.TYPE.MARKER).map(e=>Il(Xa.COMPONENT.MARKER,e)),...n.query.series(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),Xa.COMPONENT.AXIS.MAJOR,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:i}=n,r={key:i,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[Xa.COMPONENT.AXIS.MAJOR,Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Xa.COMPONENT.LEGEND_CATEGORICAL].indexOf(i)&&(r.data=["selectionDimension"]),[r]}},l={actions:e,isLocked:e=>e.some(e=>"legend-cat"===e.type)?r.isSelectionLocked({isMeasureSelectionLocked:i.meta.isDimensionLocked}):i.meta.isDimensionLocked,hitRadius:e=>ld(e)?0:3,debouncer:N,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[id(e,t)],components:[]}}(s,l)}function ud({actions:e,models:t}){const{layoutService:n,dockService:i,seriesModel:r}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...r.meta.seriesComponentKeys,Xa.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:i,fillTargets:r,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:i},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:r,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[od(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Xa.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:e})}const md={components:[],interactions:[]};function dd({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const r=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t,{isDimensionLocked:a,isBarSeriesStacked:s,isLineStacked:l}=o.meta;return!(a||s||l||n?.("rangeSelections"))&&ad({eventName:"minorRange",key:"minor-range-brush",targets:[Xa.COMPONENT.AXIS.MINOR.PRIMARY,`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,...r.query.series(Ka.TYPE.MARKER).filter(e=>e.isPrimary).map(e=>Il(Xa.COMPONENT.MARKER,e)),...r.query.series(Ka.TYPE.LINE).filter(e=>e.isPrimary).map(e=>Il(Xa.COMPONENT.POINT,e))],fillTargets:[Xa.COMPONENT.AXIS.MINOR.PRIMARY],dock:i.meta.minor.dock,scale:Xa.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||md,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||n?.("rangeSelections"))&&ad({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Xa.COMPONENT.AXIS.MINOR.SECONDARY,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...r.query.series(Ka.TYPE.MARKER).filter(e=>!e.isPrimary).map(e=>Il(Xa.COMPONENT.MARKER,e)),...r.query.series(Ka.TYPE.LINE).filter(e=>!e.isPrimary).map(e=>Il(Xa.COMPONENT.POINT,e))],fillTargets:[Xa.COMPONENT.AXIS.MINOR.SECONDARY],dock:i.meta.minorSecondary.dock,scale:Xa.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||md,a=ud({actions:e,models:n})||md,s=function({actions:e,chart:t,models:n}){const{layoutService:i,dockService:r,seriesModel:o}=n,{isContinuous:a,isTime:s}=i.meta;if(!a)return!1;const l=s?[Xa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Xa.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Xa.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return ad({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,...o.query.series(Ka.TYPE.MARKER).map(e=>Il(Xa.COMPONENT.MARKER,e)),...o.query.series(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),...l],fillTargets:l,dock:r.meta.major.dock,scale:s?Xa.SCALE.MAJOR_INNER:Xa.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:i}){const r=s?i.formatter():t.formatter(Xa.FORMATTER.PRIMARY),o=t.scale(Xa.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${r(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||md,l=function({actions:e,models:t}){const{colorService:n,layoutService:i}=t,[r]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=i.meta;if(a||!r)return!1;const s=`${Xa.SCALE.COLOR}Range`,{type:l,key:c}=r,u=o[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&ad({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:r.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||md;return{components:[...r.components,...o.components,...a.components,...s.components,...l.components],interactions:[...r.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function hd({actions:e,models:t}){const{layoutService:n,seriesModel:i}=t,{seriesComponentKeys:r}=i.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},i=ed(n);return{interactions:[nd(n,t)],components:[i]}}({key:"lasso",componentTargetKey:r[0],components:r.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]}))},{actions:e})}function pd({chart:e,chartModel:t,colorService:n,context:i,resources:r,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:c,themeService:u,discreteModel:m,seriesModel:d}=s,h={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},p=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return p;const{allSeries:g,seriesComponentKeys:y}=d.meta,[v]=y;let S;const M=f.map(e=>{if("point"===e.type){const t=g.find(t=>e.measureIndex===t.id);if(t)return{...e,component:t.type,scale:t.scale}}if("line"===e.type){const t=e.points.map(e=>{const t=g.find(t=>e.measureIndex===t.id);return t?{...e,component:t.type,scale:t.scale}:{...e,scale:g[0].scale}});return{...e,points:t}}return e});!function(e){e.forEach(e=>{e&&!e.cId&&(e.cId=se.generateId)})}(f);const E=[{key:Xa.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[Xa.COMPONENT.POINT_LABEL]},{key:Xa.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[Xa.COMPONENT.FORECAST_POINT_LABEL]}],x=function(e){const t=[];return e.forEach(e=>{const n=t[t.length-1],i=n?.[0],r=e?.type===i?.type,o=e?.scale===i?.scale;let a=!1;"point"===e?.type?a=o&&r:"line"===e?.type&&(a=r&&o&&!e?.showPoints&&!i?.showPoints),a?n.push(e):t.push([e])}),t}(M);return x.forEach((n,r)=>{const o=`points-addon-combo-chart-${r}`,s=`lines-addon-combo-chart-${r}`;switch(S="point"===n[0].type?n[0]?.scale||g[0]?.scale:n[0]?.points?.[0]?.scale??g[0]?.scale,n[0]?.type){case"point":p.push(Ra({chart:e,chartModel:t,discreteModel:m,colorService:h,themeService:u,layoutService:l,dockService:c,rtl:i.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:o})),E.push({key:o,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":p.push(function({chart:e,chartModel:t,discreteModel:n,colorService:i,layoutService:r,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:m,scales:d={}}){if(!Array.isArray(u)||0===u.length)return!1;const h={resolveUIColor:i.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,f=!(!p||!a),{canBeContinuous:g,isContinuous:y}=r.meta,v=r.getLayout(),S=Ho.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:r}),M=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,i)=>({...n,lineId:t,style:0===i?e.style:void 0}));M.push(...n)});const E={},x=[];u.forEach(e=>x.push(...(e?.points??[]).map(e=>e.dimensionValue))),x.forEach(e=>{S[e]&&(E[e]?(E[e].innerValues=S[e].innerValues,E[e].minOrder=Math.min(E[e].minOrder,S[e].minOrder),E[e].maxOrder=Math.max(E[e].maxOrder,S[e].maxOrder),E[e].isMinOrderOk=E[e].isMinOrderOk||S[e].isMinOrderOk,E[e].isMaxOrderOk=E[e].isMaxOrderOk||S[e].isMaxOrderOk):E[e]={id:S[e].id,dataNode:S[e].dataNode,qText:S[e].qText,innerValues:S[e].innerValues,minOrder:S[e].minOrder,maxOrder:S[e].maxOrder,isMinOrderOk:S[e].isMinOrderOk,isMaxOrderOk:S[e].isMaxOrderOk},E[e].numInnerValues=(E[e].maxOrder||0)-(E[e].minOrder||0)+1)});const b=M[0];M.forEach(t=>{const n=Oa({point:t,dimensionValueInfo:E,layoutService:r}),i=t?.scale,o=b?.scale,a=r?.meta?.isButterfly,s=r?.meta?.isStacked,l=E[t.dimensionValue]?.dataNode;let c=n;const u=o&&i&&o!==i,m=a&&1===t.measureIndex,h=s&&Array.isArray(l);if(u)c=function(e,t,n){const i=t.min(),r=t.max(),o=n.min(),a=n.max();return r===i?o:o+(e-i)/(r-i)*(a-o)}(n,d[i]||e.scale(i),d[o]||e.scale(o));else if(m)c=-n;else if(h&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e},0)}}t.validMeasureValue=c});const C={scale:s,fn:({datum:t})=>{const n=e.scale(s),i=t.value.dimensionValue;return y?n("string"==typeof i?""===i?void 0:+i:i):void 0!==E[i]?Ho.getScaledPosition({scale:n,value:E[i].id,valueInfo:E[i],size:e.component(c)?.rect[p?"width":"height"],align:"center",invert:f,layoutService:r,isContinuous:y}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"line",data:M,settings:{connect:!0,coordinates:{major:p?C:A,minor:p?A:C,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??"linear",line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??ka,stroke:({datum:e})=>Na({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:m,colorService:h,layoutService:l,dockService:c,rtl:i.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:s,scales:a})),n.forEach(n=>{n?.showPoints&&n?.points?n.points.forEach((n,r)=>{const o=`points-${r}-for-${s}`;p.push(Ra({chart:e,chartModel:t,discreteModel:m,colorService:h,themeService:u,layoutService:l,dockService:c,rtl:i.rtl,majorScale:Xa.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:v,data:[n],key:o})),E.push({key:o,lines:!0,labels:!0,duplicates:!0})}):n?.points&&E.push({key:s,lines:!0,labels:!1,duplicates:!0,points:n.points})})}}),p.push(function({layoutService:e,dockService:t,chartModel:n,themeService:i,configs:r,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:c}=t.meta.major,{isOneDimensional:u,isStacked:m}=e.meta,d=i.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:Aa(o),settings:{all:!0,cache:a,configs:r,label:e=>e.value?.label?.value?e.value?.label?.value:m?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<s.length;t++){const n=s[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:u?e.value:e.major?.value,orientation:c,pointValue:e=>e.value?.validMeasureValue,rtl:l},style:d.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:pa.nonUpdatingNode.trackBy,compensateForLayoutChanges:pa.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:c,chartModel:t,themeService:u,configs:E,flags:r.flags,cache:o})),p}function fd({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:c,pluginService:u}=n,m=n.layoutService.getLayout(),{options:d}=i,h=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:m,options:d}),p=(f={logicalSize:h,minCenterRatio:0},{layoutModes:te.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:i,viewState:r,viewCache:o,actions:a}){const{colorService:s,layoutService:l,dockService:c,tooltipService:u,disclaimerService:m}=t,d=function({environment:e,models:t}){const{translator:n,options:i}=e,{themeService:r,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===i.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return m.getHasSuppressingDisclaimer()?[d]:[...Uc({models:t}),...Sl({models:t,flags:i}),...Bc({chart:e,models:t,environment:n,flags:i,viewState:r,viewCache:o}),au({models:t,environment:n}),...Al({models:t,environment:n,flags:i}),...Kc({models:t,environment:n,actions:a,viewCache:o,flags:i}),vo({viewState:r,viewCache:o,layoutService:l,dockService:c}),...nu({models:t}),...iu({chart:e,models:t,environment:n}),Gc({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),ru(t),...tu({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...u.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s}),y=function({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const{layoutService:r}=n,o=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=cd({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=dd({actions:e,chart:t,models:n,isUnsupportedFeature:i}),l=hd({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={flags:r},S=function({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...pl({picasso:e,models:t,viewState:n,viewCache:i,environment:r}),[Xa.SCALE.MINOR.PRIMARY]:fl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:r}),[Xa.SCALE.MINOR.SECONDARY]:fl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:r}),[Xa.SCALE.MINOR.REDUCED_PRIMARY]:gl({layoutService:o,tickModel:s,dockService:u,environment:r}),[Xa.SCALE.MINOR.REDUCED_SECONDARY]:gl({layoutService:o,tickModel:l,dockService:u,environment:r}),...c.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:i}),M=r.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?pd({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:c,context:{},resources:v,viewCache:a,scales:S,models:n}):[],E=u.extendComponents([...g,...y.components,...M]);return{collections:ol({models:n}),scales:S,components:E,formatters:su({models:n}),interactions:Qm({chart:t,models:n,environment:i,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:p,palettes:c.getPalettes()}}const gd=({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})=>{const{width:m,height:d}=r(),[,h]=o(async()=>{if(!(t?.update&&n&&i&&s))return;const{colorService:r,discreteModel:o,dockService:h,layoutService:p,refLineModel:f,animationsModel:g,styleModel:y}=n;function v(){t.update({settings:fd({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})})}h.update({width:m,height:d}),r.custom.updateLegend(y),f.update({picasso:e,chart:t,models:n,environment:i,viewState:s,viewCache:l,actions:c});const S=p.getDataPages();g.meta.isSizeChanging=!0,p.setDataPages([]),v(),p.setDataPages(S),p.meta.isContinuous||await o.command.initialize(),v()},[m,d]);if(h)throw h},yd=[Xa.COMPONENT.AXIS_TITLE.MAJOR,Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Xa.COMPONENT.GRID_LINE,Xa.COMPONENT.ZERO_LINE],vd=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Xa.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Sd=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:i}})=>e.meta.isContinuous?[{type:"q",key:Xa.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:i.qLocaleInfo}}]:[];const Md={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Ed(e){return Md[e]||e}function xd(e){return function(t,n,i){let r,o,a,s,l=[],c=!0;function u(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&(r.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=Ed(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(i),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))}),r.gestures.forEach(t=>{const n=Ed(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 m(){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,r=e,o={chart:t,mediator:n,settings:r},r.gestures=r.gestures||[],void 0===r.enable&&(r.enable=!0)}(e),m(),c&&u()},off(){c=!1,m()},on(){c=!0,0===l.length&&u()},destroy(){m(),a&&a.destroy(),a=null,o=null,r=null}}}}function bd(e,t,n,i){const r=function(t){const n=String(t);return e(n)};return r.ticks=()=>t.map(t=>{const o=r([t.data.value,i?n-1:0]),a=r([t.data.value,i?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),r.bandwidth=()=>e.bandwidth(),r.data=()=>e.data(),r.domain=()=>e.domain(),r.pxScale=function(i){const r=e.pxScale(i);return r===e?this:bd(r,t,n)},r}function Cd(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},i={}){const r=t(e,n,i),o=r.domain(),a=r.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),r.domain(s),bd(r,a,l,e.invert)})}const Ad={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",c=i,u=r,m=t<.5?90:-90;return o&&(s="y",l="x",c=r,u=i,m=t<.5?180:0),a(Z({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};function Nd({i:e,width:t,height:n,resolved:i,keys:r,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==i.major.settings.binStart?(l=i.major.items[e].binStart,c=i.major.items[e].binEnd,s=i.major.settings.binStart.scale):(s=i.major.settings.major.scale,l=s?i.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const m=Z({},{major:l,majorEnd:c},i.minor.items[e]);r.forEach(t=>{m[t]=i[t].items[e]});const d=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:i,maxMajorWidth:r}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(i))?r:i/r);return a=Number.isNaN(Number(n))?a:Math.max(n/r,a),a*o}({bandwidth:u,width:m[a].width,minWidthPx:m[a].minWidthPx,maxWidthPx:m[a].maxWidthPx,maxMajorWidth:d}),p=(u-h)/2,f=p+m.major+h/2;return{item:m,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function Od({keys:e,data:t,defaultSettings:n,style:i,settings:r,width:o,height:a,resolver:s}){const l=Z(!0,{},n||{},i||{}),c={major:"horizontal"===r.orientation?a:o,minor:"horizontal"===r.orientation?o:a},u=r.major;let m;m="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:r.major}});const d=r.minor||{};let h;const p={major:m,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Z(!0,{},{start:{scale:d.scale,ref:"start"},end:{scale:d.scale,ref:"end"},min:{scale:d.scale,ref:"min"},max:{scale:d.scale,ref:"max"},med:{scale:d.scale,ref:"med"}},d)})};for(let n=0,i=e.length;n<i;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:r[h],scaled:c});return p}const Td=["oob"];const Ld={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,i="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:a,symbol:s}=this,l=Od({keys:Td,data:r,defaultSettings:{oob:Ad.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,m=function({width:e,height:t,flipXY:n,resolved:i,keys:r,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Nd}){const l=[],{items:c}=i.major;for(let u=0,m=c.length;u<m;u++){const{item:m,boxCenter:d,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"oob"}),f=c[u].data,g=[];if(m.oob.show){g.push(Ad.createOob({oob:m.oob,dockValue:a,boxCenter:d,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:i,resolved:l,keys:Td,symbol:s,dockValue:n});return m}},Id={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Rd=["hat"];function kd(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function wd({item:e,boxWidth:t,boxPadding:n,rendWidth:i,rendHeight:r,flipXY:o}){let a="x",s="y",l=i,c=r,u=e.hat.alignment||0;o&&(a="y",s="x",l=r,c=i,u=1-u);const m=(n+e.major)*l;let d=[{[a]:m,[s]:0+c},{[a]:m+t*u*l,[s]:8},{[a]:m+t*l,[s]:0+c},{[a]:m+t*l,[s]:0+c+10},{[a]:m,[s]:0+c+10}];const h=Z({},e.hat,{type:"path",d:kd(d)});d=[{[a]:m,[s]:0},{[a]:m+t*(1-u)*l,[s]:0+c-8},{[a]:m+t*l,[s]:0},{[a]:m+t*l,[s]:-10},{[a]:m,[s]:-10}];return[h,Z({},e.hat,{type:"path",d:kd(d)})]}const Dd={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:i,style:r,resolver:o}=this,a=Od({keys:Rd,data:i,defaultSettings:Id,style:r,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:i,keys:r,_calcItemRenderingOpts:o=Nd}){const a=[],{items:s}=i.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:h}=o({i:l,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];c.hat.show&&f.push(...wd({item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Rd});return c}};var qd={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Pd={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],separateStacking:!1,orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10,isLineStacked:!1},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:i,markerOffset:r,size:o,major:a,primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u}=this.settings.settings,m=this.settings.settings.primaryExtremum(),d=this.settings.settings.secondaryExtremum(),h=s.length&&void 0!==m,p=l.length&&void 0!==d;if(!h&&!p)return[];const f=s.map(e=>e.ref),g=l.map(e=>e.ref),y=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:i=[],secondaryItems:r=[],primarySeries:o=[],secondarySeries:a=[],isLineStacked:s,separateStacking:l}){const c=[],u=[];return o.length&&u.push({isPrimary:!0}),a.length&&u.push({isPrimary:!1}),u.forEach(o=>{const a=o.isPrimary?t:n,u=o.isPrimary?i:r;c.push((({type:e,extremum:t,separateStacking:n,items:i,isLineStacked:r})=>{const o="max"===e?e=>e>t:e=>e<t,a=i.filter(e=>o(((e,t,n)=>{const i=n.isMarker?.value;return t?i?n.point.value:n.point.value<0?n.start.value:n.end.value:e&&i?n.point.value:n.end.value})(r,n,e)));return a})({type:e,extremum:a,items:u,isLineStacked:s,separateStacking:l}))}),(({items:e})=>{const t=[],n=[];return e.forEach(e=>{const{value:i}=e.major;t[i]||(t[i]=!0,n.push(e))}),n})({items:c.reduce((e,t)=>e.concat(t),[])})}({type:t,primaryExtremum:m,secondaryExtremum:d,primaryItems:e.filter(e=>f.includes(e.end?.source?.field||e.point?.source?.field)),secondaryItems:e.filter(e=>g.includes(e.end?.source?.field||e.point?.source?.field)),primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u});if(!y.length)return[];const v="horizontal"===n,S=this.rect[v?"width":"height"],M=this.resolver.resolve({data:{items:y},settings:{major:a},scaled:{major:S}}),E=("max"===t?90:-90)-(v?0:90)-(!v&&i?180:0),x=o/2*r,{fill:b}=this.settings.style,C=M.items.map(e=>function({symbol:e,size:t,fill:n,startAngle:i,x:r,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:i,width:.7,x:r,y:o,data:a})}({symbol:this.symbol,size:o,fill:b,startAngle:E,x:v?S*e.major:x,y:v?x:S*e.major,data:e.data}));return C}};function zd({x:e,y:t,size:n,stroke:i,strokeWidth:r,fill:o}){return{type:"container",children:[{type:"line",stroke:i||o,strokeWidth:r,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 $d({chart:e,seriesInfo:t}){const n={primary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}},secondary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}}},i=[...t.primary.map(e=>e.key),...t.secondary.map(e=>e.key)];return e.findShapes("path").filter(e=>i.some(t=>t===e.key)).reduce((e,n)=>{let i=t.primary.some(e=>e.key===n.key)?e.primary:e.secondary;return i=Object.hasOwnProperty.call(n.attrs,"stroke-linejoin")?i.linePaths:i.areaPaths,i.push(n),e},n),{getLine:(e,t)=>{const i=t?n.primary:n.secondary;if(!i.lineMap[e]){const[t]=i.linePaths.filter(t=>t.data&&t.data.typeIndex.value===e);i.lineMap[e]=t}return i.lineMap[e]},getArea:(e,t)=>{const i=t?n.primary:n.secondary;if(!i.areaMap[e]){const[t]=i.areaPaths.filter(t=>t.data&&t.data.typeIndex.value===e);i.areaMap[e]=t}return i.areaMap[e]}}}function _d({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Bd({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const i=t&&t.scale(Xa.SCALE.MAJOR),r=i&&i.max&&i.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===r?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some(t=>t.min<=e&&o(e,t.max))}}function Fd({brush:e,selectionInfo:t,items:n,selectionValues:i,colorByData:r,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,m=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let d=[c?e=>e.color.value:i[m]].filter(Boolean);if(r&&l&&d.push(e=>e.color.value),!r&&u&&(d=[e=>e.color.value]),!d.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?_d:Bd)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce((e,t,n)=>(d.some(e=>h({value:e(t)}))&&e.push({item:t,index:n}),e),[]):[]}function Vd({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},i=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=i,[,n.y]=i):"C"===t&&([,,,,n.x]=i,[,,,,,n.y]=i),n})}function jd({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(Xa.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),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e)))||r,offset:Math.min(1,Math.max(0,(e-s)/u))})),d=m.map(e=>e.offset),h=d.lastIndexOf(0),p=d.indexOf(1),f=m.slice(-1===h?0:h,-1===p?m.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Hd({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(Xa.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,c=0===l?1:l,u=o.domain(),m=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=o(t)||r;m.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const i=u[e+1];m.push({color:n,offset:Math.min(1,Math.max(0,(i-s)/c))})}const d=m.map(e=>e.offset),h=d.lastIndexOf(0),p=d.indexOf(1),f=m.slice(-1===h?0:h,-1===p?m.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Ud({property:e,chart:t,connection:n,attrs:i,colorSettings:r,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:m}){const d=i[e];if("gradient"!==d.type)return d;const{type:h,nil:p}=r;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:i,fallback:r,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(Xa.SCALE.MAJOR),m=e.scale(Xa.SCALE.COLOR),d=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),h=t.filter(e=>-1!==n.indexOf(e.index)),p=("vertical"===o&&c?h.reverse():h).map(e=>e.item),f=p.map(e=>d(e.major.value)),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,S=f.map((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v),M=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:m(t.color.value)||r,i=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((i+(S[e+1]-i)/2).toFixed(5)))})}return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:d,fallback:p,orientation:u,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:c,rtl:m});return("continuous"===h?jd:Hd)({chart:t,selected:a,connection:n,gradient:d,fallback:p})}function Yd({chart:e,pathModel:t,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:h}){const p=t.getLine(l,c),{attrs:f}=p,g=Vd({d:f.d}),y=m.map(t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:m,count:d}){return{path:l.map((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`}).join(""),attrs:u,stroke:Ud({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,itemsPerGroup:o,orientation:a,rtl:m})}}({chart:e,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:f,rtl:d,count:h}));return{lines:y,commands:g}}function Wd({chart:e,pathModel:t,seriesInfo:n,brush:i,selectionInfo:r,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,rtl:h,highlightArea:p,isLineStacked:f}){const g=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:i,minorRangePrimary:r}=t;return!i||(r?n.primary:n.secondary).some(t=>t.typeIndex===e.typeIndex.value)})}({items:o,selectionInfo:r,seriesInfo:n}),y=function({items:e,seriesInfo:t}){const n=e.reduce((e,n,i)=>{const r=n.typeIndex.value;return e[r]||(e[r]={key:r,items:[],index:i,measureIx:n.colorMeasureIdx?.value,primary:t.primary.some(e=>e.typeIndex===r)}),e[r].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:g,seriesInfo:n}),{lines:v,areas:S}=y.reduce((n,o)=>{const g=Fd({brush:i,selectionInfo:r,items:o.items,selectionValues:a,colorByData:l(o.measureIx),chart:e});if(g.length<2)return n;const y=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:g});if(!y.length)return n;const{lines:v,commands:S}=Yd({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:h,count:o.items.length});n.lines.push(...v);const M=function({chart:e,pathModel:t,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:h,commands:p,isLineStacked:f}){const g=t.getArea(l,c);if(!g)return[];const{attrs:y,key:v}=g,S="horizontal"===s,M=e.component(v).rect.computedInner[S?"height":"width"]*e.scale(c?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY)(0),E=[];let x;return m.forEach(e=>{e.forEach((t,n)=>{const i=p[t],r={x:i.x,y:i.y,raw:i.raw};if(0===n||"M"===i.letter||e[n-1]!==e[n]-1)E.push({lines:[r],first:{x:r.x,y:r.y},connection:[e[n]]});else{const t=E[E.length-1];t.lines.push(r),t.connection.push(e[n])}})}),f&&(x=Vd({d:y.d}).reduce((e,t,n)=>(0===n||"M"===t.letter?e.push([t]):e[e.length-1].push(t),e),[])),E.map(t=>{const{lines:l}=t,c=l.map((e,t)=>0===t?`M${e.x},${e.y}`:e.raw);if(f){const e=t.connection[0],n=x.reduce((t,n)=>(t.found||(t.counted+=n.length/2,e<t.counted&&(t.areaCommand=n,t.found=!0)),t),{counted:0,found:!1}),i=x.indexOf(n.areaCommand),r=x.reduce((e,t,n)=>(n<i&&(e+=t.length/2),e),0),o=n.areaCommand,a=o.slice(o.length/2,o.length).reverse();t.connection.map(e=>a[e-r].raw).reverse().forEach((e,t)=>{if(0===t&&"C"===e.charAt(0)){const t=e.substring(1).split(","),n={x:0,y:0};[,,,,n.x,n.y]=t,c.push(`L${n.x},${n.y}`)}else c.push(e)})}else{const e=l[l.length-1],n=S?e.x:M,i=S?M:e.y;c.push(`L${n},${i}`);const r=S?t.first.x:M,o=S?M:t.first.y;c.push(`L${r},${o}`)}return c.push("Z"),{path:`M${c.join("").substring(1)}`,attrs:y,fill:Ud({property:"fill",chart:e,connection:t.connection,attrs:y,selected:u,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,rtl:d}),key:v}})}({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:h,count:o.items.length,commands:S,isLineStacked:f});return p&&n.areas.push(...M),n},{lines:[],areas:[]}),M=[];return v.forEach(e=>M.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"})),p&&S.forEach(e=>M.push({type:"path",d:e.path,fill:e.fill,opacity:e.attrs.opacity})),M}var Xd={require:["chart","renderer"],defaultSettings:{settings:{highlightArea:()=>!0,seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1,isLineStacked:!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:$d({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=Wd({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked});this.renderer.render(e)}),this.addListener("end",()=>{this.renderer.render([])})},render(){this.state.pathModel=$d({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Wd({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked})},destroyed(){this.removeListeners()}};const Kd=()=>{const e=F();return e.use(V),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",xd(e))};e.interaction("hammer",xd(Hammer))}(B)),e.use(Cd),e.renderer("react-qcm",j),e.component("axis-title",H),e.component("disclaimer",U),e.component("scrollbar",il),e.component("point-label",T),e.component("label-space",qd),e.component("time-axis",Xm.picassoComponents.timeAxis),e.component("axis-overlay",Xm.picassoComponents.axisOverlay),e.component("reference-line-labels",ma),e.component("box-sliced-hat",Dd),e.component("box-out-of-bounds",Ld),e.component("data-out-of-bounds-marker",Pd),e.component("scroll-hint",yo),e.component("brush-highlighter",Xd),e.scale("time",Xm.picassoScales.time),e.symbol("line-point",zd),e},Gd=e=>"[object Object]"===Object.prototype.toString.call(e),Jd=e=>Array.isArray(e);function Zd(e,t){if(e===t)return!0;if(Jd(e)){if(!Jd(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Zd(e[n],t[n]))return!1;return!0}if(Gd(e)){if(!Gd(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++){if(!Object.hasOwn(t,n[i]))return!1;if(!Zd(e[n[i]],t[n[i]]))return!1}return!0}return e===t}function Qd({enable:e=!0}={}){const t=a(),r=()=>Date.now().toString()+Math.random(),[o,s]=n(r()),l={properties:void 0};return i(()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then(e=>{const t=Z(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const i=Z(!0,{},e),r=Z(!0,{},t);return n.exclude=!Zd(i.qHyperCubeDef?.qLayoutExclude,r.qHyperCubeDef?.qLayoutExclude),delete i.qHyperCubeDef?.qLayoutExclude,delete r.qHyperCubeDef?.qLayoutExclude,n.properties=!Zd(i,r),n}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(r())})};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}},[e]),o}const eh={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},th=e=>void 0===e.marker?eh.circle:eh[e.marker],nh=e=>void 0===e.markerFill||e.markerFill;function ih({series:e,layoutService:t}){switch(ou(e)){case Ka.TYPE.MARKER:return(e=>({marker:th(e),fill:nh(e)}))(e);case Ka.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case Ka.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function rh(e=Ka.NOPE_SERIES,t=!0){return t?e.axis===Ka.AXIS.PRIMARY:e.axis===Ka.AXIS.PRIMARY||ou(e)===Ka.TYPE.BAR}var oh,ah,sh,lh,ch,uh,mh,dh,hh,ph,fh,gh,yh,vh,Sh,Mh,Eh,xh,bh,Ch,Ah,Nh,Oh,Th,Lh,Ih,Rh,kh,wh,Dh,qh,Ph,zh,$h,_h,Bh,Fh,Vh,jh,Hh,Uh,Yh,Wh,Xh,Kh,Gh,Jh,Zh,Qh,ep,tp,np,ip,rp,op,ap,sp,lp,cp,up,mp,dp,hp,pp,fp,gp,yp,vp,Sp,Mp,Ep,xp,bp,Cp,Ap,Np,Op,Tp,Lp,Ip,Rp,kp,wp,Dp,qp,Pp,zp,$p,_p,Bp={exports:{}};function Fp(){if(ah)return oh;ah=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return oh={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Vp(){if(lh)return sh;lh=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return sh=e}function jp(){return ch||(ch=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=Fp(),o=Vp(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let m=0;const d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",r],[d,i]],p=(e,t,n)=>{const i=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),r=m++;o(e,r,t),u[e]=r,l[r]=t,c[r]=i,a[r]=new RegExp(t,n?"g":void 0),s[r]=new RegExp(i,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Bp,Bp.exports)),Bp.exports}function Hp(){if(mh)return uh;mh=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return uh=n=>n?"object"!=typeof n?e:n:t}function Up(){if(hh)return dh;hh=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const i=e.test(t),r=e.test(n);return i&&r&&(t=+t,n=+n),t===n?0:i&&!r?-1:r&&!i?1:t<n?-1:1};return dh={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function Yp(){if(fh)return ph;fh=1;const e=Vp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Fp(),{safeRe:i,t:r}=jp(),o=Hp(),{compareIdentifiers:a}=Up();class s{constructor(a,l){if(l=o(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?i[r.LOOSE]:i[r.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=c[5]?c[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof s||(t=new s(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 i=this.prerelease[n],r=t.prerelease[n];if(e("prerelease compare",n,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return a(i,r)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const i=this.build[n],r=t.build[n];if(e("build compare",n,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return a(i,r)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?i[r.PRERELEASELOOSE]:i[r.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}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"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===n&&(i=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ph=s}function Wp(){if(yh)return gh;yh=1;const e=Yp();return gh=(t,n,i=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!i)return null;throw e}}}function Xp(){if(qh)return Dh;qh=1;const e=Yp();return Dh=(t,n,i)=>new e(t,i).compare(new e(n,i))}function Kp(){if(Fh)return Bh;Fh=1;const e=Yp();return Bh=(t,n,i)=>{const r=new e(t,i),o=new e(n,i);return r.compare(o)||r.compareBuild(o)}}function Gp(){if(Wh)return Yh;Wh=1;const e=Xp();return Yh=(t,n,i)=>e(t,n,i)>0}function Jp(){if(Kh)return Xh;Kh=1;const e=Xp();return Xh=(t,n,i)=>e(t,n,i)<0}function Zp(){if(Jh)return Gh;Jh=1;const e=Xp();return Gh=(t,n,i)=>0===e(t,n,i)}function Qp(){if(Qh)return Zh;Qh=1;const e=Xp();return Zh=(t,n,i)=>0!==e(t,n,i)}function ef(){if(tp)return ep;tp=1;const e=Xp();return ep=(t,n,i)=>e(t,n,i)>=0}function tf(){if(ip)return np;ip=1;const e=Xp();return np=(t,n,i)=>e(t,n,i)<=0}function nf(){if(op)return rp;op=1;const e=Zp(),t=Qp(),n=Gp(),i=ef(),r=Jp(),o=tf();return rp=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return i(a,l,c);case"<":return r(a,l,c);case"<=":return o(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}}}function rf(){if(mp)return up;mp=1;const e=/\s+/g;class t{constructor(n,o){if(o=i(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof r)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).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.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&d)|(this.options.loose&&h))+":"+e,i=n.get(t);if(i)return i;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],m),o("caret trim",e);let g=e.split(" ").map(e=>y(e,this.options)).join(" ").split(/\s+/).map(e=>N(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,S=g.map(e=>new r(e,this.options));for(const e of S){if(p(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const M=[...v.values()];return n.set(t,M),M}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>g(t,n)&&e.set.some(e=>g(e,n)&&t.every(t=>e.every(e=>t.intersects(e,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(T(this.set[t],e,this.options))return!0;return!1}}up=t;const n=new(cp?lp:(cp=1,lp=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),i=Hp(),r=of(),o=Vp(),a=Yp(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:m}=jp(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:h}=Fp(),p=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every(e=>r.intersects(e,t)),r=i.pop();return n},y=(e,t)=>(e=e.replace(s[l.BUILD],""),o("comp",e,t),e=E(e,t),o("caret",e),e=S(e,t),o("tildes",e),e=b(e,t),o("xrange",e),e=A(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map(e=>M(e,t)).join(" "),M=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,(t,n,i,r,a)=>{let s;return o("tilde",e,t,n,i,r,a),v(n)?s="":v(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${i}.${r}-${a} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,o("tilde return",s),s})},E=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,(t,n,r,a,s)=>{let l;return o("caret",e,t,n,r,a,s),v(n)?l="":v(r)?l=`>=${n}.0.0${i} <${+n+1}.0.0-0`:v(a)?l="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===r?`>=${n}.${r}.${a}-${s} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===r?`>=${n}.${r}.${a}${i} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a} <${+n+1}.0.0-0`),o("caret return",l),l})},b=(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,i,r,a,s,l)=>{o("xRange",e,n,i,r,a,s,l);const c=v(r),u=c||v(a),m=u||v(s),d=m;return"="===i&&d&&(i=""),l=t.includePrerelease?"-0":"",c?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(u&&(a=0),s=0,">"===i?(i=">=",u?(r=+r+1,a=0,s=0):(a=+a+1,s=0)):"<="===i&&(i="<",u?r=+r+1:a=+a+1),"<"===i&&(l="-0"),n=`${i+r}.${a}.${s}${l}`):u?n=`>=${r}.0.0${l} <${+r+1}.0.0-0`:m&&(n=`>=${r}.${a}.0${l} <${r}.${+a+1}.0-0`),o("xRange return",n),n})},A=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),N=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,i,r,o,a,s,l,c,u,m,d)=>`${n=v(i)?"":v(r)?`>=${i}.0.0${e?"-0":""}`:v(o)?`>=${i}.${r}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(m)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${m}-${d}`:e?`<${c}.${u}.${+m+1}-0`:`<=${l}`}`.trim(),T=(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!==r.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0};return up}function of(){if(hp)return dp;hp=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(i,r){if(r=n(r),i instanceof t){if(i.loose===!!r.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),a("comparator",i,r),this.options=r,this.loose=!!r.loose,this.parse(i),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?i[r.COMPARATORLOOSE]:i[r.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,i){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,i).test(this.value):""===e.operator?""===e.value||new l(this.value,i).test(e.semver):(!(i=n(i)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!i.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,i)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,i)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}dp=t;const n=Hp(),{safeRe:i,t:r}=jp(),o=nf(),a=Vp(),s=Yp(),l=rf();return dp}function af(){if(fp)return pp;fp=1;const e=rf();return pp=(t,n,i)=>{try{n=new e(n,i)}catch(e){return!1}return n.test(t)},pp}function sf(){if(Ap)return Cp;Ap=1;const e=rf();return Cp=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Cp}function lf(){if(Op)return Np;Op=1;const e=Yp(),t=of(),{ANY:n}=t,i=rf(),r=af(),o=Gp(),a=Jp(),s=tf(),l=ef();return Np=(c,u,m,d)=>{let h,p,f,g,y;switch(c=new e(c,d),u=new i(u,d),m){case">":h=o,p=s,f=a,g=">",y=">=";break;case"<":h=a,p=l,f=o,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(r(c,u,d))return!1;for(let e=0;e<u.set.length;++e){const i=u.set[e];let r=null,o=null;if(i.forEach(e=>{e.semver===n&&(e=new t(">=0.0.0")),r=r||e,o=o||e,h(e.semver,r.semver,d)?r=e:f(e.semver,o.semver,d)&&(o=e)}),r.operator===g||r.operator===y)return!1;if((!o.operator||o.operator===g)&&p(c,o.semver))return!1;if(o.operator===y&&f(c,o.semver))return!1}return!0},Np}var cf=function(){if(_p)return $p;_p=1;const e=jp(),t=Fp(),n=Yp(),i=Up(),r=Wp(),o=function(){if(Sh)return vh;Sh=1;const e=Wp();return vh=(t,n)=>{const i=e(t,n);return i?i.version:null}}(),a=function(){if(Eh)return Mh;Eh=1;const e=Wp();return Mh=(t,n)=>{const i=e(t.trim().replace(/^[=v]+/,""),n);return i?i.version:null}}(),s=function(){if(bh)return xh;bh=1;const e=Yp();return xh=(t,n,i,r,o)=>{"string"==typeof i&&(o=r,r=i,i=void 0);try{return new e(t instanceof e?t.version:t,i).inc(n,r,o).version}catch(e){return null}}}(),l=function(){if(Ah)return Ch;Ah=1;const e=Wp();return Ch=(t,n)=>{const i=e(t,null,!0),r=e(n,null,!0),o=i.compare(r);if(0===o)return null;const a=o>0,s=a?i:r,l=a?r:i,c=!!s.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return i.major!==r.major?u+"major":i.minor!==r.minor?u+"minor":i.patch!==r.patch?u+"patch":"prerelease"},Ch}(),c=function(){if(Oh)return Nh;Oh=1;const e=Yp();return Nh=(t,n)=>new e(t,n).major}(),u=function(){if(Lh)return Th;Lh=1;const e=Yp();return Th=(t,n)=>new e(t,n).minor}(),m=function(){if(Rh)return Ih;Rh=1;const e=Yp();return Ih=(t,n)=>new e(t,n).patch}(),d=function(){if(wh)return kh;wh=1;const e=Wp();return kh=(t,n)=>{const i=e(t,n);return i&&i.prerelease.length?i.prerelease:null}}(),h=Xp(),p=function(){if(zh)return Ph;zh=1;const e=Xp();return Ph=(t,n,i)=>e(n,t,i)}(),f=function(){if(_h)return $h;_h=1;const e=Xp();return $h=(t,n)=>e(t,n,!0)}(),g=Kp(),y=function(){if(jh)return Vh;jh=1;const e=Kp();return Vh=(t,n)=>t.sort((t,i)=>e(t,i,n))}(),v=function(){if(Uh)return Hh;Uh=1;const e=Kp();return Hh=(t,n)=>t.sort((t,i)=>e(i,t,n))}(),S=Gp(),M=Jp(),E=Zp(),x=Qp(),b=ef(),C=tf(),A=nf(),N=function(){if(sp)return ap;sp=1;const e=Yp(),t=Wp(),{safeRe:n,t:i}=jp();return ap=(r,o)=>{if(r instanceof e)return r;if("number"==typeof r&&(r=String(r)),"string"!=typeof r)return null;let a=null;if((o=o||{}).rtl){const e=o.includePrerelease?n[i.COERCERTLFULL]:n[i.COERCERTL];let t;for(;(t=e.exec(r))&&(!a||a.index+a[0].length!==r.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=r.match(o.includePrerelease?n[i.COERCEFULL]:n[i.COERCE]);if(null===a)return null;const s=a[2],l=a[3]||"0",c=a[4]||"0",u=o.includePrerelease&&a[5]?`-${a[5]}`:"",m=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${s}.${l}.${c}${u}${m}`,o)}}(),O=of(),T=rf(),L=af(),I=function(){if(yp)return gp;yp=1;const e=rf();return gp=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" ")),gp}(),R=function(){if(Sp)return vp;Sp=1;const e=Yp(),t=rf();return vp=(n,i,r)=>{let o=null,a=null,s=null;try{s=new t(i,r)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&-1!==a.compare(t)||(o=t,a=new e(o,r)))}),o},vp}(),k=function(){if(Ep)return Mp;Ep=1;const e=Yp(),t=rf();return Mp=(n,i,r)=>{let o=null,a=null,s=null;try{s=new t(i,r)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&1!==a.compare(t)||(o=t,a=new e(o,r)))}),o},Mp}(),w=function(){if(bp)return xp;bp=1;const e=Yp(),t=rf(),n=Gp();return xp=(i,r)=>{i=new t(i,r);let o=new e("0.0.0");if(i.test(o))return o;if(o=new e("0.0.0-0"),i.test(o))return o;o=null;for(let t=0;t<i.set.length;++t){const r=i.set[t];let a=null;r.forEach(t=>{const i=new e(t.semver.version);switch(t.operator){case">":0===i.prerelease.length?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":a&&!n(i,a)||(a=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}),!a||o&&!n(o,a)||(o=a)}return o&&i.test(o)?o:null},xp}(),D=sf(),q=lf(),P=function(){if(Lp)return Tp;Lp=1;const e=lf();return Tp=(t,n,i)=>e(t,n,">",i),Tp}(),z=function(){if(Rp)return Ip;Rp=1;const e=lf();return Ip=(t,n,i)=>e(t,n,"<",i),Ip}(),$=function(){if(wp)return kp;wp=1;const e=rf();return kp=(t,n,i)=>(t=new e(t,i),n=new e(n,i),t.intersects(n,i))}(),_=function(){if(qp)return Dp;qp=1;const e=af(),t=Xp();return Dp=(n,i,r)=>{const o=[];let a=null,s=null;const l=n.sort((e,n)=>t(e,n,r));for(const t of l)e(t,i,r)?(s=t,a||(a=t)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),m="string"==typeof i.raw?i.raw:String(i);return u.length<m.length?u:i},Dp}(),B=function(){if(zp)return Pp;zp=1;const e=rf(),t=of(),{ANY:n}=t,i=af(),r=Xp(),o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],s=(e,t,s)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=s.includePrerelease?o:a}if(1===t.length&&t[0].semver===n){if(s.includePrerelease)return!0;t=a}const u=new Set;let m,d,h,p,f,g,y;for(const t of e)">"===t.operator||">="===t.operator?m=l(m,t,s):"<"===t.operator||"<="===t.operator?d=c(d,t,s):u.add(t.semver);if(u.size>1)return null;if(m&&d){if(h=r(m.semver,d.semver,s),h>0)return null;if(0===h&&(">="!==m.operator||"<="!==d.operator))return null}for(const e of u){if(m&&!i(e,String(m),s))return null;if(d&&!i(e,String(d),s))return null;for(const n of t)if(!i(e,String(n),s))return!1;return!0}let v=!(!d||s.includePrerelease||!d.semver.prerelease.length)&&d.semver,S=!(!m||s.includePrerelease||!m.semver.prerelease.length)&&m.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,m)if(S&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===S.major&&e.semver.minor===S.minor&&e.semver.patch===S.patch&&(S=!1),">"===e.operator||">="===e.operator){if(p=l(m,e,s),p===e&&p!==m)return!1}else if(">="===m.operator&&!i(m.semver,String(e),s))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=c(d,e,s),f===e&&f!==d)return!1}else if("<="===d.operator&&!i(d.semver,String(e),s))return!1;if(!e.operator&&(d||m)&&0!==h)return!1}return!(m&&g&&!d&&0!==h||d&&y&&!m&&0!==h||S||v)},l=(e,t,n)=>{if(!e)return t;const i=r(e.semver,t.semver,n);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const i=r(e.semver,t.semver,n);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};return Pp=(t,n,i={})=>{if(t===n)return!0;t=new e(t,i),n=new e(n,i);let r=!1;e:for(const e of t.set){for(const t of n.set){const n=s(e,t,i);if(r=r||null!==n,n)continue e}if(r)return!1}return!0}}();return $p={parse:r,valid:o,clean:a,inc:s,diff:l,major:c,minor:u,patch:m,prerelease:d,compare:h,rcompare:p,compareLoose:f,compareBuild:g,sort:y,rsort:v,gt:S,lt:M,eq:E,neq:x,gte:b,lte:C,cmp:A,coerce:N,Comparator:O,Range:T,satisfies:L,toComparators:I,maxSatisfying:R,minSatisfying:k,minVersion:w,validRange:D,outside:q,gtr:P,ltr:z,intersects:$,simplifyRange:_,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}}(),uf=G(cf),mf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const df=e=>!e||uf.lt(uf.coerce(e),uf.coerce(mf.BAR_IN_SECONDARY_AXIS)),hf=({layoutService:e})=>{const t=!df(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ka.TYPE.BAR]:0,[Ka.TYPE.LINE]:0,[Ka.TYPE.MARKER]:0};return({series:i=Ka.NOPE_SERIES},r)=>{const o=rh(i,t),a=ou(i);return{id:r,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${r}`,refIndex:r,isPrimary:o,scale:o?Xa.SCALE.MINOR.PRIMARY:Xa.SCALE.MINOR.SECONDARY,collection:o?Xa.COLLECTION.PRIMARY:Xa.COLLECTION.SECONDARY,options:ih({series:i,layoutService:e})}}})(e,t)),i=(e,t)=>e.filter(e=>ou(e)===t).length,r=n.filter(e=>e.isPrimary),o=n.filter(e=>!e.isPrimary),a=[!!r.length&&r[0],!!o.length&&o[0]].filter(e=>!!e),s=i(n,Ka.TYPE.BAR),l=i(r,Ka.TYPE.BAR),c=i(o,Ka.TYPE.BAR),u=e=>n.filter(t=>ou(t)===e),m=u(Ka.TYPE.LINE).map(e=>Il(Xa.COMPONENT.POINT,e)),d=u(Ka.TYPE.MARKER).map(e=>({key:Il(Xa.COMPONENT.MARKER,e),type:e.options.marker})),h=d.map(e=>e.key),p=[];l>0&&p.push(`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`),c>0&&p.push(`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`);const f=[...p,...m,...h],{MINI_CHART:g}=Xa.COMPONENT,y=u(Ka.TYPE.LINE).map(e=>Il(g.LINE,e)),v=u(Ka.TYPE.MARKER).map(e=>Il(g.MARKER,e)),S=e.meta.isContinuous?[`${g.BAR}-${Ka.AXIS.PRIMARY}`,`${g.BAR}-${Ka.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:r,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:m,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:S,markers:d},query:{all:()=>n,seriesByAxis:e=>e?r:o,series:u,isPrimary:rh}}},pf=(e,t)=>e.filter(({series:e=Ka.NOPE_SERIES})=>ou(e)===t),ff=({series:e=Ka.NOPE_SERIES})=>e.axis!==Ka.AXIS.SECONDARY,gf=({series:e=Ka.NOPE_SERIES})=>e.axis===Ka.AXIS.SECONDARY;function yf(e){return function({layout:t}){const n=x(t,"qHyperCube.qMeasureInfo",[]),i=pf(n,Ka.TYPE.LINE),r=i.length>0,o=me.continuous({layout:t,auto:()=>r&&re.isTime(!0,t)}),a=!df(x(t,"version","")),s=pf(n,Ka.TYPE.BAR),l=s.length,c=s.filter(ff).length,u=s.filter(gf).length,m=a?c>1||u>1:l>1,d=("grouped"!==x(t,"barGrouping.grouping")||o)&&m,h=!d&&l>1,p=a&&d&&(c>0&&u>1||c>1&&u>0),f=!!t?.qHyperCube?.qDimensionInfo?.[0]?.qLocked,g=e.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&!("area"!==t?.lineType),y=i.filter(ff).length>1||i.filter(gf).length>1,v=g&&t.stackedArea&&y;return{canBeContinuous:re.canBeContinuous(t),isDiscrete:!o,isContinuous:o,isTime:re.isTime(o,t),isSnapshot:me.snapshot(t),isBarSeriesStacked:d,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p,isGrouped:h||p,isGroupedByMeasure:h||p,isDimensionLocked:f,groupSize:p?2:l,hasLineSeries:r,isArea:g,isLineStacked:v}}}function vf({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 Sf({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(he).then(e=>{const n=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),r="K"===n&&i.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=r?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:r?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,{path:"/qHyperCubeDef",rect:vf({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function Mf({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:i}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):i?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):Sf({genericObjectModel:e,layoutService:t})}const Ef=e=>"number"==typeof e&&!Number.isNaN(e);function xf({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const i=t.getHyperCubeValue("qMeasureInfo"),r=n.query.seriesByAxis(e).map(e=>i[e.refIndex]),o=r.filter(e=>ou(e.series)===Ka.TYPE.BAR),a=r.filter(e=>ou(e.series)===Ka.TYPE.LINE),s=r.filter(e=>ou(e.series)===Ka.TYPE.MARKER);return{min:Math.min(...r.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...r.filter(e=>Ef(e.qMax)).map(e=>e.qMax)),bar:{min:Math.min(...o.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...o.filter(e=>Ef(e.qMax)).map(e=>e.qMax))},line:{min:Math.min(...a.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...a.filter(e=>Ef(e.qMax)).map(e=>e.qMax))},marker:{min:Math.min(...s.filter(e=>Ef(e.qMin)).map(e=>e.qMin)),max:Math.max(...s.filter(e=>Ef(e.qMax)).map(e=>e.qMax))}}}}function bf({seriesModel:e,isPrimary:t,type:n}){return function({dataPage:i}){const r=e.query.series(n).filter(e=>e.isPrimary===t).map(e=>e.refIndex),{qMatrix:o}=i,a={min:NaN,max:NaN};return o.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}),a.min=Number.isNaN(a.min)?t:Math.min(t,a.min),a.max=Number.isNaN(a.max)?n:Math.max(n,a.max)}),a}}function Cf({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:i,isLineStacked:r}=t.meta,o=n.query.series(Ka.TYPE.BAR).filter(t=>t.isPrimary===e).length,a=n.query.series(Ka.TYPE.LINE).filter(t=>t.isPrimary===e).length;return(!i||o<2)&&(!r||a<2)?xf({isPrimary:e,layoutService:t,seriesModel:n}):function({isPrimary:e,layoutService:t,seriesModel:n}){const i=xf({isPrimary:e,layoutService:t,seriesModel:n}),r=bf({seriesModel:n,isPrimary:e,type:Ka.TYPE.BAR}),o=bf({seriesModel:n,isPrimary:e,type:Ka.TYPE.LINE});return function({dataPage:e}){const t=i({dataPage:e});return t.bar=r({dataPage:e}),t.line=o({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}}({isPrimary:e,layoutService:t,seriesModel:n})}function Af({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:i,seriesModel:r}){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=Cf({isPrimary:e,layoutService:n,seriesModel:r}),{isArea:s}=n.meta;return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:l,max:c}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:i}=t,r=i("measureAxes."+(e?0:1),{});if(r.autoMinMax)return n;const{minMax:o,min:a,max:s}=r;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=l,o.explicit.max=c,o.meta.hasExplicitMin=!Number.isNaN(l),o.meta.hasExplicitMax=!Number.isNaN(c),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:i}=t.meta;if(i){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:i}).then(({dataPage:t})=>{const{min:n,max:i,bar:l,line:c,marker:u}=a({dataPage:t}),m=r.query.seriesByAxis(e).some(e=>ou(e)===Ka.TYPE.BAR),d=r.query.seriesByAxis(e).some(e=>ou(e)===Ka.TYPE.LINE),h=m||s&&d,p=Number((h?Math.min(n,0):n).toFixed(13)),f=Number((h?Math.max(i,0):i).toFixed(13)),g=Number((h?Math.min(l.min,0):l.min).toFixed(13)),y=Number((h?Math.max(l.max,0):l.max).toFixed(13)),v=Number((h?Math.min(c.min,0):c.min).toFixed(13)),S=Number((h?Math.max(c.max,0):c.max).toFixed(13)),M=Number((h?Math.min(u.min,0):u.min).toFixed(13)),E=Number((h?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(p)?p:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(g)?g:0,o.implicit.bar.max=Number.isFinite(y)?y:0,o.implicit.line.min=Number.isFinite(v)?v:0,o.implicit.line.max=Number.isFinite(S)?S:0,o.implicit.marker.min=Number.isFinite(M)?M:0,o.implicit.marker.max=Number.isFinite(E)?E: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)})}}}}function Nf({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 Of({min:e,max:t,count:n,threshold:i,disable:r}){const o=function(e,t,n){const i=ii().domain([e,t]);return i.nice(n),i}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),i=o.ticks(n),r=i.length>=4?i[1]-i[0]:.1*e,s=i.length>=4?i[i.length-1]-i[i.length-2]:.1*t;o.domain([a.start?e:e-r,a.stop?t:t+s]),o.nice(n)}return o}const Tf=50,Lf=100,If=200,Rf=125;function kf({config:{measureAxesRef:e},layoutService:t,size:n}){const i=(e=>{switch(e){case.5:return Tf;case 1:return Lf;case 2:return If;default:return e*Rf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/i))}function wf({config:e,chart:t,layoutService:n,dockService:i,measureText:r,size:o,min:a,max:s}){const l=kf({config:e,layoutService:n,size:o}),c=Of({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),m={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},d="horizontal"===i.meta.major.orientation?"height":"width",h=e=>r(e)[d],p=t.formatter(e.formatter),f=()=>{const e=m.ticks.map(p);return!e.some((t,n)=>e.indexOf(t)!==n)&&(e=>{const t=o/m.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!f();e--)c.domain([a,s]),c.nice(e),[m.roundedMin,m.roundedMax]=c.domain(),m.ticks=c.ticks(e);return m}function Df({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function qf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function Pf({config:e,chart:t,extrema:n,min:i,max:r}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=Of({min:i,max:r,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,i=e.length-t;return e.slice(n,i).some(e=>0===e)}({ticks:s}),c=l?Df:qf;o.ticks=s.filter((e,t,n)=>c({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 u=t.formatter(e.formatter),m=o.ticks.map(u);return m.some((e,t)=>m.indexOf(e)!==t)&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function zf({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 $f({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:m}=function({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){if("SPARK"===i.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=wf({config:e,chart:t,layoutService:n,dockService:i,measureText:o,size:a,min:s,max:l});return Nf({extrema:r,ticks:c.ticks})?c:Pf({config:e,chart:t,extrema:r,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}),d=function({ticks:e,count:t}){const n=[];for(let i=0;i<e.length-1;i++){const r=e[i],o=(e[i+1]-r)/(t+1);for(let e=1;e<=t;e++)n.push(r+o*e)}return n}({ticks:c,count:1});return{min:u,max:m,values:[...zf({ticks:c,extrema:r}).map(e=>({value:e,isMinor:!1})),...d.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value)}}function _f({config:e,chart:t,layoutService:n,dockService:i,measureText:r,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-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return $f({config:e,chart:t,layoutService:n,dockService:i,extrema:o,measureText:r,size:a,min:s,max:l})}function Bf({config:e,chart:t,layoutService:n,extremumModel:i,dockService:r,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=i.query,c=function({chart:e,config:t,dockService:n,extremumModel:i,layoutService:r,seriesModel:o,themeService:a}){const{measureText:s}=F.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){const i=n.component(t.meta.seriesComponentKeys[0]),r=i?.rect??e.meta.chart.size;return"horizontal"===e.meta.major.orientation?r.height:r.width}({chart:e,dockService:n,seriesModel:o}),u=i.query.getExtrema();return _f({config:t,chart:e,layoutService:r,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:i,dockService:r,seriesModel:o,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function Ff({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return me.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then(e=>({properties:e}))}({layout:t.getLayout(),model:e}).then(e=>{const{properties:t}=e??{};n.properties=t})}}}function Vf({layoutService:e,seriesModel:t,colorService:n}){const{type:i,mode:r,fieldType:o}=n.getSettings();if("categorical"!==i)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===r?"measure"===o?()=>({type:Ka.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===Ka.TYPE.LINE?2:t!==Ka.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:i}=s(e);return n!==Ka.TYPE.MARKER||"bar"===i.marker||i.fill?t(e.value):"none"}}}}}}function jf({layout:e,defaultAuto:t}){const n=t(e),i=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:i?"measure":n.useBaseColors}}function Hf({actions:e,appLayoutModel:t,appModel:n,chart:i,environment:r,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:m,translator:d}=r,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=L({picasso:s,model:o,app:n,translator:d,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:Xa.SCALE.COLOR}},config:{auto:jf,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>h.wrappedScales,legendComponents:()=>h.legendComponents,legendInteractions:()=>h.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:i,environment:r,colorService:o,actions:a,styleModel:s}){const{options:l}=r,c={eventName:"legend-c",key:Xa.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:Vf({layoutService:n,seriesModel:i,colorService:o})},{components:u,interactions:m}=o.getLegend(c,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map(e=>{const{layout:t}=e,{dock:n}=t,i=d[`${Xa.SCALE.COLOR}Range`];return!i||"right"!==n&&"left"!==n||(i.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e}),interactions:m,scales:d}}({viewState:c,chart:i,environment:r,colorService:u,seriesModel:l,layoutService:a,actions:e,styleModel:t});h.wrappedScales=s,h.legendComponents=n,h.legendInteractions=o}}}),u}const Uf="REJECTED",Yf=()=>{},Wf=2,Xf=20,Kf=200,Gf=10;var Jf={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)),i=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,r-e.qArea.qTop),s=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+i-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:r,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const i=n.qTop-Gf<=t.qTop,r=n.qLeft+n.qWidth+Gf>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+Gf>=t.qTop+t.qHeight,a=n.qLeft-Gf<=t.qLeft;return i&&t.qTop>0||r&&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 Zf={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)),i=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,i-e.qArea.qTop),a=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-i-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:i,qLeft:r},qData:[{...e.qData[0],qUp:i,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 i=n.qTop-Gf<=t.qTop,r=n.qTop+n.qHeight+Gf>=t.qTop+t.qHeight;return i&&t.qTop>0||r&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var Qf={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 eg="pages";const tg="discretePan";function ng({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:tg,pointers:1,threshold:10,enable(i,r){return this.started===tg||!r||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:r.center.x,y:r.center.y}).some(e=>e.key===n)}},events:{[`${tg}start`](e){e.preventDefault(),this.started=tg;const t="horizontal"===i.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${tg}move`](e){e.preventDefault();const t="horizontal"===i.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&r?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${tg}end`](e){e.preventDefault(),this.started=!1},[`${tg}cancel`](e){e.preventDefault(),this.started=!1}}}}function ig({chart:e,componentKey:t,actions:n,scroller:i}){return function(r){if(!n.scroll.enabled()||!i.enabled())return;const[o]=e.componentsFromPoint({x:r.clientX,y:r.clientY}).filter(e=>e.key===t);if(!o)return;r.preventDefault();const a=Math.abs(r.deltaY)>Math.abs(r.deltaX)?r.deltaY:r.deltaX,s=100*Math.sign(-a);i.scroll(s)}}function rg({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const i=Math.min(t,Math.max(Kf,n));return{width:e,height:Math.max(Xf,Math.min(n*Wf,i))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:i,height:r}=t({width:e.qWidth,height:e.qHeight}),o=r?Math.ceil((r-e.qHeight)/2):0,a=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:r?Math.min(r,n.height):e.qHeight,qWidth:i?Math.min(i,n.width):e.qWidth,qTop:r?Math.max(0,Math.min(e.qTop-o,n.height-r)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-a,n.width-i)):e.qLeft}}}function og(e){let t,n;const i=r=>{t=r;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(Uf),t=null,void(n&&(i(n),n=null));t.resolve(e[0]),t=null})},r=e=>new Promise((r,o)=>{const a={request:e,resolve:r,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(Uf),n=e})(a):i(a)});return r.isProcessing=()=>!!t,r.hasQueued=()=>!!n,r.cancel=()=>{r.isProcessing()&&t.cancel(),r.hasQueued()&&(n.reject(Uf),n=null)},r}const ag={command:{update:()=>{}}};function sg({dataStore:e,composition:t,enigmaModel:n,layoutService:i,trendLineModel:r=ag,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:i,request:r,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const i=e.getCurrent();if(a)return Promise.resolve(t(i,l));const r=n.release(i.qArea,l),s=o.isProcessing();if(!r&&s&&o.cancel(),!r||s)return Promise.resolve(t(i,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=i(l);return o(r(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:rg({layoutService:i}),request:c({definitionPath:o}),process:og(n),connectionless:i.meta.isSnapshot,processDataPage:a}),m=O((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==Uf)throw e})},50);return function(e,{onProcessing:t=Yf,onDataPage:n=Yf}={}){m(e,{onProcessing:t,onData:e=>{i.setDataPages(e?[e]:[]),r.command.update(),n(e)}})}}var lg={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:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=r/i;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var cg={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:i}){const r=void 0===i?4:i,o=Math.max(0,Math.floor(t)-r/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+r))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=i/n.inView,s=(r+o.qArea.qTop*a)/i;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function ug(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function mg(e,t){const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);-1===n.indexOf(r)&&n.push(r)}return n.length}function dg(e){return mg(e.qMatrix,e=>e[0].qElemNumber)-1}var hg={inTotal:function({layoutService:e}){const t=ug(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:i}){const r=ug(e),o=void 0===i?r:i,a=t/(r+1),s=Math.max(0,Math.floor((t-a-o/2)/r));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/r+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const r=ug(e),o=e.getDataPages()[0],a=i/n.inView,{pixel:s}=t,l=dg(o),c=o.qArea.qHeight*r+l,u=(s+(o.qArea.qTop*r+o.qArea.qTop)*a)/i;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const pg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function fg(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return pg(e,n);const i=((e,t)=>{const n={successful:!0,count:0};let i=Math.abs(Math.floor(t));const r=[];for(let t=0;t<=i;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===r.indexOf(o)&&(r.push(o),i--)}return n.count=r.length-1,n})(t.qMatrix,n);return i.successful?i.count:pg(e,n)},area(t,n,i){if(0!==t.qArea.qTop)return pg(e,n);return mg(t.qMatrix.slice(0,i.qTop+1),e=>e[0].qElemNumber)-1}}}var gg={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:i}){const r=fg(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-r));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:i,viewSize:r,upperBound:o}){const a=t.getDataPages()[0],s=r/i.inView,{item:l,pixel:c}=n,u=fg(t).area(e(),l,a.qArea),m=dg(a),d=a.qArea.qHeight+m,h=c===o?(i.inView-d)*s/r:(c+(a.qArea.qTop+u)*s)/r;return[h,i.inView>=i.inTotal?h+1:h+d/i.inView]}};function yg({chart:e,rect:t,dockService:n,itemWidths:i,axisKey:r,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:m,SQUEEZE:d,LABELLESS:h}=i[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,S=v/l>=d;switch(f){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/h:S?function({chart:e,isHorizontal:t,axisKey:n,renderer:i={},isGrouped:r,itemSize:o,label:a}){if(r||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=i;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:m}=s.settings.settings.labels,{height:d}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return d>o;const h=(90-m)*(Math.PI/180);return d>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:r,renderer:o,isGrouped:a,itemSize:d,label:y})?v/m:l:v/m}}function vg({chart:e,getRect:t,getDataPages:n,layoutService:i,dockService:r,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:m,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:i}=e.meta;return t?lg:n?i?hg:gg:cg}({layoutService:i}),h=()=>"horizontal"===r.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,f=(e,t)=>-(e-t)*p(t);return{getItems(){const n=i.getLayoutValue("dimensionAxis"),l=u({layoutService:i});return{inTotal:l,inView:yg({chart:e,rect:t(),dockService:r,itemWidths:o(),axisKey:a,renderer:s,isGrouped:i.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t,r=Math.min(0,Math.max(e,f(n,i))),o=i?Math.abs(i*r/h()):0;return{start:{pixel:r,item:o},end:{item:Math.min(o+(i||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:i}){const r=e/n*t,o=Math.abs(i)/r;return[o,Math.min(1,o+e/r)]}({viewSize:h(),inTotal:n,inView:i,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>m({getDataPages:n,layoutService:i,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:n,layoutService:i,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===r.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return e<=0&&e>=f(n,i)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,i=e*p(n);return Number.isFinite(i)?-i:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:i}=t;return-e*(p(i)*n)}}}}function Sg({chart:e,componentKey:t,state:n,dataStore:i,pageData:r,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:m,viewState:d,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=vg({chart:e,getRect:()=>n.get("rect"),getDataPages:i.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:m,rtl:h}),f=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const i=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",i),i},y=e=>{const t=Date.now(),i=f(),a=g({pixelOffset:e,items:i}),s=p.getArea({itemOffset:a.start.item,items:i});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:i})||d.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),d.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i})),d.set("scrollOffset",{start:a.start.item,end:a.end.item})));d.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),d.set("scrollOffset",{start:a.start.item,end:a.end.item}))};r(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 i=e.component(t);if(!i)return Promise.resolve();n.set("rect","function"==typeof l?l():i.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",p.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=d.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:i,end:r}=n,a=1===t&&r?r-e.inView:i;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});d.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const m=p.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{r(m,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),d.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),i=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(i)}}}function Mg({chart:e,actions:t,componentKey:n,enigmaModel:i,layoutService:r,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:m,axisKey:d,renderer:h,areaBuffer:p,processDataPage:f=()=>{}}={}}){const g=A(),y=function({qMode:e}){switch(e){case"K":return Zf;case"T":return Qf;default:return Jf}}({qMode:r.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(eg,[]),{add:t=>{const n=e.get(eg);n.length=0,n.push(t)},getCurrent:()=>e.get(eg)[0],getAll:()=>e.get(eg),contains:n=>t(e.get(eg)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const i=e.getDataPages()[0];if(!i)return;const r=n.patcher({layoutService:e});r.should(i)&&r(i),t.add(i)}({layoutService:r,dataStore:v,composition:y});const S=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),M=sg({dataStore:v,composition:y,enigmaModel:i,layoutService:r,trendLineModel:a,definitionPath:u,processDataPage:f}),E=Sg({chart:e,componentKey:n,state:g,dataStore:v,pageData:M,layoutService:r,dockService:o,itemWidths:s,getRect:m,axisKey:d,renderer:h,areaBuffer:S,viewState:l,rtl:c}),b=function({layoutService:e,dataStore:t}){return function(n){const i=x(n,`${e.refs.dataPages}`);i.length=0,i.push(t.getCurrent())}}({layoutService:r,dataStore:v}),C=function({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{gestures:[ng({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o})],native:{type:"native",events:{wheel:ig({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:E});return{interactions:C,query:{getCanScroll:()=>E.enabled(),getItemSize:()=>E.itemSize(),getScaleRange:()=>E.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>E.initialize(),scrollTo:e=>E.scrollToRelative(e),setSnapshotData:e=>b(e)}}}var Eg={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 xg({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 bg({layoutService:e,dockService:t,themeService:n,colorService:i,flags:r}){const{BAR:o,LINE:a,POINT:s}=Fl,l=n.getStyles(),c=xg({layoutService:e,key:"bar"}),u=xg({layoutService:e,key:"line"}),m=()=>{const e=c({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find(e=>e.key===t):void 0,h=(e,t)=>{const n=i.getPaletteColor;if(e?.color&&n){const i=n(e);return"none"===i&&e.index>0?e?.color??t:i??t}return t};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter(e=>"bar"===e.key).length,getWidthFn:()=>()=>c({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!m(),getStrokeWidth:()=>m(),getStrokeColor:()=>h(c({property:"strokeColor"}),o.STROKE.COLOR),label:{getStyle:()=>{const e=d("bar")?.bar?.label?.value;return{fill:h(e?.color,l.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??12,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>u({property:"lineCurve",defaultValue:a.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>u({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?a.WIDTH.FULL.DEFAULT:a.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=u({property:"lineType",defaultValue:a.TYPE.SOLID});return e&&a.TYPE[e.toUpperCase()]}},point:{getSize:()=>u({property:"dataPointSize",defaultValue:s.SIZE.DEFAULT}),label:{getStyle:()=>{const e=d("line")?.line?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{const e=d("marker")?.marker?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{const e=d("axis")?.axis?.title;return{fontFamily:e?.fontFamily??l.axis.title.fontFamily,fontSize:e?.fontSize??l.axis.title.fontSize,color:h(e?.color,l.axis.title.color)}}},label:{getStyle:()=>{const e=d("axis")?.axis?.label?.name;return{fill:h(e?.color,l.axis.label.name.color),fontSize:e?.fontSize??l.axis.label.name.fontSize,fontFamily:e?.fontFamily??l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=d("legend")?.legend?.title;return{fontFamily:e?.fontFamily??l.legend.title.fontFamily,fontSize:e?.fontSize??l.legend.title.fontSize,color:h(e?.color,l.legend.title.color)}}},label:{getStyle:()=>{const e=d("legend")?.legend?.label;return{fontFamily:e?.fontFamily??l.legend.label.fontFamily,fontSize:e?.fontSize??l.legend.label.fontSize,color:h(e?.color,l.legend.label.color)}}}}}}}function Cg({layoutService:e}){return I({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Ag({dataset:e,data:t,valueData:n}){const{source:i,label:r,value:o}=n,a=e(i.key).field(i.field);return se.shouldUseFormat(a.raw())?"-"===r||""===o||Number.isNaN(o)||"NaN"===o||t.null?.value?"-":a.formatter()(o):r}function Ng({chart:e,actions:t,translator:n,rtl:i,dockService:r,seriesModel:o,colorService:a,themeService:s,layoutService:l,propertiesModel:c,custom:u}){const m=s.getStyles(),{isLineStacked:d}=l.meta,h=({data:e})=>e.major.value,p=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:f}=Xa.COMPONENT,{PRIMARY:g,SECONDARY:y}=Ka.AXIS,v=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:i,DATA_OOB_MARKER:r,SLICED_HAT:o}=Xa.COMPONENT,{PRIMARY:a,SECONDARY:s}=Ka.AXIS,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[m]=t,{triggerer:d}=l,h=d===n.MAJOR?m.data.value:m.data.major.value;if(c){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===`${i}-max-${a}`||e.key===`${i}-max-${s}`||e.key===`${r}-max`)&&e.data.major.value===h);if(c&&p)return{key:p.key,bounds:p.bounds};const f=e.findShapes("path").find(e=>(e.key===`${i}-min-${a}`||e.key===`${i}-min-${s}`||e.key===`${r}-min`)&&e.data.major.value===h),g=e.findShapes("*").filter(e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===h);if(c&&f&&!g.find(e=>e.data.end?.source?.field!==f.data.end?.source?.field)&&!g.find(e=>e.data.segment?.source?.field!==f.data.source?.field))return{key:f.key,bounds:f.bounds};const y=p||f;return!(c||!y||g.find(e=>e.data.end?.source?.field!==y.data.end?.source?.field)||g.find(e=>e.data.segment?.source?.field!==y.data.source?.field))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:r,seriesModel:o});return R({chart:e,translator:n,config:{rtl:i,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:m.fontFamily},main:{key:Xa.COMPONENT.TOOLTIP,getGroupByValue:h,collectibles:[...o.meta.barComponentKeys.map(e=>({key:e,type:"bar",major:h})),...o.meta.pointComponentKeys.map(e=>({key:e,type:"point",major:h})),...o.meta.markers.map(e=>({key:e.key,type:e.type,major:h}))],triggers:[{keys:[Xa.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:p},placement:v},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${f}-max-${g}`,`${f}-max-${y}`,`${f}-min-${g}`,`${f}-min-${y}`,`${Xa.COMPONENT.BAR_OOB}-max-${g}`,`${Xa.COMPONENT.BAR_OOB}-max-${y}`,`${Xa.COMPONENT.BAR_OOB}-min-${g}`,`${Xa.COMPONENT.BAR_OOB}-min-${y}`,`${Xa.COMPONENT.DATA_OOB_MARKER}-max`,`${Xa.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:h,filter:p},placement:v},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:h,filter:p},placement:v}],section:({h:e,nodes:t,dataset:n,create:i,util:r})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(i.text({value:a,style:{bold:!0}})),s&&c.push(i.text({value:s}));const m=u.hideBasic();m&&!l.length&&(a||s)||c.push(i.text({value:o.data.label,style:{bold:!0}})),m||(c.push(i.color({nodes:t,property:Xa.SCALE.COLOR})),c.push(...t.map(e=>{const{segment:t,end:o,point:a}=e.data,s=e.key.includes("point-component")&&d?a:t||o,{key:l,field:c}=s.source;return i.measure({label:r.dataset.title(l,c),value:Ag({dataset:n,data:e.data,valueData:s})})}))),l&&c.push(...l.map(e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(i.raw({value:u.chart.createLimitationRow()}))):c.push(i.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:h}=o.data;return u.isEnabled()&&h&&c.push(...h.map(t=>i.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:c.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:Xa.COMPONENT.LEGEND_TOOLTIP,component:Xa.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:Og}=Xm,Tg=({picasso:e,chart:t,environment:d,flags:h,viewState:p,viewCache:f,actions:g,selectionService:y})=>{const v=s(),{width:S,height:M}=r(),[E,x]=n(),[b,C]=n(),A=a(),N=l(),O=c(),T=u(),L=m(),I=Qd({enable:!1===E?.layoutService?.meta?.isSnapshot});i(()=>{if(!(v&&t?.update&&d&&p&&y))return;const n=k({source:v,metaAdditionsFn:yf(h)}),{options:i,translator:r}=d,{direction:o}=i,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},i=Mf({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>i().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:A,layoutService:n}),l=w({app:N,translator:r}),c=D({chart:t,layoutService:n,config:{logicalSize:{width:S,height:M},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=hf({layoutService:n}),m=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:i,seriesModel:r,viewState:o,rtl:a,actions:s,picasso:l}){return Mg({chart:e,actions:s,componentKey:Km(r),enigmaModel:t,layoutService:n,dockService:i,viewState:o,rtl:a,itemWidths:Eg,options:{axisKey:Xa.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:A,layoutService:n,dockService:c,seriesModel:u,viewState:p,rtl:"rtl"===d.options.direction,actions:g,picasso:e}):void 0,E=n.meta.isContinuous?Og({model:A,layoutService:n,viewState:p,viewCache:f}):void 0,b=q({theme:d.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),C=Hf({actions:g,appLayoutModel:O,appModel:N,chart:t,environment:d,genericObjectModel:A,layoutService:n,picasso:e,seriesModel:u,viewState:p}),I=bg({layoutService:n,dockService:c,themeService:b,colorService:C,flags:h}),R=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,i="qDimensionInfo/0",r=`${i}:numeric`;return{main:{major:i,majorNumeric:r,minorsPrimary:t.meta.primarySeries.map(e=>e.ref),minorsSecondary:t.meta.secondarySeries.map(e=>e.ref)},virtuals:n?[{key:r,from:i,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:u}),z=Af({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:E}),$=Af({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:E}),_=Cg({layoutService:n}),B=Bf({config:{measureAxesRef:"measureAxes.0",formatter:Xa.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:z,dockService:c,seriesModel:u,themeService:b}),F=Bf({config:{measureAxesRef:"measureAxes.1",formatter:Xa.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:$,dockService:c,seriesModel:u,themeService:b}),V=Ff({genericObjectModel:A,layoutService:n}),j=fs({flags:h,layout:v,app:N,model:A,picasso:e,chart:t,translator:r,localeInfo:O.qLocaleInfo,embed:L,options:i}),H=Ng({chart:t,actions:g,translator:r,rtl:a,dockService:c,seriesModel:u,colorService:C,themeService:b,layoutService:n,propertiesModel:V,custom:j}),U=Ca({layoutService:n,discreteModel:m}),Y=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Xa.SCALE.MAJOR,MAJOR_INNER:Xa.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Xa.SCALE.MINOR.PRIMARY,SECONDARY:Xa.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Xa.COMPONENT.BAR}-${Ka.AXIS.PRIMARY}`,BAR_SECONDARY:`${Xa.COMPONENT.BAR}-${Ka.AXIS.SECONDARY}`,AXIS:{MAJOR:Xa.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Xa.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Xa.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Xa.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Xa.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Xa.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Xa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Xa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Xa.COLLECTION.MAIN}}}}(n),W=P({picassoInstance:e,plugins:T,pluginArgs:Y}),X=function({options:e,viewCache:t,layoutService:n}){const i={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||i.hasSlicedHats||i.isPartialUpdating||i.isSizeChanging||pa.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:i}}({options:i,viewCache:f,layoutService:n});x({alternativeService:l,selectionService:y,genericObjectModel:A,appModel:N,dockService:c,styleModel:I,layoutService:n,fieldModel:R,seriesModel:u,reducedModel:s,primaryExtremumModel:z,secondaryExtremumModel:$,primaryTickModel:B,secondaryTickModel:F,propertiesModel:V,colorService:C,themeService:b,appLayoutModel:O,tooltipService:H,disclaimerService:_,flags:h,...m&&{discreteModel:m},...E&&{continuousModel:E},refLineModel:U,pluginService:W,animationsModel:X})},[v,A,N,O,d,t?.update,p,y]);const[,R]=o(()=>{if(!E)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:i,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:c,disclaimerService:u,styleModel:m}=E,h=s?()=>{s.update(t.getLayout());const e=s.initialFetch(),n=!t.meta.isSnapshot&&d?.options?.viewState?.zoom;return n&&p.preventSet("zoom",n),e}:()=>Promise.resolve(),f=n.initialize().then(()=>{const e=n.getSettings().field;y&&y.setBrushAliases({colorField:e}),n.custom.updateLegend(m)});return Promise.all([c.initialize(),i.command.initialize(),A?a.command.initialize():Promise.resolve(),f,h(),g.scroll.attachDiscreteModel(l)]).then(()=>Promise.all([r.command.initialize(),o.command.initialize()]).then(async()=>{await e.initialize({properties:a.query.getProperties()||{}}),u.initialize(),C({...E})}))},[E,I]);if(R)throw R;return b};const Lg={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 Ig={query:{getCanScroll:()=>!0}};function Rg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function kg({setSelectionInfo:e,event:t,components:n,clear:i}){const r=n?.length?n.map(e=>e.key).filter(Boolean):[];e({event:t,components:r,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&r[0]===Xa.COMPONENT.LEGEND_CATEGORICAL}),i()}function wg({chart:e,actions:t}){const r=S(),o=s(),[a,l]=n();return i(()=>{if(!e?.update||!e.scale)return null;const n=e.scale(Xa.SCALE.MAJOR),i=$({chart:e,actions:t,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:Rg},selectionEvents:{start:kg}}});i.setLayout(o);const{destroy:a}=i;return l(i),()=>{a()}},[r,e?.update,e?.scale]),i(()=>{a?.setLayout&&o&&a.setLayout(o)},[o]),a}const Dg={version:"1.35.4",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},lineType:"line",stackedArea:!1,separateStacking:!0,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 qg=(e,t)=>n=>{const i=n.qHyperCubeDef.qMeasures,r=t.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA"),{lineType:o}=n,a=[0,0,0];let s;const l=r&&"area"===o?["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Area","Visualizations.Descriptions.ComboChart.Dimension.AreaMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarArea","Visualizations.Descriptions.ComboChart.Dimension.BarAreaMarker"]:["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"];if(!i.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<i.length;++e)s=ou(i[e].qDef.series),s===Ka.TYPE.BAR?a[0]=1:s===Ka.TYPE.LINE?a[1]=1:a[2]=1;const c=l[parseInt(a.join(""),2)-1];return e.get(c)},Pg=e=>(t,n)=>{let i;const r=t.qHyperCubeDef.qMeasures[n];if(r){const{type:e}=r.qDef.series;i=e===Ka.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===Ka.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else i=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(i)};function zg(e){const t=e.qHyperCubeDef.qMeasures,n=e.color?.mode;"byDimension"===n&&1===t.length&&ou(t[0].qDef?.series)===Ka.TYPE.LINE?e.color.mode="primary":"byDimension"===n&&t.length>1&&(e.color.mode="byMultiple")}function $g(e){const{translator:t,flags:n}=e;return{dimensions:{min:1,max:1,description:qg(t,n),added(e,t){cs.addCallbackCustomTooltip(t)},moved(e,t){cs.moveCallbackCustomTooltip(t,e)},removed(e,t){cs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,i){cs.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:15,description:Pg(t),added({qDef:e},t){zg(t),e.series?.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ka.TYPE.LINE,axis:Ka.AXIS.SECONDARY}:e.series={type:Ka.TYPE.BAR,axis:Ka.AXIS.PRIMARY})},moved(e,t){zg(t)}}}}function _g(e){const t=$g(e);return{properties:Dg,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:i})=>{const r=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:i}),o="linechart"===e.properties.visualization,a=[];r.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 r.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&Z(!0,r.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),r},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const Bg=({models:e,chart:t,viewState:n})=>{M(i=>{if(!e)return;const{layoutService:r,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:m}=o.meta.chart.size;return i.snapshotData=i.snapshotData||{},i.snapshotData.content={size:{w:u,h:m}},r.meta.isSnapshot?Promise.resolve():(i.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:de(t,Xa.COMPONENT.LEGEND_CATEGORICAL)},r.meta.isDiscrete?(s.command.setSnapshotData(i),c.command.setSnapshotData(i)):l.setSnapshotData(i),a.getSnapshotData().then(e=>{i.snapshotData.content.chartData={...i.snapshotData.content.chartData,...e}}).catch(()=>{}))}),E(()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:de(t,Xa.COMPONENT.LEGEND_CATEGORICAL)}}}),[n,t])};const Fg=e=>{const t=x(e,"qHyperCube.qMeasureInfo",[]).some(({series:e=Ka.NOPE_SERIES})=>ou(e)===Ka.TYPE.LINE);return me.continuous({layout:e,auto:()=>t&&re.isTime(!0,e)})},Vg=(e,t,n)=>{let i;const r=n||0;i="function"==typeof e?.getMeasureLayouts?e.getMeasureLayouts():t.layout?.qHyperCube?.qMeasureInfo??[];return i.filter(e=>{const{series:t}=e||{};return 0===r?rh(t,!0):!rh(t,!0)})},jg=(e,t)=>{const n=Vg(e,t,0).filter(e=>e.series.type===Ka.TYPE.BAR),i=Vg(e,t,1).filter(e=>e.series.type===Ka.TYPE.BAR),r="stacked"===x(t.layout,"barGrouping.grouping");return!me.continuous({layout:t.layout})&&r&&(n.length>1||i.length>1)},Hg=(e,t,n,i,r=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>r??n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:i.getStyle("object.comboChart",t,"color")})}}}}};function Ug(e,t,n){const i=_({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground: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",show:(e,t)=>!Fg(t.layout),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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...Hg("bar.label.value","label.value",i,t,"12px"),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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:Hg("line.label.value","label.value",i,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:Hg("marker.label.value","label.value",i,t)}}}}},axisTitleSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:Hg("axis.title","axis.title",i,t)}}}:void 0,axisLabelSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:Hg("axis.label.name","axis.label.name",i,t)}}}:void 0,legendTitleSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Hg("legend.title","legend.title",i,t)}}}:void 0,legendLabelSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Hg("legend.label","legend.label",i,t)}}}:void 0}}}const Yg={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",show:(e,t)=>!Fg(t.layout),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 Wg(e){return!!e.qDef?.color?.on}function Xg(e){return Wg(e)&&"primary"===(e.qDef?.color?.mode??"primary")}function Kg(e){return Wg(e)&&"byExpression"===e.qDef?.color?.mode}function Gg(e){if(e?.color?.auto||"byExpression"!==e?.color?.mode)return[];const t=e?.color?.colorExpression;return t?[{qExpression:t,label:e?.color?.expressionLabel??"",id:"colorByExpression"}]:[]}function Jg(e){return Kg(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function Zg(e){(e?.qHyperCubeDef?.qMeasures??[]).forEach((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...Gg(n),...Jg(e)]:Jg(e)}(t,n,e))}function Qg(e){const t={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||Fg(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"}]},n={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=>ou(e.qDef?.series)===Ka.TYPE.MARKER},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show:e=>ou(e.qDef?.series)===Ka.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)},r={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)=>Wg(...e)},o=e.anything?.sense?.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>n.measureTitle?.(),component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:t,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:n,seriesMarkerFill:i}},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:r,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{const{primary:e}=o.getDataColorSpecials(),t=o.getDataColorPickerPalettes()[0]?.colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}},show:Xg},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:Kg}}}}}}}}}}}}const ey=10,ty=!0,ny=({series:e=Ka.NOPE_SERIES})=>e.axis!==Ka.AXIS.SECONDARY,iy=({series:e=Ka.NOPE_SERIES})=>e.axis===Ka.AXIS.SECONDARY;function ry(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map(e=>e.qDef)}function oy(e){return e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.LINE).length>0}const ay=(e,t,n)=>{const i=n.layout.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.LINE),r=i.filter(ny).length>1||i.filter(iy).length>1;return"area"===e.lineType&&ry(e,t).length>0&&r};function sy(e,t){const n=e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.BAR);return n.filter(e=>e.series.axis!==Ka.AXIS.SECONDARY).length>t||n.filter(e=>e.series.axis===Ka.AXIS.SECONDARY).length>t}function ly(e){return e.qHyperCube.qMeasureInfo.filter(e=>ou(e.series)===Ka.TYPE.MARKER).length>0}const cy=(e,t,n,i)=>{const r="vertical"===e.layout.orientation||Fg(e.layout)?"y":"x",o=Vg(e,t,i).map(e=>e.qFallbackTitle);let a;return a=o.length?n.get(`properties.${r}AxisWithInfo`,[o.join(",")]):n.get(`properties.${r}Axis`),a};function uy(e){const{translator:t,flags:n,anything:i}=e,r=e?.anything?.sense?.theme,o=e?.anything?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>Zg(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e))}}},s=e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e)),l=(e,t)=>0!==e.filter(e=>e.series.axis===t).length,c={items:{disclaimer:{show:(e,t)=>s(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach(e=>{var t;x(t=e,"qDef.color.on",void 0)&&b(t,"qDef.color.on",!1)})}},simpleItems:{show:(e,t)=>!s(e)}}},u={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,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&sy(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&oy(n.layout),convertFunctions:{get:(e,t,n,i)=>i.dataPoint.show&&i.dataPoint.showLineLabels,set(e,t,n,i,r){r.dataPoint.showLineLabels=e,r.dataPoint.show=e}},reset(e){b(e,"dataPoint.show",!1),b(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,i)=>"labels"===i.dimensionAxis.show||"none"===i.dimensionAxis.show,set(e,t,n,i,r){r.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,n,i)=>t.get(Vg(n,i,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&Vg(e,t,0).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[0].show||"none"===i.measureAxes[0].show,set(e,t,n,i,r){r.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&&Vg(e,t,1).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[1].show||"none"===i.measureAxes[1].show,set(e,t,n,i,r){r.measureAxes[1].show=e?"labels":"all"}}}}}}},m={uses:"settings",items:{simpleStyling:Yg,simpleLabels:u,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:Ug(n,r,t),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)=>sy(n.layout,1)&&!Fg(n.layout)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",defaultValue:"line",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t,i)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&oy(i.layout)},stackedProps:{type:"items",grouped:!1,items:{stackedArea:{ref:"stackedArea",translation:"properties.style.stackedArea",type:"boolean",defaultValue:!1,show:(e,t,i)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&ay(e,t,i)},separateStacking:{ref:"separateStacking",translation:"properties.separateStacking",type:"boolean",defaultValue:!0,readOnly:e=>!e.stackedArea,show:(e,t,i)=>n.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA")&&ay(e,t,i)}}},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)=>Fg(n.layout),convertFunctions:(d="vertical",{get:(e,t,n)=>Fg(n.layout)?d:e(t.type),set(e,t,n,i){t(n.type,Fg(i.layout)?d:e,d)}})},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)=>!Fg(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,n)=>oy(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>oy(e)},show:(e,t,n)=>oy(n.layout),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"}]}}},barLabels:{type:"items",snapshot:{tid:"property-barLabels",show:e=>sy(e,0)},show:(e,t,n)=>sy(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>sy(n.layout,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showBarSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&jg(t,n)},showTotalLabels:{ref:"dataPoint.showBarTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&jg(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>ly(e)},show:(e,t,n)=>ly(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const i=[],r=n.layout.qHyperCube.qMeasureInfo,o=l(r,0),a=l(r,1);return o&&i.push({translation:"properties.axis.primary",value:0}),a&&i.push({translation:"properties.axis.secondary",value:1}),i},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,i){const r=i.gridLine.axis??0,o=n.layout.qHyperCube.qMeasureInfo,a=l(o,0),s=l(o,1);return 0===r&&!a&&s?(b(i,"gridLine.axis",1),1):1===r&&a&&!s?(b(i,"gridLine.axis",0),0):r}}},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:a,simpleColors:c,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const i="vertical"===n.layout.orientation||Fg(n.layout)?"x":"y",r=ry(e,n).map(e=>e.qFallbackTitle||"").join(", ");let o;return o=r?t.get(`properties.${i}AxisWithInfo`,[r]):t.get(`properties.${i}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",i="Common.Top";return"vertical"===t.layout.orientation||Fg(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!Fg(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:ey,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;return i<0||i>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;i<1?e.dimensionAxis.maxVisibleItems=ey:i>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,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:!o}},measureAxis:{uses:"axis.measureAxis",label:(e,n,i)=>cy(n,i,t,0),show:(e,t,n)=>Vg(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,i)=>cy(n,i,t,0),show:(e,t,n)=>Vg(t,n,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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&rh(e?.series,ty))}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&Vg(t,n,0).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||Fg(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&Vg(t,n,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,n)=>Vg(t,n,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,i){const{autoMinMax:r,minMax:o,min:a}=i?.measureAxes[0]||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(b(r,"measureAxes.0.autoMinMax",!1),b(r,"measureAxes.0.minMax","min"),b(r,"measureAxes.0.min",0)):b(r,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,n,i)=>cy(n,i,t,1),show:(e,t,n)=>Vg(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,i)=>cy(n,i,t,1),show:(e,t,n)=>Vg(t,n,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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&!rh(e?.series,ty))}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&Vg(t,n,1).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||Fg(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&Vg(t,n,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,n)=>Vg(t,n,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,i){const{autoMinMax:r,minMax:o,min:a}=i?.measureAxes[1]||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(b(r,"measureAxes.1.autoMinMax",!1),b(r,"measureAxes.1.minMax","min"),b(r,"measureAxes.1.min",0)):b(r,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var d;n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(m.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 h={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){if(i?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;return!Fg(n.layout)}}}},measures:Qg(e)}};return{type:"items",component:"accordion",items:{data:h,sorting:{uses:"sortingWithDisclaimer"},addons:(()=>{const e={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=>rh(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,ty)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some(e=>!rh(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,ty)},dimRefLines:{uses:"dimReflines"},plugins:n?.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&n?.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Ha({translator:t,pluginOptions:[{value:"point",translation:t.get("Visualizations.Descriptions.Point")},{value:"line",translation:t.get("Visualizations.Descriptions.Line")}]}):void 0}};return e})(),settings:m}}}function my(e){return e.qHyperCubeDef.qMeasures.filter(e=>ou(e.qDef.series)===Ka.TYPE.LINE).length>0}function dy(e){const t=e.flags.isEnabled("VIZ_247_COMBO_CHART_LINE_AREA");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)=>my(e)||!Fg(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)=>function(e,t){const n=e.qHyperCubeDef.qMeasures.filter(e=>ou(e.qDef.series)===Ka.TYPE.BAR);return t?n.filter(e=>e.qDef.series.axis===Ka.AXIS.PRIMARY).length>1||n.filter(e=>e.qDef.series.axis===Ka.AXIS.SECONDARY).length>1:n.length>1}(e,!df(e?.version??""))&&!Fg(t)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:e=>t&&my(e)},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)=>!Fg(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=>my(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>my(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>Wg(e))}}}}}}const hy={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 py(e,t,n,i,r){const{axis:o,icon:a,tid:s,translation:l}=hy[r];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await i.addLibraryMeasure(e.id):await i.addExpressionMeasure(e.name,""),t.qDef.series.type=r,t.qDef.series.axis=o,i.updateGlobalChangeListeners(),n.setProperties(i.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function fy(e,t,n,i,r){!function(e,t,n){const{item:i}=e,r=["contextMenu.add",i.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:r,tid:"add-as"});py(i,o,t,n,"bar"),py(i,o,t,n,"line"),py(i,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,r),e.ColorBy(n,t,r),i()}function gy(e){const t={},{tooltip:n}=e;if(n){t.chart_tooltip_custom=!n.auto;const e=n.chart?.object?.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const yy=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function vy(e){return{definition:uy(e),softDefinition:dy(e),support:{snapshot:yy,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:fy,extendMetrics:gy,importProperties:(t,n,i,r)=>{const o={layout:{templateId:n.templateId}};i.mapProperties(o);const a={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:$g(e),defaultPropertyValues:a,hypercubePath:r,extension:i});return function(e,t,n){const i="linechart"===n.properties.visualization,r=[];e.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),r.indexOf(e.qDef.series.axis)<0&&r.push(e.qDef.series.axis)});const o=r.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&Z(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),Zg(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){e.qHyperCubeDef.qDimensions.forEach(xt),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(xt)}(e),function(e){return df(e.version)&&(e.qHyperCubeDef.qMeasures.forEach(e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Ka.NOPE_SERIES),void 0===t.series.type&&(t.series.type=Ka.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ka.TYPE.BAR?Ka.AXIS.PRIMARY:Ka.AXIS.SECONDARY),t.series.type===Ka.TYPE.BAR&&t.series.axis===Ka.AXIS.SECONDARY&&(t.series.axis=Ka.AXIS.PRIMARY)}),e.version=mf.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}});