@nebula.js/sn-waterfall 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-waterfall v1.0.1
2
+ * @nebula.js/sn-waterfall v1.0.2
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as m,useState as f,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";var D={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","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_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_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_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",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.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function S(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var M={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=`${t.height}px`,r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${t.height}px`,r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${t.width}px`,r.height=`${t.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),a="center"===n?t:`* ${t}`,s="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const w={version:"1.0.1",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function A(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C,k={exports:{}};var N=(C||(C=1,self,k.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(f&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(f,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(f&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(f,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function m(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function f(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function v(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=b(c(n[0],i),f(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),m=f(0),h=f(1),g=b(p,m),y=b(d,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function q(e){var t=e.properties,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const D={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(m(t));if(!r.showExcludedValues)return a;var s=v({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=f(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var p=f(0),d=f(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===q({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=f(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=q({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:f,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(n=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}var w=t().bind(null,!0),A={},E=Array.isArray;function C(e){return null!=e&&!Array.isArray(e)&&"object"===M(e)}function k(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=k(e[r||t])?o:e[t],e=e[r||t]}})),e}function L(e,t){var r=!0;if(C(e)&&C(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){L(e[n],t[n])||(r=!1)})),r);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!L(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?w({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);L(o,a)||N(t,i)||(k(a)?n.push({op:"add",path:s,value:o}):C(o)&&C(a)?n=n.concat(A.generate(a,o,s)):E(o)&&E(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&k(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(L(t,i))return n;if(!k(t[0])&&k(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(A.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){k(t[i])&&!N(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,i=I(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(C(a)&&C(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!N(r,e)&&delete r[e]})),w(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=I(e,t.from);E(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])}))},A.clone=function(e){return w({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):w(e,t)};const T=A,O=function(e,r,n){if(!e)return Promise.resolve();var i=T.generate(r,n);return t()(!0,r,n),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var R="accumulation";function F(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===R)return r[n]}function P(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===R)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const H={translationKey:"properties.modifier.accumulation",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getNumStepComp(r,l),d=D.getAboveComp(r,l,c,p),m=D.getRangeComp("RangeSum",d);if(D.needDimension({modifier:r,properties:n,layout:i})){var f=D.getDimComp(u,1),h=D.getDimComp(u,0),g=D.getAggrComp(m,f,h);m=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return m},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,_)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(P(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(P(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=F(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=F(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(R))return!1;var o=F(t,e);return o&&!o.disabled}};return r}};var V="movingAverage";function z(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function j(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=D.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=D.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),m=D.getNumStepComp(n,u),f=D.getAboveComp(n,u,d,m);if(n.nullSuppression)t=D.getRangeComp("RangeAvg",f);else{var h=D.getRangeComp("RangeSum",f),g=function(e,t){var r=D.getRowNoComp(e,t);if(!D.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(D.needDimension({modifier:n,properties:i,layout:a})){var b=D.getDimComp(c,1),v=D.getDimComp(c,0),x=D.getAggrComp(y,b,v);y=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=z(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=z(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=z(t,e);return o&&!o.disabled}};return r}};var W="timeSeriesDecomposition";function U(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function K(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const Y={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?D.generateTSDExpression(r,t,n):t},extractInputExpression:D.extractInputExpression,initModifier:function(e,t){D.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=D.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=U(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var r=U(t,e);return r&&!r.fullRange}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Q(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Z={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(D.needDimension({modifier:r,properties:n,layout:i})){var m=D.getDimComp(u,1),f=D.getDimComp(u,0),h=D.getAggrComp(d,m,f);d=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(Z).forEach((function(t){void 0===e[t]&&(e[t]=Z[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Q(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Q(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(D.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(D.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),p=ue(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=D.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,r.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var pe="qDef.base",de="qDef.qDef",me="qDef.base.qDef",fe="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,me);return void 0!==t?t:o(e,de)},getExpressionRef:function(e){return void 0!==o(e,me)?me:de},getLibraryIdRef:function(e){return o(e,he)?he:fe},getLibraryId:function(e){return o(e,he)||o(e,fe)},getLabelRef:function(e){return o(e,pe)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,pe)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",be="qDef.base.qDef",ve="qLibraryId",xe="qDef.base.qLibraryId",qe="qDef.qLabel",De="qDef.qLabelExpression",Se="qDef.base.qLabel",Me="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(r(e,be,o(e,ye)),r(e,xe,o(e,ve)),r(e,Se,o(e,qe)),r(e,Me,o(e,De)))},restoreBase:function(e){Ee.isValid(e)&&(r(e,ye,o(e,be)),r(e,ve,o(e,xe)),r(e,qe,o(e,Se)),r(e,De,o(e,Me)),o(e,we)&&o(e,Ae)&&r(e,we,o(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=o(e,be),r=o(e,xe);return void 0!==t||void 0!==r}};const Ce=Ee;function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}var Ne={accumulation:H,movingAverage:B,difference:ee,normalization:ce,timeSeriesDecomposition:Y};const Ie={modifiers:Ne,apply:Te,applyModifiers:Oe,cleanUpMeasure:Re,destroy:function(e){e&&Le[e.id]&&Le[e.id].masterItemSubscriber&&(Le[e.id].masterItemSubscriber&&Le[e.id].masterItemSubscriber.unsubscribe(),delete Le[e.id])},hasActiveModifiers:Fe,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ne[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ve(e);Ke({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Qe({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:_e};var Le={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Le[r.id]=Le[r.id]||{isFirstTime:!0};var u=Le[r.id].isFirstTime;if(Le[r.id].isFirstTime=!1,n&&"object"===ke(n))return Oe({model:r,properties:n});var c=r?r.layout:void 0,p=o(c,"qSelectionInfo.qInSelections");if(a||p)return Promise.resolve(l);var d=o(c,"qHyperCube.qMeasureInfo"),m=Le[r.id].lastReloadTime;if(Le[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Fe({measures:d,layout:c})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:c,model:r,lastReloadTime:m});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ke({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);je(n);var i=Ze(n);return Ge({model:r}).then((function(t){return Ye({libraryIds:i,model:r}).then((function(i){return f&&function(e){var t=e.properties;He(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===ke(e)&&!e.disabled){if(r++,"object"!==ke(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Be(t)&&D.simplifyExpression(t.qDef.base.qDef)!==D.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Oe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===ke(e.base)}))}(d)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,i=Ze(n);return et({model:r,libraryIds:i}).then((function(){var e=t()(!0,{},n);return He(n).forEach((function(e){return Re(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function Oe(e){var r=e.model,n=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},i):i),je(i);var d=Ze(i);return et({model:r,libraryIds:d,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=He(n)),!r.length)return Promise.resolve();if(!Fe({measures:r,properties:n}))return r.forEach((function(e){return Re(e)})),Promise.resolve();var l=a?void 0:Ze(n);return Ge({model:i,dimensionAndFieldList:s}).then((function(e){return Ye({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){r.forEach((function(r){Ke({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Ce.isValid(r)||Ce.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===ke(e)&&!e.disabled){if(s++,"object"!==ke(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ne[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ne[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),$e(r)):Re(r)}))}))}))}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Je({oldProperties:n,newProperties:i,model:r}):Promise.resolve(!1)}))}))}function Re(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some((function(e){return"object"===ke(e)&&!e.disabled&&!Ne[e.type]}))}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Fe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ke({modifiers:Ve(e),properties:r,layout:n})}))}function Pe(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function _e(e){var t=Pe(e);return!t||Ne[t.type].enableTotalsFunction(e)}function He(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function je(e){He(e).forEach((function(e){return function(e){var r=Pe(e);r&&(void 0!==r.outputExpression&&ze(r)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function $e(e){var t=Ve(e);Array.isArray(t)&&t.forEach((function(t){"object"===ke(t)&&(t.disabled||!Ne[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Be(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,r=e.properties,n=e.layout;return!We(t)&&Ke({modifiers:Ve(t),properties:r,layout:n})}function Ke(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==ke(e)||e.disabled||!Ne[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function Ge(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));n.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return i}))}function Ye(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):O(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Qe(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===ke(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Ze(e){var t=He(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=Ve(t);if(Ke({modifiers:n,properties:e})){var o=We(t);o&&r.push(o),i=i||Qe({modifiers:n,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Le[t.id].masterItemSubscriber=Le[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Le[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}r.d(n,{default:()=>je});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var d=r(8),m=r.n(d);const f=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},b=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},v=function(e){e.forEach((function(e){m().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,r){var n,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(n=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[r][t]=s}var q=r(909),D=r.n(q);function S(e,t){var r=D()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function M(e,t){return D()(!0,{},t,e)}function w(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const k=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},N=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},I=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},L=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},O=function(e){var t,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},R=function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=M(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=M(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},F=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=w(a.max,i.dimensions.length,A),l=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,A),minDimensions:w(o.min,l,0),maxMeasures:s,minMeasures:l}},P=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=D()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=D()(!0,{},r,i)).components&&(i.components=[]),i},H=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},V=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},z=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return E(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,r)}))}},j=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return C(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,r)}))}},$=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&m().isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function B(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){o.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),f({exportFormat:i,qHyperCubeDef:l}),h({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:i,properties:a}),n||v(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,m=e.isHCModifierSupported,f=void 0===m||m,h={qChildren:[]},g=_({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=F({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,M=l.defaultDimension,w=void 0===M?L():M,A=l.defaultMeasure,E=void 0===A?T():A;b.qDimensions.length=0,b.qMeasures.length=0,H({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&V({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),O({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),R({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:E}),z({newProperties:g,dataDefinition:a,hypercubePath:u}),j({newProperties:g,dataDefinition:a,hypercubePath:u}),P({exportFormat:t,newHyperCubeDef:b}),N("qMaxStackedCells",y,b),N("qNoOfLeftDims",y,b),I("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),I("qMode",y,b,"S"),I("qReductionMode",y,b,"N"),I("qSortbyYValue",y,b),I("qIndentMode",y,b),I("qShowTotalsAbove",y,b),k(g,t,n),h.qProperty=g;var C=o.getValue(c||{},"support.modifiers");return $({measures:b.qMeasures,modifierTypes:C}),d&&B(h.qProperty,"storedFilters"),"S"===b.qMode&&f&&B(h.qProperty,"dynamicScript"),h}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function K(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function G(e,t){return e.length!==t}const Y={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(K(a,t,n,i),G(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Q={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Z={scatterplot:Q,"sn-scatter-plot":Q,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,r){if(Array.isArray(e[t])){var n=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=Y.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})),t.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}))}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var m=Y.create(Y.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:m,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:m,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(m.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(m)):l.qAttributeExpressions.push(m)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:m().measureBase.getLibraryId(e)}(r,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return m().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=Y.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Z[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},pe=function(e,t){var r,n=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=Y.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},de=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},me=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},fe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ye={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=Y.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return Y.moveByIdFromGroup(a,[],"qAttributeDimensions",u),Y.moveByIdFromGroup(a,[],"qAttributeExpressions",u),Y.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=W.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),m=o.getValue(p,"qHyperCubeDef.qDimensions",[]),f=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=ue(p,d),y=ce({canColorBy:g,autoColor:h,colorMode:f,dimensions:m});return g[f]?me({shouldUpdateColorBy:y,properties:p})&&fe(p):he(p),y&&pe(p,"qHyperCubeDef."),ge(p)&&le(p,"color.persistent",!0),de(m),c}};var be=["bar","marker","line"];const ve=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(r,"unsupportedAutoMinMax")||D()(r.measureAxis,t.measureAxis):B(r,"supportedAutoMinMax")||D()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),be.includes(n)&&t[i].type[n]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&D()(s,r.properties.measureAxes[t[0].axis])):D()(s,r.properties.measureAxes[0])}},qe=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},De={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ye.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return ve({initialProperties:r,properties:p}),xe({exportFormat:t,initialProperties:r,properties:p,measureType:a}),qe(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Se(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Me(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Se(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}function we(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}var Ae="qHyperCubeDef.qMeasures",Ee="conditionalColoring",Ce="measures",ke="qDef.conditionalColoring";const Ne={quarantine:function(e){Me({properties:e,arrayPath:Ae,quarantineName:Ee,arrayName:Ce,itemPath:ke})},unquarantine:function(e){we({properties:e,arrayPath:Ae,itemPath:ke,arrayName:Ce,quarantineName:Ee})}};var Ie="qHyperCubeDef.qMeasures",Le="measures",Te="qHyperCubeDef.qDimensions",Oe="dimensions",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Fe="alternativeMeasures",Pe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",He="qCalcCondition",Ve="conditionalShowHide";const ze={quarantine:function(e){Me({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),Me({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},unquarantine:function(e){we({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),we({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},quarantineAlternative:function(e){Me({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),Me({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})},unquarantineAlternative:function(e){we({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),we({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})}},je={hypercube:W,colorChart:ye,axisChart:De,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Me,unquarantineArrayProp:we,conditionalColoring:Ne,conditionalShow:ze}})(),n.default})()),k.exports),I=E(N);function L({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=I.hypercube.importProperties({exportFormat:r,initialProperties:n,dataDefinition:e,defaultPropertyValues:t}),o=i.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},o.qDef.qNumFormat)}))),o.qHyperCubeDef.qSuppressZero=!1,i}function T({propertyTree:e,viewDataMode:t}){return I.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var O=e=>{const t=A(e);return{properties:w,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>L({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:T}};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}var H=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],V=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var z=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function j(e){var t=e.theme,r=e.translator,n=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,P(new Set([n].concat(P(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(P(o.map((function(e){return z(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],P(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?V:H}(i).map((function(e){return z(e)}))))}function $(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(n,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return j({theme:t,translator:r,defaultValue:a(),flags:o})}}}var B,W,U=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],K=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function G(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=function(){return t.getStyle(n,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,r=e.defaultValue,n=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?n.push.apply(n,P(new Set([r].concat(P(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(P(n.map((function(e){return K(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],P(U.map((function(e){return K(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}function Y(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:$({theme:t,translator:r,id:n,path:i,flags:e.flags}),fontSize:G({theme:t,translator:r,id:n,path:i})}}function X(e){var t=e.theme,r=e.translator,n=e.config,i=void 0===n?{}:n,o=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,i=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach((function(e){for(var n=e.split("."),i=u,a=0;a<n.length;a++){var l=n[a];a===n.length-1?i[l]=Y({theme:t,translator:r,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var c=function(e){for(var t=e.split("."),r=u,n=0;n<t.length;n++){var i=t[n];if(void 0===r[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[i]}return r};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var J,Q=function(){if(W)return B;W=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return B=function e(){var t,r,n,l,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=s(p,r),p!==(l=s(t,r))&&(f&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(p,{name:r,newValue:e(f,c,l)})):void 0!==l&&a(p,{name:r,newValue:l}));return p},B}();function Z(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ee(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function te(){}(J=Q)&&J.__esModule&&Object.prototype.hasOwnProperty.call(J,"default")&&J.default;var re=1/.7,ne="\\s*([+-]?\\d+)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,se=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),le=new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`),ue=new RegExp(`^rgba\\(${ne},${ne},${ne},${ie}\\)$`),ce=new RegExp(`^rgba\\(${oe},${oe},${oe},${ie}\\)$`),pe=new RegExp(`^hsl\\(${ie},${oe},${oe}\\)$`),de=new RegExp(`^hsla\\(${ie},${oe},${oe},${ie}\\)$`),me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fe(){return this.rgb().formatHex()}function he(){return this.rgb().formatRgb()}function ge(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ae.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ye(t):3===r?new qe(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?be(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?be(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=se.exec(e))?new qe(t[1],t[2],t[3],1):(t=le.exec(e))?new qe(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ue.exec(e))?be(t[1],t[2],t[3],t[4]):(t=ce.exec(e))?be(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pe.exec(e))?Ee(t[1],t[2]/100,t[3]/100,1):(t=de.exec(e))?Ee(t[1],t[2]/100,t[3]/100,t[4]):me.hasOwnProperty(e)?ye(me[e]):"transparent"===e?new qe(NaN,NaN,NaN,0):null}function ye(e){return new qe(e>>16&255,e>>8&255,255&e,1)}function be(e,t,r,n){return n<=0&&(e=t=r=NaN),new qe(e,t,r,n)}function ve(e){return e instanceof te||(e=ge(e)),e?new qe((e=e.rgb()).r,e.g,e.b,e.opacity):new qe}function xe(e,t,r,n){return 1===arguments.length?ve(e):new qe(e,t,r,null==n?1:n)}function qe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function De(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}`}function Se(){const e=Me(this.opacity);return`${1===e?"rgb(":"rgba("}${we(this.r)}, ${we(this.g)}, ${we(this.b)}${1===e?")":`, ${e})`}`}function Me(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function we(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ae(e){return((e=we(e))<16?"0":"")+e.toString(16)}function Ee(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,n)}function Ce(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof te||(e=ge(e)),!e)return new ke;if(e instanceof ke)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ke(a,s,l,e.opacity)}function ke(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ne(e){return(e=(e||0)%360)<0?e+360:e}function Ie(e){return Math.max(0,Math.min(1,e||0))}function Le(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Z(te,ge,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fe,formatHex:fe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ce(this).formatHsl()},formatRgb:he,toString:he}),Z(qe,xe,ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(we(this.r),we(this.g),we(this.b),Me(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:De,formatHex:De,formatHex8:function(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}${Ae(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Se,toString:Se})),Z(ke,(function(e,t,r,n){return 1===arguments.length?Ce(e):new ke(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ke(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qe(Le(e>=240?e-240:e+120,i,n),Le(e,i,n),Le(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ke(Ne(this.h),Ie(this.s),Ie(this.l),Me(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=Me(this.opacity);return`${1===e?"hsl(":"hsla("}${Ne(this.h)}, ${100*Ie(this.s)}%, ${100*Ie(this.l)}%${1===e?")":`, ${e})`}`}}));const Te=Math.PI/180,Oe=180/Math.PI,Re=4/29,Fe=6/29,Pe=3*Fe*Fe;function _e(e){if(e instanceof He)return new He(e.l,e.a,e.b,e.opacity);if(e instanceof Be)return We(e);e instanceof qe||(e=ve(e));var t,r,n=$e(e.r),i=$e(e.g),o=$e(e.b),a=Ve((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Ve((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Ve((.0139322*n+.0971045*i+.7141733*o)/.82521)),new He(116*a-16,500*(t-a),200*(a-r),e.opacity)}function He(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ve(e){return e>.008856451679035631?Math.pow(e,1/3):e/Pe+Re}function ze(e){return e>Fe?e*e*e:Pe*(e-Re)}function je(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $e(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Be(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function We(e){if(isNaN(e.h))return new He(e.l,0,0,e.opacity);var t=e.h*Te;return new He(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Z(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new He(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new He(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,r=isNaN(this.b)?e:e-this.b/200;return new qe(je(3.1338561*(t=.96422*ze(t))-1.6168667*(e=1*ze(e))-.4906146*(r=.82521*ze(r))),je(-.9787684*t+1.9161415*e+.033454*r),je(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Z(Be,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Be)return new Be(e.h,e.c,e.l,e.opacity);if(e instanceof He||(e=_e(e)),0===e.a&&0===e.b)return new Be(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Oe;return new Be(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Be(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new Be(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Be(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return We(this).rgb()}}));var Ue=e=>()=>e;function Ke(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ue(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?Ke:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):Ue(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=xe(e)).r,(t=xe(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ke(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var Ge="center",Ye="bottom";function Xe(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}[{key:"NoDataExist",alignment:Ge,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Ge,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Ge,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Ge},{key:"DataRangeIncludingZero",alignment:Ye},{key:"LimitedData",alignment:Ye},{key:"NegativeOrZeroValues",alignment:Ye}].reduce((function(e,t){return e[t.key]=t,e}),{});var Je,Qe=["__proto__","constructor"];function Ze(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!Qe.some((function(e){return n.includes(e)}))){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function et(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function tt(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=nt)):void 0===t&&(t=rt);for(var r,n,i,o,a,s=new at(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new at(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(ot)}function rt(e){return e.children}function nt(e){return Array.isArray(e)?e[1]:null}function it(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function ot(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function at(e){this.data=e,this.depth=this.height=0,this.parent=null}at.prototype=tt.prototype={constructor:at,count:function(){return this.eachAfter(et)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return tt(this).eachBefore(it)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},Je=function(e){
7
+ import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as f,useState as m,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";var D={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","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_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_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_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",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.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function S(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var M={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=`${t.height}px`,r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${t.height}px`,r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${t.width}px`,r.height=`${t.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),a="center"===n?t:`* ${t}`,s="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const w={version:"1.0.2",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function A(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C,k={exports:{}};var N=(C||(C=1,self,k.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(m&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(m,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(m&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(m,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function v(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=b(c(n[0],i),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),f=m(0),h=m(1),g=b(p,f),y=b(d,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function q(e){var t=e.properties,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const D={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=v({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var p=m(0),d=m(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===q({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach(function(r){void 0===e[r]&&(e[r]=t[r])})},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=q({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=r.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(n=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r}),t}};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}var w=t().bind(null,!0),A={},E=Array.isArray;function C(e){return null!=e&&!Array.isArray(e)&&"object"===M(e)}function k(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach(function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=k(e[r||t])?o:e[t],e=e[r||t]}}),e}function O(e,t){var r=!0;if(C(e)&&C(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(n){O(e[n],t[n])||(r=!1)}),r);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!O(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?w({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);O(o,a)||N(t,i)||(k(a)?n.push({op:"add",path:s,value:o}):C(o)&&C(a)?n=n.concat(A.generate(a,o,s)):E(o)&&E(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&k(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(O(t,i))return n;if(!k(t[0])&&k(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(A.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){k(t[i])&&!N(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})}),n},A.apply=function(e,t){t.forEach(function(t){var r,n,i=I(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(C(a)&&C(t.value))r=a,Object.keys(r).forEach(function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!N(r,e)&&delete r[e]}),w(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=I(e,t.from);E(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])})},A.clone=function(e){return w({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):w(e,t)};const T=A,L=function(e,r,n){if(!e)return Promise.resolve();var i=T.generate(r,n);return t()(!0,r,n),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var R="accumulation";function F(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===R)return r[n]}function P(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===R)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const H={translationKey:"properties.modifier.accumulation",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getNumStepComp(r,l),d=D.getAboveComp(r,l,c,p),f=D.getRangeComp("RangeSum",d);if(D.needDimension({modifier:r,properties:n,layout:i})){var m=D.getDimComp(u,1),h=D.getDimComp(u,0),g=D.getAggrComp(f,m,h);f=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,_)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(P(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(P(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=F(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=F(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(R))return!1;var o=F(t,e);return o&&!o.disabled}};return r}};var V="movingAverage";function j(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function z(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=D.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=D.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=D.getNumStepComp(n,u),m=D.getAboveComp(n,u,d,f);if(n.nullSuppression)t=D.getRangeComp("RangeAvg",m);else{var h=D.getRangeComp("RangeSum",m),g=function(e,t){var r=D.getRowNoComp(e,t);if(!D.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(D.needDimension({modifier:n,properties:i,layout:a})){var b=D.getDimComp(c,1),v=D.getDimComp(c,0),x=D.getAggrComp(y,b,v);y=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(z(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=j(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=j(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(z(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=j(t,e);return o&&!o.disabled}};return r}};var U="timeSeriesDecomposition";function W(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===U)return r[n]}function K(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===U)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const Y={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?D.generateTSDExpression(r,t,n):t},extractInputExpression:D.extractInputExpression,initModifier:function(e,t){D.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=D.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=W(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var r=W(t,e);return r&&!r.fullRange}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=W(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(D.needDimension({modifier:r,properties:n,layout:i})){var f=D.getDimComp(u,1),m=D.getDimComp(u,0),h=D.getAggrComp(d,f,m);d=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(D.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(D.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),p=ue(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=D.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,r.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var pe="qDef.base",de="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,de)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:de},getLibraryIdRef:function(e){return o(e,he)?he:me},getLibraryId:function(e){return o(e,he)||o(e,me)},getLabelRef:function(e){return o(e,pe)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,pe)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",be="qDef.base.qDef",ve="qLibraryId",xe="qDef.base.qLibraryId",qe="qDef.qLabel",De="qDef.qLabelExpression",Se="qDef.base.qLabel",Me="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(r(e,be,o(e,ye)),r(e,xe,o(e,ve)),r(e,Se,o(e,qe)),r(e,Me,o(e,De)))},restoreBase:function(e){Ee.isValid(e)&&(r(e,ye,o(e,be)),r(e,ve,o(e,xe)),r(e,qe,o(e,Se)),r(e,De,o(e,Me)),o(e,we)&&o(e,Ae)&&r(e,we,o(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=o(e,be),r=o(e,xe);return void 0!==t||void 0!==r}};const Ce=Ee;function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}var Ne={accumulation:H,movingAverage:B,difference:ee,normalization:ce,timeSeriesDecomposition:Y};const Ie={modifiers:Ne,apply:Te,applyModifiers:Le,cleanUpMeasure:Re,destroy:function(e){e&&Oe[e.id]&&Oe[e.id].masterItemSubscriber&&(Oe[e.id].masterItemSubscriber&&Oe[e.id].masterItemSubscriber.unsubscribe(),delete Oe[e.id])},hasActiveModifiers:Fe,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ne[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some(function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=Ve(e);Ke({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Ze({modifiers:t,properties:r,layout:n}))}),i&&!o},ifEnableTotalsFunction:_e};var Oe={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Oe[r.id]=Oe[r.id]||{isFirstTime:!0};var u=Oe[r.id].isFirstTime;if(Oe[r.id].isFirstTime=!1,n&&"object"===ke(n))return Le({model:r,properties:n});var c=r?r.layout:void 0,p=o(c,"qSelectionInfo.qInSelections");if(a||p)return Promise.resolve(l);var d=o(c,"qHyperCube.qMeasureInfo"),f=Oe[r.id].lastReloadTime;if(Oe[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Fe({measures:d,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return We({measure:e,properties:r,layout:n})})}({measures:t,layout:r})}({measures:d,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some(function(e){return function(e){var t=e.measure,r=e.layout;return Ke({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})}))}({measures:d,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then(function(e){var n=t()(!0,{},e);ze(n);var i=Qe(n);return Ge({model:r}).then(function(t){return Ye({libraryIds:i,model:r}).then(function(i){return m&&function(e){var t=e.properties;He(t).forEach(function(e){return function(e){var t=e.measure;if(We({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach(function(e){if("object"===ke(e)&&!e.disabled){if(r++,"object"!==ke(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Be(t)&&D.simplifyExpression(t.qDef.base.qDef)!==D.simplifyExpression(n)&&(t.qDef.base.qDef=n)}})}}({measure:e,properties:t})})}({properties:n}),Le({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===ke(e.base)})}(d)?r.getEffectiveProperties().then(function(e){return function(e){var r=e.model,n=e.properties,i=Qe(n);return et({model:r,libraryIds:i}).then(function(){var e=t()(!0,{},n);return He(n).forEach(function(e){return Re(e)}),Je({oldProperties:e,newProperties:n,model:r})})}({model:r,properties:e})}):Promise.resolve(l)}function Le(e){var r=e.model,n=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},i):i),ze(i);var d=Qe(i);return et({model:r,libraryIds:d,masterItem:u}).then(function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=He(n)),!r.length)return Promise.resolve();if(!Fe({measures:r,properties:n}))return r.forEach(function(e){return Re(e)}),Promise.resolve();var l=a?void 0:Qe(n);return Ge({model:i,dimensionAndFieldList:s}).then(function(e){return Ye({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){r.forEach(function(r){Ke({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Ce.isValid(r)||Ce.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach(function(e){if("object"===ke(e)&&!e.disabled){if(s++,"object"!==ke(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ne[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ne[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}})}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),$e(r)):Re(r)})})})}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:p}).then(function(){return l?Je({oldProperties:n,newProperties:i,model:r}):Promise.resolve(!1)})})}function Re(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some(function(e){return"object"===ke(e)&&!e.disabled&&!Ne[e.type]})}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Fe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ke({modifiers:Ve(e),properties:r,layout:n})})}function Pe(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function _e(e){var t=Pe(e);return!t||Ne[t.type].enableTotalsFunction(e)}function He(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function je(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function ze(e){He(e).forEach(function(e){return function(e){var r=Pe(e);r&&(void 0!==r.outputExpression&&je(r)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)})}function $e(e){var t=Ve(e);Array.isArray(t)&&t.forEach(function(t){"object"===ke(t)&&(t.disabled||!Ne[t.type]&&je(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function Ue(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function We(e){var t=e.measure,r=e.properties,n=e.layout;return!Ue(t)&&Ke({modifiers:Ve(t),properties:r,layout:n})}function Ke(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==ke(e)||e.disabled||!Ne[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),i[e.type])})}function Ge(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});n.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return n.push(a),Promise.all(n).then(function(){return i})}function Ye(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=r.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=r.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):L(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===ke(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})})}function Qe(e){var t=He(e),r=[],n=[],i=!1;return t.forEach(function(t){var n=Ve(t);if(Ke({modifiers:n,properties:e})){var o=Ue(t);o&&r.push(o),i=i||Ze({modifiers:n,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&n.push(t)}),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Oe[t.id].masterItemSubscriber=Oe[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach(function(r){t[r]=o(e,r)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then(function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach(function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach(function(e){n[e].listener.dispose()}),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Oe[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}r.d(n,{default:()=>ze});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var d=r(8),f=r.n(d);const m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach(function(e){t.properties[e]=r[e]})},b=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])}),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},v=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,r){var n,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(n=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[r][t]=s}var q=r(909),D=r.n(q);function S(e,t){var r=D()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function M(e,t){return D()(!0,{},t,e)}function w(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const k=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},N=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},I=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},O=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},L=function(e){var t,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},R=function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=M(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=M(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},F=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=w(a.max,i.dimensions.length,A),l=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,A),minDimensions:w(o.min,l,0),maxMeasures:s,minMeasures:l}},P=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=D()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=D()(!0,{},r,i)).components&&(i.components=[]),i},H=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},V=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},j=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return E(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),n.dimensions.added(e,r)})}},z=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return C(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),n.measures.added(e,r)})}},$=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f().isSupportedModifiers(r)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function B(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach(function(t){o.setValue(e,t,r[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const U={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m({exportFormat:i,qHyperCubeDef:l}),h({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:i,properties:a}),n||v(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=_({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=F({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,M=l.defaultDimension,w=void 0===M?O():M,A=l.defaultMeasure,E=void 0===A?T():A;b.qDimensions.length=0,b.qMeasures.length=0,H({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&V({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),L({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),R({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:E}),j({newProperties:g,dataDefinition:a,hypercubePath:u}),z({newProperties:g,dataDefinition:a,hypercubePath:u}),P({exportFormat:t,newHyperCubeDef:b}),N("qMaxStackedCells",y,b),N("qNoOfLeftDims",y,b),I("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),I("qMode",y,b,"S"),I("qReductionMode",y,b,"N"),I("qSortbyYValue",y,b),I("qIndentMode",y,b),I("qShowTotalsAbove",y,b),k(g,t,n),h.qProperty=g;var C=o.getValue(c||{},"support.modifiers");return $({measures:b.qMeasures,modifierTypes:C}),d&&B(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&B(h.qProperty,"dynamicScript"),h}};var W={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function K(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function G(e,t){return e.length!==t}const Y={create:function(e,t){if(!e||!W[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(K(a,t,n,i),G(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,r){if(Array.isArray(e[t])){var n=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=Y.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}),t.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=Y.create(Y.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(r,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=Y.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Q[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},pe=function(e,t){var r,n=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=Y.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},de=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},me=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ye={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=U.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=Y.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return Y.moveByIdFromGroup(a,[],"qAttributeDimensions",u),Y.moveByIdFromGroup(a,[],"qAttributeExpressions",u),Y.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=U.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),f=o.getValue(p,"qHyperCubeDef.qDimensions",[]),m=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=ue(p,d),y=ce({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?fe({shouldUpdateColorBy:y,properties:p})&&me(p):he(p),y&&pe(p,"qHyperCubeDef."),ge(p)&&le(p,"color.persistent",!0),de(f),c}};var be=["bar","marker","line"];const ve=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(r,"unsupportedAutoMinMax")||D()(r.measureAxis,t.measureAxis):B(r,"supportedAutoMinMax")||D()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),be.includes(n)&&t[i].type[n]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&D()(s,r.properties.measureAxes[t[0].axis])):D()(s,r.properties.measureAxes[0])}},qe=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},De={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ye.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return ve({initialProperties:r,properties:p}),xe({exportFormat:t,initialProperties:r,properties:p,measureType:a}),qe(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Se(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Me(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Se(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}function we(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}var Ae="qHyperCubeDef.qMeasures",Ee="conditionalColoring",Ce="measures",ke="qDef.conditionalColoring";const Ne={quarantine:function(e){Me({properties:e,arrayPath:Ae,quarantineName:Ee,arrayName:Ce,itemPath:ke})},unquarantine:function(e){we({properties:e,arrayPath:Ae,itemPath:ke,arrayName:Ce,quarantineName:Ee})}};var Ie="qHyperCubeDef.qMeasures",Oe="measures",Te="qHyperCubeDef.qDimensions",Le="dimensions",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Fe="alternativeMeasures",Pe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",He="qCalcCondition",Ve="conditionalShowHide";const je={quarantine:function(e){Me({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Oe,itemPath:He}),Me({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Le,itemPath:He})},unquarantine:function(e){we({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Oe,itemPath:He}),we({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Le,itemPath:He})},quarantineAlternative:function(e){Me({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),Me({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})},unquarantineAlternative:function(e){we({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),we({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})}},ze={hypercube:U,colorChart:ye,axisChart:De,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Me,unquarantineArrayProp:we,conditionalColoring:Ne,conditionalShow:je}})(),n.default})()),k.exports),I=E(N);function O({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=I.hypercube.importProperties({exportFormat:r,initialProperties:n,dataDefinition:e,defaultPropertyValues:t}),o=i.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},o.qDef.qNumFormat)})),o.qHyperCubeDef.qSuppressZero=!1,i}function T({propertyTree:e,viewDataMode:t}){return I.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var L=e=>{const t=A(e);return{properties:w,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>O({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:T}};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function F(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}var V,j="top",z="top-right",$="right",B="bottom-right",U="bottom",W="bottom-left",K="left",G="top-left";F(F(F(F(F(F(F(F(F(F(V={},"equal-equal",[j,U]),"equal-higher",[U,B]),"equal-lower",[j,z]),"equal-void",[j,U]),"higher-equal",[K,W,j,z]),"higher-higher-acute",[U,W,K,z]),"higher-higher-obtuse",[U,j]),"higher-lower-negative",[j,z,$]),"higher-lower-positive",[U,W,K]),"higher-void",[j]),F(F(F(F(F(F(F(F(F(F(V,"lower-equal",[j]),"lower-higher-negative",[j,G]),"lower-higher-positive",[B]),"lower-lower-acute",[j,G,K,z,$]),"lower-lower-obtuse",[j,U]),"lower-void",[j]),"void-equal",[j]),"void-higher",[j,U]),"void-lower",[j,U,K]),"void-void",[j]),F(V,"unclassified",[j,U,$,K,z,B,W,G]);var Y=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],X=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var J=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function Z(e){var t=e.theme,r=e.translator,n=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,_(new Set([n].concat(_(a.map(function(e){return e.split(",").map(function(e){return e.trim()}).map(function(e){return e.replace(/\s+/g," ").trim()}).filter(Boolean).join(", ")})))))):o.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(_(o.map(function(e){return J(e)})),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],_(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?X:Y}(i).map(function(e){return J(e)})))}function Q(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(n,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return Z({theme:t,translator:r,defaultValue:a(),flags:o})}}}var ee,te,re=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],ne=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function ie(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=function(){return t.getStyle(n,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,r=e.defaultValue,n=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?n.push.apply(n,_(new Set([r].concat(_(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(_(n.map(function(e){return ne(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],_(re.map(function(e){return ne(e)})))}({theme:t,translator:r,defaultValue:o()})}}}function oe(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:Q({theme:t,translator:r,id:n,path:i,flags:e.flags}),fontSize:ie({theme:t,translator:r,id:n,path:i})}}function ae(e){var t=e.theme,r=e.translator,n=e.config,i=void 0===n?{}:n,o=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,i=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach(function(e){for(var n=e.split("."),i=u,a=0;a<n.length;a++){var l=n[a];a===n.length-1?i[l]=oe({theme:t,translator:r,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}});var c=function(e){for(var t=e.split("."),r=u,n=0;n<t.length;n++){var i=t[n];if(void 0===r[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[i]}return r};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var se,le=function(){if(te)return ee;te=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return ee=function e(){var t,r,n,l,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=s(p,r),p!==(l=s(t,r))&&(m&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(p,{name:r,newValue:e(m,c,l)})):void 0!==l&&a(p,{name:r,newValue:l}));return p},ee}();function ue(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ce(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function pe(){}(se=le)&&se.__esModule&&Object.prototype.hasOwnProperty.call(se,"default")&&se.default;var de=1/.7,fe="\\s*([+-]?\\d+)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",he="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ge=/^#([0-9a-f]{3,8})$/,ye=new RegExp(`^rgb\\(${fe},${fe},${fe}\\)$`),be=new RegExp(`^rgb\\(${he},${he},${he}\\)$`),ve=new RegExp(`^rgba\\(${fe},${fe},${fe},${me}\\)$`),xe=new RegExp(`^rgba\\(${he},${he},${he},${me}\\)$`),qe=new RegExp(`^hsl\\(${me},${he},${he}\\)$`),De=new RegExp(`^hsla\\(${me},${he},${he},${me}\\)$`),Se={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 Me(){return this.rgb().formatHex()}function we(){return this.rgb().formatRgb()}function Ae(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ge.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ee(t):3===r?new Ie(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ce(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ce(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=ye.exec(e))?new Ie(t[1],t[2],t[3],1):(t=be.exec(e))?new Ie(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ve.exec(e))?Ce(t[1],t[2],t[3],t[4]):(t=xe.exec(e))?Ce(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qe.exec(e))?Pe(t[1],t[2]/100,t[3]/100,1):(t=De.exec(e))?Pe(t[1],t[2]/100,t[3]/100,t[4]):Se.hasOwnProperty(e)?Ee(Se[e]):"transparent"===e?new Ie(NaN,NaN,NaN,0):null}function Ee(e){return new Ie(e>>16&255,e>>8&255,255&e,1)}function Ce(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ie(e,t,r,n)}function ke(e){return e instanceof pe||(e=Ae(e)),e?new Ie((e=e.rgb()).r,e.g,e.b,e.opacity):new Ie}function Ne(e,t,r,n){return 1===arguments.length?ke(e):new Ie(e,t,r,null==n?1:n)}function Ie(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Oe(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}`}function Te(){const e=Le(this.opacity);return`${1===e?"rgb(":"rgba("}${Re(this.r)}, ${Re(this.g)}, ${Re(this.b)}${1===e?")":`, ${e})`}`}function Le(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Re(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fe(e){return((e=Re(e))<16?"0":"")+e.toString(16)}function Pe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,r,n)}function _e(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof pe||(e=Ae(e)),!e)return new He;if(e instanceof He)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new He(a,s,l,e.opacity)}function He(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ve(e){return(e=(e||0)%360)<0?e+360:e}function je(e){return Math.max(0,Math.min(1,e||0))}function ze(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ue(pe,Ae,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Me,formatHex:Me,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return _e(this).formatHsl()},formatRgb:we,toString:we}),ue(Ie,Ne,ce(pe,{brighter(e){return e=null==e?de:Math.pow(de,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ie(Re(this.r),Re(this.g),Re(this.b),Le(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:Oe,formatHex:Oe,formatHex8:function(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}${Fe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Te,toString:Te})),ue(He,function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)},ce(pe,{brighter(e){return e=null==e?de:Math.pow(de,e),new He(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new He(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ie(ze(e>=240?e-240:e+120,i,n),ze(e,i,n),ze(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new He(Ve(this.h),je(this.s),je(this.l),Le(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=Le(this.opacity);return`${1===e?"hsl(":"hsla("}${Ve(this.h)}, ${100*je(this.s)}%, ${100*je(this.l)}%${1===e?")":`, ${e})`}`}}));const $e=Math.PI/180,Be=180/Math.PI,Ue=4/29,We=6/29,Ke=3*We*We;function Ge(e){if(e instanceof Ye)return new Ye(e.l,e.a,e.b,e.opacity);if(e instanceof et)return tt(e);e instanceof Ie||(e=ke(e));var t,r,n=Qe(e.r),i=Qe(e.g),o=Qe(e.b),a=Xe((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Xe((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Xe((.0139322*n+.0971045*i+.7141733*o)/.82521)),new Ye(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Ye(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Xe(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ke+Ue}function Je(e){return e>We?e*e*e:Ke*(e-Ue)}function Ze(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Qe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function et(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function tt(e){if(isNaN(e.h))return new Ye(e.l,0,0,e.opacity);var t=e.h*$e;return new Ye(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ue(Ye,function(e,t,r,n){return 1===arguments.length?Ge(e):new Ye(e,t,r,null==n?1:n)},ce(pe,{brighter(e){return new Ye(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ye(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,r=isNaN(this.b)?e:e-this.b/200;return new Ie(Ze(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(r=.82521*Je(r))),Ze(-.9787684*t+1.9161415*e+.033454*r),Ze(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ue(et,function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof et)return new et(e.h,e.c,e.l,e.opacity);if(e instanceof Ye||(e=Ge(e)),0===e.a&&0===e.b)return new et(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Be;return new et(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new et(e,t,r,null==n?1:n)},ce(pe,{brighter(e){return new et(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new et(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return tt(this).rgb()}}));var rt=e=>()=>e;function nt(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):rt(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?nt:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):rt(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Ne(e)).r,(t=Ne(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=nt(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var it="center",ot="bottom";[{key:"NoDataExist",alignment:it,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:it,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:it,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:it},{key:"DataRangeIncludingZero",alignment:ot},{key:"LimitedData",alignment:ot},{key:"NegativeOrZeroValues",alignment:ot}].reduce(function(e,t){return e[t.key]=t,e},{});var at,st=["__proto__","constructor"];function lt(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!st.some(function(e){return n.includes(e)})){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function ut(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function ct(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dt)):void 0===t&&(t=pt);for(var r,n,i,o,a,s=new ht(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new ht(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(mt)}function pt(e){return e.children}function dt(e){return Array.isArray(e)?e[1]:null}function ft(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function mt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function ht(e){this.data=e,this.depth=this.height=0,this.parent=null}ht.prototype=ct.prototype={constructor:ht,count:function(){return this.eachAfter(ut)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return ct(this).eachBefore(ft)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},at=function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,m=e.search(/[0-9\-\+#]/),f=m>0?e.substring(0,m):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(m,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),f+(r?"-":"")+n+x}},Je({exports:{}});var st="'Source Sans Pro', 'Arial', 'sans-serif'",lt="#333333",ut="#595959",ct="#737373",pt="#cccccc",dt="#e6e6e6";function mt(e){var t={};return[].concat(P(e),P([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",ut],["object","axis.label.name","fontFamily",st],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",pt],["object","axis.line.minor","color",dt],["object","axis.title","color"],["object","axis.title","fontFamily",st],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",dt],["object","grid.line.major","color",pt],["object","grid.line.minor","color",dt],["object","label.value","color",ut],["object","label.value","fontFamily",st],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",ut],[!1,"label.value","lightColor",dt],["object","outOfRange","color","#999"],["object","legend.title","color",lt],["object","legend.title","fontFamily",st],["object","legend.title","fontSize","15px"],["object","legend.label","color",ut],["object","legend.label","fontFamily",st],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",lt],["object","referenceLine.label.name","fontFamily",st],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",dt],["object","referenceLine.outOfBounds","fontFamily",st],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",ct,function(e){return"transparent"===e?ct:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var ft=function(e){return e};function ht(e){var t=e.theme,r=e.id,n=e.transform,i=e.extend,o=e.matrix,a={},s=n.reduce((function(e,t){var r=F(t,2),n=r[0],i=r[1];return e[n]=i,e}),{});return o.forEach((function(e){var n=F(e,5),i=n[0],o=n[1],l=n[2],u=n[3],c=n[4],p=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,r=e.base,n=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===r)return a;var s=t.getStyle(r,n,i);return void 0===s?a:s}({theme:t,base:"object"===i&&r?"".concat("object",".").concat(r):i,path:o,attribute:l,defaultValue:u}),m=(s["".concat(o,".").concat(l)]||ft)(p(d));Ze(a,[o,l].filter(Boolean).join("."),m)})),i.forEach((function(e){var t=F(e,2),r=t[0],n=t[1];Ze(a,r,n)})),a}const gt=(e,t)=>(t.components||[]).find((t=>t.key===e)),yt=(e,t,r)=>{var n,i,o,a;const s=null===(n=gt("axis",r))||void 0===n?void 0:n.axis;return{labels:{fontFamily:(null==s||null===(i=s.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==s||null===(o=s.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==s||null===(a=s.label)||void 0===a||null===(a=a.name)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color)||t.getStyle(e,"axis.label.name","color")}}},bt="object.waterfallChart";function vt(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(bt,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const xt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:bt,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(vt(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(vt(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(vt(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(xt.valueTypes),Object.freeze(xt);const qt=(e,t)=>{const r={axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}};return null!=e&&e.isEnabled("CLIENT_IM_3051")&&(r.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:t.getOptions("legend","legend.label")}),Object.keys(r).length>0?r:void 0},Dt=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:qt(r,t)});function St(e){return!e.color.auto}function Mt(e){const{flags:t,translator:r}=e,n=e.flags.isEnabled("SENSECLIENT_IM_2020_STYLINGPANEL_WATERFALLCHART"),i=e.flags.isEnabled("SENSECLIENT_IM_2020_WATERFALLCHART_BG"),o={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:xt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:xt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:xt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:xt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==xt.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>r.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==xt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.theme,s=((e,t,r,n,i)=>n({theme:e,translator:t,flags:i,config:{id:r,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}))(a,r,xt.chartID,X,t),l=((e,t,r)=>{const n={getOptions:(n,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const r=e.getStyle(t,`${i}.color`,"color");return{color:r,index:e.getDataColorPickerPalettes()[0].colors.indexOf(r)}}});return{labelSection:{component:"items",ref:"components",key:n,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,r)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,r)}}}}))(t,r)}}}}};return n})(s,a,xt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:n&&Dt(i,l,t),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},c={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},p={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:St},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:St},m={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:St},f={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...c,label:e=>{var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:p,negativeValueColor:d,subtotalColor:m}}}},h={translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...c,translation:"properties.colors"},positiveValueColor:p,negativeValueColor:d,subtotalColor:m}},simpleColors:f,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>Xe(e,"legend.show",!0)}}}}},g={uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},y={uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}},b={uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:u,colors:h,measureAxis:g,dimensionAxis:y}},v={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach((t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:o,numberFormatting:v,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:b}}}function wt(e){return{definition:Mt(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,r,n){n.mapProperties();const i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return L({dataDefinition:A(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>T({propertyTree:e,viewDataMode:r})}}const At=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,Et=function(){};Et.extend=function e(t,r){const n=this.prototype;"string"!=typeof t&&(r=t,t="Class");const i=Object.create(this.prototype);for(const e in r)i[e]="function"==typeof r[e]&&"function"==typeof n[e]&&At.test(r[e])?function(e,t){return function(){const r=this._super;this._super=n[e];const i=t.apply(this,arguments);return this._super=r,i}}(e,r[e]):r[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const Ct={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function kt(){return Ct.id()}const Nt="scrollbar";function It(e,t,r){return"y"===e?Lt(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function Lt(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var Tt={getAxisDock:It,getOppositeAxisDock:function(e,t,r){return It(e,"far"===t?"near":"far",r)},getYAxisDock:Lt};const Ot=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Rt=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ft=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Pt(e){return Ot.test(e)}function _t(e){return Rt.test(e)||Ft.test(e)}var Ht={lrm:String.fromCharCode(8206),detectTextDirection:function(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],Pt(n))return"ltr";if(_t(n))return"rtl"}return"ltr"}};var Vt={lineSettings:function(e,t){var r;const n={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(r=t.style)||void 0===r?void 0:r.lineType}};return q(!0,n,e||{})},lineLabelSettings:function(e,t){const r=t&&t.chartID;let n=t.theme.getStyle(r,"referenceLine.label.name","color");const i=t.theme.getStyle(r,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(r,"referenceLine.label.name","fontFamily");return t.paletteColor?n=t.theme.getColorPickerColor(t.paletteColor):n||(n="transparent"),q(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:r}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${Ht.lrm}(${r})${Ht.lrm}`:`${Ht.lrm}(${r})${Ht.lrm}`:!1!==e.showLabel?t:""}};const zt={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};zt.DEFAULT_CHART_ORIENTATION=zt.HORIZONTAL;function jt(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||zt.DEFAULT_CHART_ORIENTATION,a=o===zt.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=zt.SHOW_AXIS_LABELS_OPTIONS,c=zt.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),m=r.includeDimensionAxis&&u.includes(i.show),f=r.includeDimensionAxis&&!!r.dimensionTitleText&&c.includes(i.show),h=r.gridlines&&!(!r.gridlines.auto&&0===r.gridlines.spacing),g=r.refLines&&r.refLines.some((e=>e.show)),y=[];if(p&&function(e,t,r,n){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:n&&!n.autoMinMax&&n.showBounds};i=q(i,zt.LAYOUTSETTINGS.measureAxis);const o=Bt(t,r);e.addComponent(`${r}-axis`,i,o)}(e,r,s,n),d&&function(e,t,r){let n={text:t.measureTitleText,style:t.axisTitleStyle||{}};n=q(n,zt.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return Bt(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,s),function(e,t,r,n){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=q(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),m&&function(e,t,r){let n={scale:"dimension",settings:t.axisLabelStyle||{}};n=q(n,zt.LAYOUTSETTINGS.dimensionAxis);const i=Wt(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent(`${r}-axis`,n,i)}(e,r,l),f&&function(e,t,r){let n={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};n=q(n,zt.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return Wt(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){const n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===zt.HORIZONTAL?zt.VERTICAL:zt.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){let n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};n=q(n,zt.LAYOUTSETTINGS.gridLines),n[r]={scale:"measure"},e.addComponent("grid-line",n)}(e,r.gridlines,s),r.hasNavigation&&function(e,t,r,n){const i=e.getSettings();i.scroll={dimension:{viewSize:r.scrollSettings&&r.scrollSettings.viewSize||0,max:r.scrollSettings&&r.scrollSettings.max||0}};const o={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},a=q({},zt.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),$t(t,function(e){function t(t,r){if(!r||!e())return!1;const n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some((e=>e.settings.key===Nt))}const r={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(Nt).emit("tap",e)}}},n={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(Nt).emit("panStart",e)},pan(e){this.chart.component(Nt).emit("panMove",e)},panend(e){this.chart.component(Nt).emit("panEnd",e)},pancancel(e){this.chart.component(Nt).emit("panCancel",e)}}};return[r,n]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=Tt.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,zt.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${kt()}`,require:["renderer","chart"],dock:Tt.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize(){if("x"===r)return 26;const t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const r=!1!==e.label.showValue?`(${n(e.value)})`:"",i=`${e.label.text} ${r}`,o=e.label.text&&r?` ${r}`:r;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=q(a,zt.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((n=>{if(!n.show)return;const s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=Vt.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=Vt.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"x"===r?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[r].push(c)})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,r,s,n),r.enableLasso&&r.selectionsEnabled){!function(e,t){const r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",zt.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{})}if(r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeDim"};o=q(o,zt.LAYOUTSETTINGS.rangeDim);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.dimRange||{},a,Wt(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,zt.LAYOUTSETTINGS.rangeMeasure);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.measureRange||{},a,Bt(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,zt.LAYOUTSETTINGS.rangeMinor);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?r:!r,dock:n,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,r.areaRange||{},a,Wt(r,l).dock,r.isRtl)}r.brushActions&&$t(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function $t(e,t){t.forEach((t=>{e.push(t)}))}function Bt(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Wt(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Ut(e,t){const r=t||{},n=!r.orientation||"horizontal"===r.orientation,i=!!r.isRtl,o={name:r.name||"scale",component:{invert:n&&i,minorTicks:{count:1},range:r.range||void 0,domain:r.domain||void 0,trackBy:r.trackBy||"id"}};return q(!0,{},o,e||{})}function Kt(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Gt(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.line.major","color"),s=t.theme.getStyle(r,"axis.title","fontSize"),l=t.theme.getStyle(r,"axis.title","color"),u=t.theme.getStyle(r,"axis.label.name","color"),c=t.theme.getStyle(r,"axis.label.name","fontSize"),p=t.theme.getStyle(r,"axis.title","fontFamily"),d=t.theme.getStyle(r,"axis.label.name","fontFamily"),m={key:"axis",type:"axis",renderer:Kt(t.flags),dock:Tt.getAxisDock(i,n,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},f=q(!0,{},m,e||{});return f.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),f}function Yt(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.title","fontSize"),s=t.theme.getStyle(r,"axis.title","color"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:Tt.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}Ut.measureScale=function(e,t){let r=(t||{}).source||[];"string"==typeof r&&(r=[r]);const n={name:"measure",component:{expand:.1,data:{fields:r.map((e=>({field:e})))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(n.component.min=i.min),["max","minMax"].includes(i.minMax)&&(n.component.max=i.max));const o=Ut(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},Ut.dimensionScale=function(e,t){const r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return Ut(q(!0,r,e||{}),t)},Gt.xAxis=function(e,t){return Gt(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},Gt.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Tt.getYAxisDock(r,n)};return Gt(q(!0,i,e||{}),t)},Yt.xAxisTitle=function(e,t){return Yt(q(!0,{key:"x-axis-title"},e||{}),t)},Yt.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:Tt.getYAxisDock(r,n)||"left"};return Yt(q(!0,i,e||{}),t)};var Xt={getBublesAlign:function(e,t,r){let n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){const r=[];let n;return e&&r.push(`@${e}`),t&&r.push(`@${t}`),r.length&&(n=r.join(",")),n}};const Jt={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function Qt(){return Jt}function Zt(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Qt.getLayoutModeKeys=function(){const e=[];let t;for(t in Jt)e.push(t);return e};const er={left:"left",right:"right",up:"top",down:"bottom"};function tr(e,t,r){switch(e){case"scale":return Ut(t,r);case"measure-scale":return Ut.measureScale(t,r);case"dimension-scale":return Ut.dimensionScale(t,r);case"axis":return Gt(t,r);case"box-marker":return function(e){return q(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return q(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const r=t&&t.isRtl,n=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":r?"left":"right",settings:{backgroundColor:t.theme.getStyle(n,"","backgroundColor"),invert:r&&i}};return q(!0,{},o,e||{})}(t,r);case"text":return Yt(t,r);case"lasso":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return n.forEach((e=>{o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})})),q(!0,{},o,e||{})}(t,r);case"range":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:Xt.getDock(n,i),settings:{brush:r,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Xt.getBublesAlign(a,s,l)}}};return q(!0,{},u,e||{})}(t,r);case"range-area":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Xt.getDock(n,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Xt.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((e=>{d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})})),q(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");const a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.title","fontFamily"),p=t.theme.getStyle(r,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:Kt(t.flags),dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:n?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${er[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return q(!0,{},d,e)}(t,r);case"sequential-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");const o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(n?"right":"left"),major:{invert:"left"===i||"right"===i||n},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return Gt.xAxis(t,r);case"y-axis":return Gt.yAxis(t,r);case"x-axis-title":return Yt.xAxisTitle(t,r);case"y-axis-title":return Yt.yAxisTitle(t,r);case"grid-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return q(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:n},minorTicks:{stroke:n}},e||{})}(t,r);case"interaction":return function(e,t){const r=t&&t.gestures||[];return q(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return q(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:n},padding:{x:7,y:5}}}},e||{})}(t,r);case"event-area":return function(e){return q(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"label.value","color"),i=t.theme.getStyle(r,"label.value","fontSize"),o=t.theme.getStyle(r,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:Kt(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:n,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:Zt}]}}}]}};return q(!0,{},a,e||{})}(t,r);default:return}}function rr(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Qt()},components:[],scales:{}}}rr.prototype.addComponent=function(e,t,r){const n=tr(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},rr.prototype.addInteraction=function(e,t){const r=tr("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},rr.prototype.addScale=function(e,t,r){const n=tr(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},rr.prototype.getSettings=function(){return this.settings},rr.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},rr.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");jt(t,r)}(e,this,t)},rr.validateComponentKeys=function(e){const t={};return e.map((e=>{const r=e.key;return r?t[r]?`Duplicate key for component ${e.type}`:(t[r]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},rr.create=function(e){return new rr(e)},rr.createComponent=tr;const nr={CENTER:0,BOTTOM:1};var ir={DISCLAIMERS:[{label:"NoDataExist",alignment:nr.CENTER,default:!0},{label:"RequireNumericDimension",alignment:nr.CENTER,default:!1},{label:"OnlyNanData",alignment:nr.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:nr.CENTER,default:!1},{label:"LimitedData",alignment:nr.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:nr.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:nr.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:nr.BOTTOM,default:!1}],ALIGNMENT:nr};const or={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx===0,getLimitedDataAttribute(e,t){let r,n=!1;var i;return e?void 0!==t.explicitLimitedData?n=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?n=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,n=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):n=!0===t.explicitLimitedData,n},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const r=t.length;let n,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=0;n<r;n++)if(a=Math.min(a,t[n].qMin),s=Math.max(s,t[n].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,ir.DISCLAIMERS.forEach((e=>{n[e.label]=!1})),t&&t.qHyperCube?(n.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),n.NoDataExist?n:(n.RequireNumericDimension=r.explicitRequireNumericDimension,n.RequireNumericDimension||(n.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,r),n.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,r),n.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,r)),n)):n}};function ar(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function sr(e,t){return e&&t&&t[e]}function lr(e){this.environment=e,this.clear()}ar.prototype.isValidAndSupported=function(e,t){return sr(e.label,this.dataAttributes)&&(e.default||sr(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},ar.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},ar.prototype.getMessage=function(e,t){let r="";const n=this;return t&&this.disclaimersConfig.forEach((i=>{n.isValidAndSupported(i,e)&&(r+=`${t.get(`Object.Disclaimer.${i.label}`)} `)})),r},lr.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},lr._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},lr.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,r=q(!0,{},this.vizAttributes.supportedDisclaimers),n=new ar(ir.DISCLAIMERS,this.dataAttributes,r);let i,o;if(n.isAnyValidDisclaimer(ir.ALIGNMENT.CENTER))i=n.getMessage(ir.ALIGNMENT.CENTER,t),o="center";else{if(!n.isAnyValidDisclaimer(ir.ALIGNMENT.BOTTOM))return;i=n.getMessage(ir.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:i,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},lr.prototype.set=function(e){if(this.clear(),!e)throw new Error(lr.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=or.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},lr.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const ur=Et.extend({init(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new lr(r),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[rr.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,r)=>function(e,t,r){let n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){const e=r.width||t.qSize.qcx,n=Math.floor(1e4/e);i={qTop:r.top||0,qLeft:r.left||0,qWidth:e,qHeight:r.height?Math.min(r.height,n):n}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};n="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then((e=>{t[n]=e}))}(e,t,r),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),r="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),n=this.createChartSettings(this.layout);r?n.components=[t]:t&&n.components.push(t),rr.validateComponentKeys(n.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:r}=this.environment.options;!r&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=q(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,r){var n,i;const o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Xe(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),cr={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},pr=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,dr=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,mr=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,fr=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,hr=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,gr=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,yr=Math.floor,br=Math.round,vr=Et.extend({init(){let e,t,r,n,i,o,a,s,l,u,c,p,d=0,m=0,f=0,h=1;if(this._invalid=!1,arguments[0]instanceof vr)d=arguments[0]._r,m=arguments[0]._g,f=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))d=parseInt(c[1],10),m=parseInt(c[2],10),f=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),m=parseInt(c[2],10),f=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),m=parseInt(c[2],16),f=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),m=parseInt(c[2]+c[2],16),f=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),h=parseFloat(c[7]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f),h=1}else cr[p.toLowerCase()]?(r=p.toLowerCase(),d=cr[r].r,m=cr[r].g,f=cr[r].b,h="number"==typeof cr[r].a?cr[r].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,m=(65280&arguments[0])>>8,f=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,m=(65280&arguments[0])>>8,f=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],m=arguments[1],f=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+m+f+h)&&(this._invalid=!0),this._r=yr(d),this._g=yr(m),this._b=yr(f),this._a=h,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=vr.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=vr.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=vr.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=vr.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=vr.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=vr.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=vr.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=vr.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),n=parseFloat(r[1]),i=parseFloat(r[3]);let o=parseFloat(r[5]);const a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${n},${i},${o},${a})`},isEqual(e){return e instanceof vr||(e=new vr(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[yr(this._r+(e._r-this._r)*t),yr(this._g+(e._g-this._g)*t),yr(this._b+(e._b-this._b)*t),yr(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),r=this._g<126?1:1+this._g/512,n=this.shiftLuminance(20*(t*r<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new vr(n)}});vr.toRGB=function(e){if(e instanceof vr)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=vr.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},vr.toRGBA=function(e,t){if(e instanceof vr)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=vr.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},vr.toHex=function(e){let t,r,n;return e instanceof vr?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`):("string"==typeof e&&(e=vr.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`)},vr.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new vr(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*r},${100*n})`},vr.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new vr(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)r=0,o=0;else{switch(i=c-p,r=n>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*r},${100*n},${u})`},vr.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new vr(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,n=0;else{switch(r=s-l,t=0===r?0:r/u,s){case i:n=(o-a)/r+(o<a?6:0);break;case o:n=(a-i)/r+2;break;case a:n=(i-o)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*u}},vr.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof vr)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(r=parseInt(e[1],16),n=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(r<<16)+(n<<8)+i},vr.blend=function(e,t,r){const n=(16711680&(e=vr.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=vr.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},vr.getBlend=function(e,t,r){const n=e._r+(t._r-e._r)*r,i=e._g+(t._g-e._g)*r,o=e._b+(t._b-e._b)*r,a=e._a+(t._a-e._a)*r;return new vr(n,i,o,a)},vr.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(pr.test(e)||dr.test(e)||mr.test(e)||fr.test(e)||hr.test(e)||gr.test(e)||cr[e.toLowerCase()])},vr.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},vr.getContrast=function(e,t){if(!e||!t)return;const r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},vr.isDark=function(){const e={getLuminance:vr.prototype.getLuminance,isInvalid:vr.prototype.isInvalid};return vr.prototype.init.apply(e,[].slice.call(arguments)),vr.prototype.isDark.call(e)},vr.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const xr=".scrollHandler";function qr(e,t,r,n,i){if(!e||!t||!r)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=r,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=n,this._legendKey=i}function Dr(){const e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function Sr(e){const t=function(e){let t=0,r=0,n=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),n=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(n=0,r=-1*t),void 0!==e.wheelDeltaY&&(n=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(r=-1*e.wheelDeltaX/60),{delta:t,deltaX:r,deltaY:n,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,r,n){if(n&&r.componentsFromPoint(t).some((e=>e.settings.key===n)))return r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const r=t.delta<0?3:-3;this._scrollApi.move(r)}function Mr(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then((t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((e=>{}))}qr.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},qr.prototype.setDisabled=function(e){this._disabled=e},qr.prototype.getDisabled=function(){return this._disabled},qr.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,Dr.call(this))},qr.prototype.getItemSize=function(){return this._itemSize},qr.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Dr.call(this);return this._scrollViewSizeInItem},qr.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Mr.bind(this)));this._$chartElement.on(`mousewheel${xr} DOMMouseScroll${xr}`,Sr.bind(this)),this._$chartElement.on(`touchstart${xr}`,(e=>{e.preventDefault()})),this._on=!0},qr.prototype.isOn=function(){return this._on},qr.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(xr),this._on=!1},qr.prototype.updateViewState=function(e){Dr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},qr.prototype.onResize=function(){this._sizeChanged=!0,Dr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},qr.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},qr.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},qr.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},qr.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},qr.prototype.getScrollState=function(){return this.getScrollApi().getState().start},qr.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var wr={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,r){return e&&r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Ar={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable(n,i){if(e.lassoing)return t.isSelectionEnabled();const o=wr.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((a=r.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart(n){wr.isOnComponentForLasso(n,r,this)&&(t.switchTo("lasso",this.chart,n),e.lassoing=!0,r.handlers.selectionHandler.pauseEngineCalls(r.keys.lassoBrushKey),n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",n))},lassomove(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var Er={callMeasureRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.measureRangeBrushKey))},measurerangemove(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Cr(e,t){let r;return r="x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,r}var kr={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Cr(n,r.isHorizontal),event:"arearange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.areaBrushKey))},arearangemove(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Nr={callDimensionRangeGesture:function(e,t,r,n){const i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.dimRangeBrushKey))},majorrangemove(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Ir={callDragGesture:function(e,t,r,n,i){let o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"drag",enable(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===r.keys.componentKey))[0],e.dragging)}},requireFailure:n?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let n=-(r.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(n=-n),r.handlers.scrollHandler.getScrollApi().move(n),o={x:t.deltaX,y:t.deltaY}},dragend(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var Lr={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&wr.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)}))}}}}};var Tr={create:function(e,t,r,n,i){const o={};t=t||"vertical";const a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=n.areaBrushKey||null,c=n.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},m={gesture:"",type:""},f="horizontal"===t,h=f?"y-axis":"x-axis",g=f?"x-axis":"y-axis";function y(e,t,r){if(m.gesture===e)return;let n=a;const i=t||m.chart;switch(m.gesture){case"majorrange":b(i,"rangeDim","rangeClear",r),n=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",r),n=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}m.gesture=e;const o="range"===e?"range":"item";m.type&&m.type!==o&&i.brush(n).clear(),m.chart=t,m.type=o}function b(e,t,r,n){if(e){const i=e.component(t);i&&i.emit(r,n)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:n,isHorizontal:f,active:m,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(Lr.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Ar.callLassoGesture(d,x,q)),s?l?(v.push(Nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(kr.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(kr.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(Ir.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function Or(e,t,r,n,i){let o=!1;n=n||"tooltip",r=r||["self"];const a=e.brush(n),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;const r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},s.toggleInterceptor=function(e){if(r.length>1){const t={},r=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Rr={create:(...e)=>Or(...e)},Fr={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};const Pr=e=>({h:t,data:r,style:n})=>{const i=function(e,t){const r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const r=o.data[i[e]].value;if(-2===r.qElemNo||-2===r.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)})).filter((e=>!!e));const l=_r(e,o);l&&a.rows.unshift(l),n.push(a)}}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,r),o={h:t,style:n,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function _r(e,t){var r,n,i;const o=t.data.color,a=null===(r=e.colorService)||void 0===r||null===(n=r.getSettings)||void 0===n?void 0:n.call(r);if(!a||"color"===a.type||!o||!a.fieldType)return;const s=[];e.data.forEach((e=>{const r=t.data[e];r&&s.push(r.value)}));const l=function(e){let t=-1;for(let r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const Hr="dist-flow-tooltip",Vr=`#${Hr}`;function zr(){if(!document.querySelector(Vr)){const e=document.createElement("div");e.id=Hr,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function jr({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){zr()},beforeUpdate(){zr()},destroyed(){!function(){const e=document.querySelector(Vr);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Vr),content:i,filter:n,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:r,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:$r}=Ht;const Br={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Fr.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:r,style:n,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...n.cell,textAlign:s,fontWeight:"bold",direction:$r(e.header)};a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const n={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=r("div",{style:n});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...n.cell,textAlign:s,direction:$r(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:$r(e.value)};a.push(r("tr",null,r("td",{style:l},i),r("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...n.cell,textAlign:s,direction:$r(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function Wr(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");let n={},i=!1;const o={};function a(e){e.listeners.update=function(t,r){e.action.update(t,r,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(n).forEach((e=>{l(n[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(n).forEach((e=>{n[e].action.closeTooltip()}))}function c(){u();for(const e in n)n[e].brush.clear()}return o.setUp=function(t){const o=q(!0,{},Br,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Rr.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);n[o.contexts[0]]=s,i&&a(s);const u=jr({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Pr(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(n).forEach((e=>{a(n[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var Ur={create:(e,t,r)=>Wr(e,t,r)};const Kr=166/26,Gr=12/11;function Yr(e){return(12*Math.min(e,3)+Math.max(e-3,0)*Kr)/11}function Xr(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}}function Jr(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=Xr(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=Xr(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk}));const n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function Qr(e,t,r){return e*(e<=24?t:r)}var Zr={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:Yr,getCharacterRatios:Xr,getTotalCharacterRatios:Jr,getAdjustedMaxGlyphCount:function(e,t,r){const n=Jr(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(Yr(i)+o*Gr)},estimateLatinLabelWidth:Qr,estimateLabelWidth:function(e,t,r,n,i){return e*r+Qr(t,n,i)}};var en={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=xt.getColorForPositiveValue(e,t),a=xt.getColorForNegativeValue(e,t),s=xt.getColorForSubtotal(e,t),l=e=>`${e}`,u=[];let c,p,d=0,m=0,f=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0;for(let e=0;e<i;e++)p=Number.isNaN(+n[0][e].qNum)?0:n[0][e].qNum,r[e].valueType!==xt.valueTypes.SUBTOTAL?(d=m,m+=p*(r[e].valueType===xt.valueTypes.INVERSE?-1:1),c=d<m?o:a,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:c},{qNum:d},{qNum:m},{qNum:m-d,qText:n[0][e].qText}]),r[e].subtotal&&r[e].subtotal.enable&&u.push([{qText:r[e].subtotal.label||"",qElemNumber:b++},{qText:s},{qNum:0},{qNum:m},{qNum:m,qText:l(m)}])):(d=0,m=p,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:s},{qNum:d},{qNum:m},{qNum:m-d,qText:n[0][e].qText}])),f=Math.max(f,d),h=Math.min(h,d),g=Math.max(g,m),y=Math.min(y,m);const v=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,q=e.qDef.isCustomFormatted,D={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:u.length},qMatrix:u}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:f,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q}]}};e.generatedMatrix=u,e.generated=D},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return`qDimensionInfo/${e}`},getGeneratedMeasurePath:function(e){return`qMeasureInfo/${e}`}};function tn(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rn(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nn(e){let t,r,n;function i(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=tn,r=(t,r)=>tn(e(t),r),n=(t,r)=>e(t)-r):(t=e===tn||e===rn?e:on,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){const a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<=0?i=t+1:o=t}while(i<o)}return i}}}function on(){return 0}const an=nn(tn).right;nn((function(e){return null===e?NaN:+e})).center;const sn=Math.sqrt(50),ln=Math.sqrt(10),un=Math.sqrt(2);function cn(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=sn?10:o>=ln?5:o>=un?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?cn(e,t,2*r):[s,l,u]}function pn(e,t,r){return cn(e=+e,t=+t,r=+r)[2]}function dn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function mn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fn(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function hn(){}var gn=.7,yn=1/gn,bn="\\s*([+-]?\\d+)\\s*",vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qn=/^#([0-9a-f]{3,8})$/,Dn=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),Sn=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),Mn=new RegExp(`^rgba\\(${bn},${bn},${bn},${vn}\\)$`),wn=new RegExp(`^rgba\\(${xn},${xn},${xn},${vn}\\)$`),An=new RegExp(`^hsl\\(${vn},${xn},${xn}\\)$`),En=new RegExp(`^hsla\\(${vn},${xn},${xn},${vn}\\)$`),Cn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function kn(){return this.rgb().formatHex()}function Nn(){return this.rgb().formatRgb()}function In(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qn.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ln(t):3===r?new Rn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Tn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Tn(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=Dn.exec(e))?new Rn(t[1],t[2],t[3],1):(t=Sn.exec(e))?new Rn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Mn.exec(e))?Tn(t[1],t[2],t[3],t[4]):(t=wn.exec(e))?Tn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=An.exec(e))?zn(t[1],t[2]/100,t[3]/100,1):(t=En.exec(e))?zn(t[1],t[2]/100,t[3]/100,t[4]):Cn.hasOwnProperty(e)?Ln(Cn[e]):"transparent"===e?new Rn(NaN,NaN,NaN,0):null}function Ln(e){return new Rn(e>>16&255,e>>8&255,255&e,1)}function Tn(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rn(e,t,r,n)}function On(e,t,r,n){return 1===arguments.length?((i=e)instanceof hn||(i=In(i)),i?new Rn((i=i.rgb()).r,i.g,i.b,i.opacity):new Rn):new Rn(e,t,r,null==n?1:n);var i}function Rn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Fn(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}`}function Pn(){const e=_n(this.opacity);return`${1===e?"rgb(":"rgba("}${Hn(this.r)}, ${Hn(this.g)}, ${Hn(this.b)}${1===e?")":`, ${e})`}`}function _n(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vn(e){return((e=Hn(e))<16?"0":"")+e.toString(16)}function zn(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new $n(e,t,r,n)}function jn(e){if(e instanceof $n)return new $n(e.h,e.s,e.l,e.opacity);if(e instanceof hn||(e=In(e)),!e)return new $n;if(e instanceof $n)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new $n(a,s,l,e.opacity)}function $n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Bn(e){return(e=(e||0)%360)<0?e+360:e}function Wn(e){return Math.max(0,Math.min(1,e||0))}function Un(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}mn(hn,In,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kn,formatHex:kn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jn(this).formatHsl()},formatRgb:Nn,toString:Nn}),mn(Rn,On,fn(hn,{brighter(e){return e=null==e?yn:Math.pow(yn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?gn:Math.pow(gn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(Hn(this.r),Hn(this.g),Hn(this.b),_n(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:Fn,formatHex:Fn,formatHex8:function(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}${Vn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pn,toString:Pn})),mn($n,(function(e,t,r,n){return 1===arguments.length?jn(e):new $n(e,t,r,null==n?1:n)}),fn(hn,{brighter(e){return e=null==e?yn:Math.pow(yn,e),new $n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?gn:Math.pow(gn,e),new $n(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rn(Un(e>=240?e-240:e+120,i,n),Un(e,i,n),Un(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new $n(Bn(this.h),Wn(this.s),Wn(this.l),_n(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=_n(this.opacity);return`${1===e?"hsl(":"hsla("}${Bn(this.h)}, ${100*Wn(this.s)}%, ${100*Wn(this.l)}%${1===e?")":`, ${e})`}`}}));var Kn=e=>()=>e;function Gn(e){return 1===(e=+e)?Yn:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):Kn(isNaN(t)?r:t)}}function Yn(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Kn(isNaN(e)?t:e)}var Xn=function e(t){var r=Gn(t);function n(e,t){var n=r((e=On(e)).r,(t=On(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Yn(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function Jn(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function Qn(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=oi(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function Zn(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ei(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ti(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=oi(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ni=new RegExp(ri.source,"g");function ii(e,t){var r,n,i,o=ri.lastIndex=ni.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=ri.exec(e))&&(n=ni.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:ei(r,n)})),o=ni.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 r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function oi(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?Kn(t):("number"===i?ei:"string"===i?(r=In(t))?(t=r,Xn):ii:t instanceof In?Xn:t instanceof Date?Zn:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?Qn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ti:ei:Jn))(e,t)}function ai(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function si(e){return+e}var li=[0,1];function ui(e){return e}function ci(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function pi(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=ci(i,n),o=r(a,o)):(n=ci(n,i),o=r(o,a)),function(e){return o(n(e))}}function di(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=ci(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=an(e,t,1,n)-1;return o[r](i[r](t))}}function mi(){var e,t,r,n,i,o,a=li,s=li,l=oi,u=ui;function c(){var e,t,r,l=Math.min(a.length,s.length);return u!==ui&&(e=a[0],t=a[l-1],e>t&&(r=e,e=t,t=r),u=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?di:pi,i=o=null,p}function p(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),ei)))(r)))},p.domain=function(e){return arguments.length?(a=Array.from(e,si),c()):a.slice()},p.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},p.rangeRound=function(e){return s=Array.from(e),l=ai,c()},p.clamp=function(e){return arguments.length?(u=!!e||ui,c()):u!==ui},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}function fi(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function hi(e){return(e=fi(Math.abs(e)))?e[1]:NaN}var gi,yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bi(e){if(!(t=yi.exec(e)))throw new Error("invalid format: "+e);var t;return new vi({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 vi(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 xi(e,t){var r=fi(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}bi.prototype=vi.prototype,vi.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 qi={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>xi(100*e,t),r:xi,s:function(e,t){var r=fi(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(gi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+fi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Di(e){return e}var Si,Mi,wi,Ai=Array.prototype.map,Ei=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ci(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?Di:(t=Ai.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Di:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Ai.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=bi(e)).fill,r=e.align,p=e.sign,d=e.symbol,m=e.zero,f=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):qi[b]||(void 0===g&&(g=12),y=!0,b="g"),(m||"0"===t&&"="===r)&&(m=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=qi[b],D=/[defgprs%]/.test(b);function S(e){var i,o,l,d=v,S=x;if("c"===b)S=q(e)+S,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0===+e&&"+"!==p&&(M=!1),d=(M?"("===p?p:u:"-"===p||"("===p?"":p)+d,S=("s"===b?Ei[8+gi/3]:"")+S+(M&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}h&&!m&&(e=n(e,1/0));var w=d.length+e.length+S.length,A=w<f?new Array(f-w+1).join(t):"";switch(h&&m&&(e=n(A+e,A.length?f-S.length:1/0),A=""),r){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,w=A.length>>1)+d+e+S+A.slice(w);break;default:e=A+d+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:p,formatPrefix:function(e,t){var r=p(((e=bi(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(hi(t)/3))),i=Math.pow(10,-n),o=Ei[8+n/3];return function(e){return r(i*e)+o}}}}function ki(e,t,r,n){var i,o=function(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?pn(t,e,r):pn(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}(e,t,r);switch((n=bi(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hi(t)/3)))-hi(Math.abs(e)))}(o,a))||(n.precision=i),wi(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hi(t)-hi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-hi(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Mi(n)}function Ni(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){if(!((r=+r)>0))return[];if((e=+e)===(t=+t))return[e];const n=t<e,[i,o,a]=n?cn(t,e,r):cn(e,t,r);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return ki(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=pn(l,u,r))===n)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}n=i}return e},e}function Ii(){var e=mi()(ui,ui);return e.copy=function(){return t=e,Ii().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},dn.apply(e,arguments),Ni(e)}Si=Ci({thousands:",",grouping:[3],currency:["$",""]}),Mi=Si.format,wi=Si.formatPrefix;const Li={getMinorTicks({majorTicks:e,minorTickCount:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r},adjustTicks({ticks:e,majorTicks:t,minorTicks:r,autoMinMax:n,minMax:i,min:o,max:a}){const s=r[0]-t[0],l=t[0]-o;l>s&&e.unshift({value:t[0]-s,isMinor:!0});const u=a-t[t.length-1];return u>s&&e.push({value:t[t.length-1]+s,isMinor:!0}),n||(("min"===i||"minMax"===i)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===i||"minMax"===i)&&u>0&&e.push({value:a,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:r,minMax:n,spacing:i}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMin))),a=Math.max(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMax)));if(!r)switch(n){case"min":o=e.measureAxis.min;break;case"max":a=e.measureAxis.max;break;case"minMax":({min:o,max:a}=e.measureAxis)}const s=100*i,l=Math.max(1,Math.round(t/s)),u=Ii().domain([o,a]).ticks(l),c=Li.getMinorTicks({majorTicks:u,minorTickCount:1}),p=[...u.map((e=>({value:e,isMinor:!1}))),...c.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return Li.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},Ti=xt.chartID;function Oi(e){this._scrollHandler.setDisabled(!!e)}function Ri(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==xt.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function Fi(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Zr.stringWidthOverMWidth(Ri(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function Pi(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return Fr.formatMeasureValue(r,t)}function _i(e,t){const r=e.getStyles(),n=((e,t,r)=>{var n,i,o,a;const s=null===(n=gt("value",r))||void 0===n?void 0:n.label,l=(null==s||null===(i=s.value)||void 0===i?void 0:i.fontFamily)||t.label.value.fontFamily;let u=(null==s||null===(o=s.value)||void 0===o?void 0:o.fontSize)||t.label.value.fontSize;return u=parseFloat(u),{fontFamily:l,fontSize:u,fill:null==s||null===(a=s.value)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color}})(0,r,t),i=(null==n?void 0:n.fill)||r.label.value.color,o=r.label.value.darkColor,a=r.label.value.lightColor;return{settings:{sources:[{strategy:{settings:{...n,direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:i},{fill:null!=n&&n.fill?i:e=>vr.isDark(e.node.attrs.fill)?a:o},{position:"opposite",fill:i,justify:0}],label:Pi}]}}}]}}}function Hi(e,t){return{viewSize:t,max:e.generatedMatrix.length}}function Vi(e,t,r){const{theme:n,translator:i}=e,o=xt.getColorForPositiveValue(t,n),a=xt.getColorForNegativeValue(t,n),s=xt.getColorForSubtotal(t,n),l=i.get("waterfall.legend.positiveValue.label"),u=i.get("waterfall.legend.negativeValue.label"),c=i.get("waterfall.legend.subtotal.label"),p=((e,t,r,n)=>{var i,o,a,s;const l=n.isEnabled("CLIENT_IM_3051")?null===(i=gt("legend",r))||void 0===i?void 0:i.legend:{};return{fontFamily:(null==l||null===(o=l.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==l||null===(a=l.label)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==l||null===(s=l.label)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"legend.label","color")}})(Ti,n,t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[l,u,c],range:[o,a,s]},style:{item:{label:{fontSize:p.fontSize,fontFamily:p.fontFamily,fill:p.color}},title:{show:!1}}}}const zi=ur.extend("WaterfallChart",{namespace:".waterfallchart",chartID:Ti,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=Ur.create(this.chartInstance,r,Ti),this._scrollHandler=new qr(this.chartInstance,r,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"]),this.flags=n},updateConstraints:function(e){const t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:r}=this.environment,n=!!e.snapshotData,i=rr.create({chartID:Ti,theme:r,isRtl:t,flags:this.flags}),o=this.picassoElement.clientWidth,a=this.picassoElement.clientHeight,s={};s.box=this._tooltipHandler.setUp({chartBuilder:i,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,r){const n=r.boxColor.value;return{value:Fr.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Tr.create(l,"vertical",t,{componentKey:"box-marker"}),i.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:r,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:Fi.call(this,e),dimensionSource:en.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[en.getGeneratedMeasurePath(0),en.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>Li.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:Hi(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:yt(Ti,r,e)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:en.getGeneratedDimensionPath(0),props:{start:{field:en.getGeneratedMeasurePath(0)},end:{field:en.getGeneratedMeasurePath(1)},measure:{field:en.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:en.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:r,consume:n}}}(s,e)),i.addComponent("point-marker",function(e,t){const r=t.getStyle(Ti,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:en.getGeneratedDimensionPath(0),props:{x:{},y:{field:en.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,r)),e.legend&&!e.legend.show||i.addComponent("categorical-legend",Vi(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a});const u=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,i=n.id,o=n.resolve,a=void 0===o?[]:o,s=n.transform,l=void 0===s?[]:s,u=n.extend,c=void 0===u?[]:u,p={theme:t,matrix:mt(a),styles:void 0};return p.styles=ht({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=ht({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:r,config:{id:"waterfallChart"}});e.dataPoint.showLabels&&i.addComponent("labels",_i(u,e));const c=i.getSettings();return this.addSnapshotChartSettings(c,e),c},updateData:function(e){const{theme:t,options:r}=this.environment,n=this;return this._super(e).then((()=>{if(n._destroyed)return Promise.reject();let i,o;if(!!e.snapshotData){const e=n.layout.generated.qHyperCube.qDataPages[0].qArea;i=e.qTop,o=e.qHeight,en.generateHyperCube(n.layout,t)}else{en.generateHyperCube(n.layout,t),Oi.call(n,!0);const{viewState:e}=r;e?(n._scrollHandler.updateViewState(n.layout.generatedMatrix.length),n._scrollHandler.setScrollState(e.scroll),i=e.scroll):(n._scrollHandler.resetScroll(),i=0),o=n._scrollHandler.getScrollViewSizeInItem()}en.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||Oi.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally((()=>e.call(t)))}return this._super()},getSlicedData:function(e,t){return en.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function ji(q){return function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(D).forEach((t=>{e.add(D[t])}))}}(q.translator),{qae:O(q),ext:wt(q),component(){const D=d(),w=function(){const e=i(),r=o(),n=a(),c=t(),p=s(),d=l();return u((()=>({app:e,appLayout:r,deviceType:n,options:c,theme:p,translator:d})),[e,r,c.direction,c.freeResize,d.language(),p.name(),n])}(),A=w.options.renderer,E=u((()=>function(e){const t=y();return t.renderer.prio([e||"canvas"]),t.use(b),t.use(v(x)),t.use(S),t.component("disclaimer",M),t}(A)),[A]),C=m(),k=r(),[N,I]=f();var L;h((()=>{const e=g(D),t=new zi({picasso:E,environment:w,$element:e,flags:q.flags});return I(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{N&&(N.updateEnvironment(w),N.updateConstraints(k),await N.updateData(C),await N.paint())}),[C,N,w]),function(i){const o=e(),a=t(),s=r(),[,l]=n((async()=>{i&&(i.updateConstraints(s),i.options=a,await i.resize())}),[o.width,o.height]);if(l)throw l}(N),L=N,c((e=>{if(L)return L.setSnapshotData(e)})),p((()=>({getViewState(){if(L)return L.getViewState()}})),[L])}}}export{ji as default};
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},at({exports:{}});var gt="'Source Sans Pro', 'Arial', 'sans-serif'",yt="#333333",bt="#595959",vt="#737373",xt="#cccccc",qt="#e6e6e6";function Dt(e){var t={};return[].concat(_(e),_([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",bt],["object","axis.label.name","fontFamily",gt],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",xt],["object","axis.line.minor","color",qt],["object","axis.title","color"],["object","axis.title","fontFamily",gt],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",qt],["object","grid.line.major","color",xt],["object","grid.line.minor","color",qt],["object","label.value","color",bt],["object","label.value","fontFamily",gt],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",bt],[!1,"label.value","lightColor",qt],["object","outOfRange","color","#999"],["object","legend.title","color",yt],["object","legend.title","fontFamily",gt],["object","legend.title","fontSize","15px"],["object","legend.label","color",bt],["object","legend.label","fontFamily",gt],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",yt],["object","referenceLine.label.name","fontFamily",gt],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",qt],["object","referenceLine.outOfBounds","fontFamily",gt],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",vt,function(e){return"transparent"===e?vt:e}]])).reduce(function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e},[]).sort(function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)})}var St=function(e){return e};function Mt(e){var t=e.theme,r=e.id,n=e.transform,i=e.extend,o=e.matrix,a={},s=n.reduce(function(e,t){var r=P(t,2),n=r[0],i=r[1];return e[n]=i,e},{});return o.forEach(function(e){var n=P(e,5),i=n[0],o=n[1],l=n[2],u=n[3],c=n[4],p=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,r=e.base,n=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===r)return a;var s=t.getStyle(r,n,i);return void 0===s?a:s}({theme:t,base:"object"===i&&r?"".concat("object",".").concat(r):i,path:o,attribute:l,defaultValue:u}),f=(s["".concat(o,".").concat(l)]||St)(p(d));lt(a,[o,l].filter(Boolean).join("."),f)}),i.forEach(function(e){var t=P(e,2),r=t[0],n=t[1];lt(a,r,n)}),a}const wt=(e,t)=>(t.components||[]).find(t=>t.key===e),At=(e,t,r)=>{var n,i,o,a;const s=null===(n=wt("axis",r))||void 0===n?void 0:n.axis;return{labels:{fontFamily:(null==s||null===(i=s.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==s||null===(o=s.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==s||null===(a=s.label)||void 0===a||null===(a=a.name)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color)||t.getStyle(e,"axis.label.name","color")}}},Et="object.waterfallChart";function Ct(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(Et,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const kt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:Et,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(Ct(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(Ct(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(Ct(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(kt.valueTypes),Object.freeze(kt);const Nt=(e,t)=>{const r={axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}};return null!=e&&e.isEnabled("CLIENT_IM_3051")&&(r.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:t.getOptions("legend","legend.label")}),Object.keys(r).length>0?r:void 0},It=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:Nt(r,t)});function Ot(e){return!e.color.auto}function Tt(e){const{flags:t,translator:r}=e,n=e.flags.isEnabled("SENSECLIENT_IM_2020_STYLINGPANEL_WATERFALLCHART"),i=e.flags.isEnabled("SENSECLIENT_IM_2020_WATERFALLCHART_BG"),o={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:kt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:kt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:kt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:kt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==kt.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>r.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==kt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.theme,s=((e,t,r,n,i)=>n({theme:e,translator:t,flags:i,config:{id:r,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}))(a,r,kt.chartID,ae,t),l=((e,t,r)=>{const n={getOptions:(n,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const r=e.getStyle(t,`${i}.color`,"color");return{color:r,index:e.getDataColorPickerPalettes()[0].colors.indexOf(r)}}});return{labelSection:{component:"items",ref:"components",key:n,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,r)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,r)}}}}))(t,r)}}}}};return n})(s,a,kt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:n&&It(i,l,t),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},c={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},p={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:Ot},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:Ot},f={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:Ot},m={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...c,label:e=>{var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:p,negativeValueColor:d,subtotalColor:f}}}},h={translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...c,translation:"properties.colors"},positiveValueColor:p,negativeValueColor:d,subtotalColor:f}},simpleColors:m,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>function(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}(e,"legend.show",!0)}}}}},g={uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},y={uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}},b={uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:u,colors:h,measureAxis:g,dimensionAxis:y}},v={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach(t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)})},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:o,numberFormatting:v,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:b}}}function Lt(e){return{definition:Tt(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,r,n){n.mapProperties();const i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return O({dataDefinition:A(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>T({propertyTree:e,viewDataMode:r})}}var Rt,Ft;function Pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _t=function(){if(Ft)return Rt;Ft=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return Rt=function e(){var t,r,n,l,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=s(p,r),p!==(l=s(t,r))&&(m&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(p,{name:r,newValue:e(m,c,l)})):void 0!==l&&a(p,{name:r,newValue:l}));return p},Rt}();function Ht(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Vt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function jt(){}Pt(_t);var zt=1/.7,$t="\\s*([+-]?\\d+)\\s*",Bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wt=/^#([0-9a-f]{3,8})$/,Kt=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),Gt=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),Yt=new RegExp(`^rgba\\(${$t},${$t},${$t},${Bt}\\)$`),Xt=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Bt}\\)$`),Jt=new RegExp(`^hsl\\(${Bt},${Ut},${Ut}\\)$`),Zt=new RegExp(`^hsla\\(${Bt},${Ut},${Ut},${Bt}\\)$`),Qt={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 er(){return this.rgb().formatHex()}function tr(){return this.rgb().formatRgb()}function rr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Wt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?nr(t):3===r?new sr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ir(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ir(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 sr(t[1],t[2],t[3],1):(t=Gt.exec(e))?new sr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Yt.exec(e))?ir(t[1],t[2],t[3],t[4]):(t=Xt.exec(e))?ir(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Jt.exec(e))?fr(t[1],t[2]/100,t[3]/100,1):(t=Zt.exec(e))?fr(t[1],t[2]/100,t[3]/100,t[4]):Qt.hasOwnProperty(e)?nr(Qt[e]):"transparent"===e?new sr(NaN,NaN,NaN,0):null}function nr(e){return new sr(e>>16&255,e>>8&255,255&e,1)}function ir(e,t,r,n){return n<=0&&(e=t=r=NaN),new sr(e,t,r,n)}function or(e){return e instanceof jt||(e=rr(e)),e?new sr((e=e.rgb()).r,e.g,e.b,e.opacity):new sr}function ar(e,t,r,n){return 1===arguments.length?or(e):new sr(e,t,r,null==n?1:n)}function sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function lr(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}`}function ur(){const e=cr(this.opacity);return`${1===e?"rgb(":"rgba("}${pr(this.r)}, ${pr(this.g)}, ${pr(this.b)}${1===e?")":`, ${e})`}`}function cr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dr(e){return((e=pr(e))<16?"0":"")+e.toString(16)}function fr(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new hr(e,t,r,n)}function mr(e){if(e instanceof hr)return new hr(e.h,e.s,e.l,e.opacity);if(e instanceof jt||(e=rr(e)),!e)return new hr;if(e instanceof hr)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new hr(a,s,l,e.opacity)}function hr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function gr(e){return(e=(e||0)%360)<0?e+360:e}function yr(e){return Math.max(0,Math.min(1,e||0))}function br(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Ht(jt,rr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:er,formatHex:er,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mr(this).formatHsl()},formatRgb:tr,toString:tr}),Ht(sr,ar,Vt(jt,{brighter(e){return e=null==e?zt:Math.pow(zt,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sr(pr(this.r),pr(this.g),pr(this.b),cr(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:lr,formatHex:lr,formatHex8:function(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}${dr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ur,toString:ur})),Ht(hr,function(e,t,r,n){return 1===arguments.length?mr(e):new hr(e,t,r,null==n?1:n)},Vt(jt,{brighter(e){return e=null==e?zt:Math.pow(zt,e),new hr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new hr(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new sr(br(e>=240?e-240:e+120,i,n),br(e,i,n),br(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new hr(gr(this.h),yr(this.s),yr(this.l),cr(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=cr(this.opacity);return`${1===e?"hsl(":"hsla("}${gr(this.h)}, ${100*yr(this.s)}%, ${100*yr(this.l)}%${1===e?")":`, ${e})`}`}}));const vr=Math.PI/180,xr=180/Math.PI,qr=4/29,Dr=6/29,Sr=3*Dr*Dr;function Mr(e){if(e instanceof wr)return new wr(e.l,e.a,e.b,e.opacity);if(e instanceof Nr)return Ir(e);e instanceof sr||(e=or(e));var t,r,n=kr(e.r),i=kr(e.g),o=kr(e.b),a=Ar((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Ar((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Ar((.0139322*n+.0971045*i+.7141733*o)/.82521)),new wr(116*a-16,500*(t-a),200*(a-r),e.opacity)}function wr(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ar(e){return e>.008856451679035631?Math.pow(e,1/3):e/Sr+qr}function Er(e){return e>Dr?e*e*e:Sr*(e-qr)}function Cr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function kr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Nr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Ir(e){if(isNaN(e.h))return new wr(e.l,0,0,e.opacity);var t=e.h*vr;return new wr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ht(wr,function(e,t,r,n){return 1===arguments.length?Mr(e):new wr(e,t,r,null==n?1:n)},Vt(jt,{brighter(e){return new wr(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new wr(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,r=isNaN(this.b)?e:e-this.b/200;return new sr(Cr(3.1338561*(t=.96422*Er(t))-1.6168667*(e=1*Er(e))-.4906146*(r=.82521*Er(r))),Cr(-.9787684*t+1.9161415*e+.033454*r),Cr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Ht(Nr,function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Nr)return new Nr(e.h,e.c,e.l,e.opacity);if(e instanceof wr||(e=Mr(e)),0===e.a&&0===e.b)return new Nr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xr;return new Nr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Nr(e,t,r,null==n?1:n)},Vt(jt,{brighter(e){return new Nr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Nr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Ir(this).rgb()}}));var Or=-.14861,Tr=1.78277,Lr=-.29227,Rr=-.90649,Fr=1.97294,Pr=Fr*Rr,_r=Fr*Tr,Hr=Tr*Lr-Rr*Or;function Vr(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);e instanceof sr||(e=or(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(Hr*n+Pr*t-_r*r)/(Hr+Pr-_r),o=n-i,a=(Fr*(r-i)-Lr*o)/Rr,s=Math.sqrt(a*a+o*o)/(Fr*i*(1-i)),l=s?Math.atan2(a,o)*xr-120:NaN;return new jr(l<0?l+360:l,s,i,e.opacity)}(e):new jr(e,t,r,null==n?1:n)}function jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Ht(jr,Vr,Vt(jt,{brighter(e){return e=null==e?zt:Math.pow(zt,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*vr,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new sr(255*(t+r*(Or*n+Tr*i)),255*(t+r*(Lr*n+Rr*i)),255*(t+r*(Fr*n)),this.opacity)}}));var zr=e=>()=>e;function $r(e,t){return function(r){return e+r*t}}function Br(e,t){var r=t-e;return r?$r(e,r):zr(isNaN(e)?t:e)}function Ur(e){return((e=Math.exp(e))+1/e)/2}function Wr(e){return function t(r){function n(t,n){var i=e((t=Vr(t)).h,(n=Vr(n)).h),o=Br(t.s,n.s),a=Br(t.l,n.l),s=Br(t.opacity,n.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,r)),t.opacity=s(e),t+""}}return r=+r,n.gamma=t,n}(1)}!function e(t){var r=function(e){return 1==(e=+e)?Br:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):zr(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ar(e)).r,(t=ar(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Br(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),function e(t,r,n){function i(e,i){var o,a,s=e[0],l=e[1],u=e[2],c=i[0],p=i[1],d=i[2],f=c-s,m=p-l,h=f*f+m*m;if(h<1e-12)a=Math.log(d/u)/t,o=function(e){return[s+e*f,l+e*m,u*Math.exp(t*e*a)]};else{var g=Math.sqrt(h),y=(d*d-u*u+n*h)/(2*u*r*g),b=(d*d-u*u-n*h)/(2*d*r*g),v=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(b*b+1)-b);a=(x-v)/t,o=function(e){var n,i=e*a,o=Ur(v),c=u/(r*g)*(o*(n=t*i+v,((n=Math.exp(2*n))-1)/(n+1))-function(e){return((e=Math.exp(e))-1/e)/2}(v));return[s+c*f,l+c*m,u*o/Ur(t*i+v)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var r=Math.max(.001,+t),n=r*r;return e(r,n,n*n)},i}(Math.SQRT2,2,4),Wr(function(e,t){var r=t-e;return r?$r(e,r>180||r<-180?r-360*Math.round(r/360):r):zr(isNaN(e)?t:e)}),Wr(Br);var Kr="center",Gr="bottom";function Yr(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}[{key:"NoDataExist",alignment:Kr,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Kr,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Kr,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Kr},{key:"DataRangeIncludingZero",alignment:Gr},{key:"LimitedData",alignment:Gr},{key:"NegativeOrZeroValues",alignment:Gr}].reduce(function(e,t){return e[t.key]=t,e},{});var Xr,Jr={exports:{}},Zr=Xr?Jr.exports:(Xr=1,Jr.exports=function(){function e(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r(r){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach(function(t){e(r,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]},p=function e(){var t,r,n,i,o,a,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=c(p,r),p!==(i=c(t,r))&&(m&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(m,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p};function d(e,t,r,n){if(!e)return-1;const i=r.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(n)&&n.some((e,t)=>e!==t)){const e=n.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function f(e,t,r){let{key:n}=r;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function m(e){let{cache:t,f:r,mainCell:n,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:u,targetProp:c,columnOrder:m}=e,h=n;if(i.field&&i.field!==r){const e=d(i.field,o,{cache:t},m);if(-1===e)return;h=p({qRow:a},e(s))}u[c]=f(i,h,{key:l})}function h(e,t,r,n){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=n.normalizeConfig(i[e],t),h=Object.keys(u),g=!!i[e].trackBy,y=typeof i[e].trackBy,b={},v=[],x=[];for(let t=0;t<a.qDataPages.length;t++){const o=d(l,a.qDataPages[t],{cache:r},a.qColumnOrder);if(-1!==o)for(let d=0;d<a.qDataPages[t].qMatrix.length;d++){const q=a.qDataPages[t].qArea.qTop+d,D=p({qRow:q},o(a.qDataPages[t].qMatrix[d])),S=f(c,D,{key:s});if(!c.filter||c.filter(D)){for(let e=0;e<h.length;e++){const n=u[h[e]];let i=n.fields||[n];n.fields&&(S[h[e]]=[]);for(let o=0;o<i.length;o++)m({cache:r,f:l,mainCell:D,p:i[o],prop:h[e],page:a.qDataPages[t],rowIdx:q,row:a.qDataPages[t].qMatrix[d],sourceKey:s,target:n.fields?S[h[e]]:S,targetProp:n.fields?o:h[e],columnOrder:a.qColumnOrder});if(n.fields){const t=S[h[e]].map(e=>e.value),r=S[h[e]].map(e=>e.label);S[h[e]]={value:"function"==typeof n.value?n.value(t):void 0!==n.value?n.value:t,label:"function"==typeof n.label?n.label(r):void 0!==n.label?String(n.label):String(S[h[e]].value)}}}g&&n.track({cfg:i[e],itemData:D,obj:S,target:v,tracker:b,trackType:y}),x.push(S)}}}const q=g?n.collect(v,{main:c,propsArr:h,props:u}):x;o=[...o,...q]}return o}function g(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function y(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=v)):void 0===t&&(t=b);for(var r,n,i,o,a,s=new D(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new D(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(q)}function b(e){return e.children}function v(e){return Array.isArray(e)?e[1]:null}function x(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function q(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function D(e){this.data=e,this.depth=this.height=0,this.parent=null}function S(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}D.prototype=y.prototype={constructor:D,count:function(){return this.eachAfter(g)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return y(this).eachBefore(x)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}};var M={depth:-1},w={},A={};function E(e){return e.id}function C(e){return e.parentId}function k(){var e,t=E,r=C;function n(n){var i,o,a,s,l,u,c,p,d=Array.from(n),f=t,m=r,h=new Map;if(null!=e){const t=d.map((t,r)=>function(e){let t=(e=`${e}`).length;return I(e,t-1)&&!I(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,r,n))),r=t.map(N),i=new Set(t).add("");for(const e of r)i.has(e)||(i.add(e),t.push(e),r.push(N(e)),d.push(A));f=(e,r)=>t[r],m=(e,t)=>r[t]}for(a=0,i=d.length;a<i;++a)o=d[a],u=d[a]=new D(o),null!=(c=f(o,a,n))&&(c+="")&&(p=u.id=c,h.set(p,h.has(p)?w:u)),null!=(c=m(o,a,n))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=d[a]).parent){if(!(l=h.get(c)))throw new Error("missing: "+c);if(l===w)throw new Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw new Error("multiple roots");s=u}if(!s)throw new Error("no root");if(null!=e){for(;s.data===A&&1===s.children.length;)s=s.children[0],--i;for(let e=d.length-1;e>=0&&(u=d[e]).data===A;--e)u.data=null}if(s.parent=M,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(q),s.parent=null,i>0)throw new Error("cycle");return s}return n.id=function(e){return arguments.length?(t=S(e),n):t},n.parentId=function(e){return arguments.length?(r=S(e),n):r},n.path=function(t){return arguments.length?(e=S(t),n):e},n}function N(e){let t=e.length;if(t<2)return"";for(;--t>1&&!I(e,t););return e.slice(0,t)}function I(e,t){if("/"===e[t]){let r=0;for(;t>0&&"\\"===e[--t];)++r;if(!(1&r))return!0}return!1}function O(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const r=e.split("/");let n,i=t;for(let e=0;e<r.length;e++){if("*"===r[e]&&Array.isArray(i)){const t=[];n=r.slice(e+1).join("/");for(let e=0;e<i.length;e++){let r=O(n,i[e]);Array.isArray(r)?t.push(...r):t.push(r)}return t}if(!r[e]&&Array.isArray(i)){const t=new Array(i.length);n=r.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=O(n,i[e]);return t}r[e]in i&&(i=i[r[e]])}return i}function T(e,t,r){let n=[];if(!e||!e.length)return n;if(t<=0){const t=r>=0?[e[r]]:e;n=[...n,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(n=[...n,...T(e[i].children,t-1,r)]);return n}function L(e,t,r){if(e===t)return e=>e;if(e>t){const r=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<r;++e)t=t.parent;return t}}if(t>e){const n=Math.max(0,Math.min(100,t-e));return e=>T(e.children,n-1,r)}return!1}const R=/^qDimensionInfo(?:\/(\d+))?/,F=/^\/?qMeasureInfo\/(\d+)/,P=/\/qAttrExprInfo\/(\d+)/,_=/\/qAttrDimInfo\/(\d+)/;function H(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function V(e,t){let{cube:r}=t;if(!e)return-1;let n=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=-1,p=n;const d=r.qEffectiveInterColumnSortOrder,f=H(r);return R.test(p)&&(i=!0,o=+R.exec(p)[1],p=n.replace(R,"")),F.test(p)&&("K"===r.qMode?u=+F.exec(p)[1]:d&&-1!==d.indexOf(-1)?(u=+F.exec(p)[1],c=0):c=+F.exec(p)[1],p=p.replace(F,"")),p&&(_.exec(p)?s=+_.exec(p)[1]:P.exec(p)&&(a=+P.exec(p)[1])),l=i?"S"===r.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:s,attrIdx:a}}function j(e,t){let r,n,i=L(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?n=e=>{var r;return null==e||null===(r=e.qAttrDims)||void 0===r?void 0:r.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=e=>{var r;return null==e||null===(r=e.qAttrExps)||void 0===r?void 0:r.qValues[t.attrIdx]}),{nodeFn:i,attrFn:n,valueFn:r}}function z(e,t,r){let{key:n}=r;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:n,field:e.field.key()}),i}function $(e){let{propsArr:t,props:r,item:n,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=r[t[e]],l=s.fields||[s];let u,c;s.fields&&(u=[],c=[]);for(let r=0;r<l.length;r++){const p=l[r];let d,f,m,h,g,y;if("primitive"===p.type?(m=p.value,y=String(p.value)):("function"==typeof p.value&&(d=e=>p.value(e,n)),"function"==typeof p.label&&(f=e=>p.label(e,n)),p.accessor?(h=p.accessor(n),Array.isArray(h)?(g=h.map(p.valueAccessor),p.attrAccessor&&(g=g.map(p.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=p.reduce?p.reduce(m):m,y=p.reduceLabel?p.reduceLabel(y,m):String(m)):(m=p.attrAccessor?p.attrAccessor(p.valueAccessor(h)):p.valueAccessor(h),y=m)):(m=i,y=i)),s.fields){const e=d?d(m):m;u.push(e),c.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const r=d?d(m):m;o[t[e]]={value:r,label:f?f(y):null!=y?y:String(r)},p.field&&(o[t[e]].source={field:p.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof s.value?s.value(u,n):u,label:"function"==typeof s.label?s.label(c,n):c})}}const B=(e,t,r)=>{const n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=O(n,e);return o&&o[0]?(t.tree=y(o[0],r.children||(e=>e[i])),t.tree):null};const U=e=>{let{propsArr:t,props:r,cube:n,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=r[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=j(o,V(t.field,{cube:n}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;const o=t.raw(),a=t.key(),s="S"===o.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map((e,t)=>t)}(e),i=e.fields(),o=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(i.indexOf(e))),a=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(i.indexOf(e))),s={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let i="__root",u=!1;for(let e=0;e<o.length;e++){var l;const t=n[o[e]],a="".concat(i,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);s[a]||(s[a]=r({__id:a,__parent:i,qValues:[]},t),u=!0),i=a}if(u)for(let e=0;e<a.length;e++){const t=n[a[e]];s[i].qValues.push(t)}}const u=Object.keys(s).map(e=>s[e]);return k().id(e=>e.__id).parentId(e=>e.__parent)(u)}(t):B(o,n,e);if(!s)return null;const l=s.height,u=[];for(let a=0;a<=l;a++){let s=null;if(a>0)if("S"===o.qMode){let e=H(o)[a-1];s=n.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[a-1];a>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),s=n.fields[e]}const{props:l,main:c}=i.normalizeConfig(r(r({},e),{},{field:s?s.key():void 0}),t),p=Object.keys(l);u[a]={propsArr:p,props:l,main:c};const d=s?V(s,{cube:o}):{fieldDepth:0};U({propsArr:p,props:l,cube:o,cache:n,itemDepthObject:d,f:s})}const c=s.copy().descendants(),p=s.descendants();for(let e=0;e<p.length;e++){const t=u[p[e].depth].propsArr,r=u[p[e].depth].props,n=u[p[e].depth].main,i=c[e],o=i.data,s=z(n,o,{key:a});$({propsArr:t,props:r,item:i,itemData:o,ret:s,sourceKey:a}),p[e].data=s}return s}function K(e,t,r,n){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!B(s,r,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:p}=n.normalizeConfig(i[a],t),d=Object.keys(c),f=V(u,{cube:s}),{nodeFn:m,attrFn:h,valueFn:g}=j({fieldDepth:0},f);U({propsArr:d,props:c,cube:s,cache:r,itemDepthObject:f,f:u});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],q=m(r.tree),D=[];for(let e=0;e<q.length;e++){const t=q[e],r=h?h(g(t)):g(t);if(p.filter&&!p.filter(r))continue;const o=z(p,r,{key:l});$({propsArr:d,props:c,item:t,itemData:r,ret:o,sourceKey:l}),y&&n.track({cfg:i[a],itemData:r,obj:o,target:x,tracker:v,trackType:b}),D.push(o)}const S=y?n.collect(x,{main:p,propsArr:d,props:c}):D;o=[...o,...S]}return o}var G=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){var t;t=function(){return function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},e.exports=t()});function Y(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const X={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},J=/%\)?$/,Z=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Q=/^\(oct\)/i,ee=/^\(dec\)/i,te=/^\(hex\)/i,re=/^\(bin\)/i,ne=/^\(rom\)/i,ie=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,oe=/#|0/g;function ae(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function se(e,t,r){let n;return Z.test(t)?e=ae(e,Number(/\d{2}/.exec(t)[0]),t,r):Q.test(t)?e=ae(e,8,t,r):ee.test(t)?e=ae(e,10,t,r):te.test(t)?e=ae(e,16,t,r):re.test(t)?e=ae(e,2,t,r):ne.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){let r,n="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(r=0;r<a.length;r++)if(a[r]<=i){n+=s[r],i-=a[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+e.toExponential(0)),e}function le(e,t,r){const n=Y(e);return r?n:new RegExp(n||"",t)}function ue(e,t,r,n){let i,o,a,s,l,u,c,p,d,f=e.pattern;n&&(e.abbreviate=!0),d=function(e,t){return t&&(t=Y(t)),e&&(e=Y(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}(t,r),a=f.match(d),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===r&&(i=a.split(r),o=i.pop(),a=i.join("")+r+o,t=""),u=t,t=/,/.test(r)?"¤":",",u&&(a=a.replace(le(u,"g"),t)),c=r,r=".",c&&(a=a.replace(le(c,"g"),r)),p=a.match(/#/g),p=p?p.length:0;const m=f.split(c);let h;m[1]&&(h=m[1].match(oe)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=h?h.length:2,e.percentage=J.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(le(t,null,!0),"|").concat(le(r,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=r,e.temp=p}class ce{constructor(e,t,r,n,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=r||",",this.decimalDelimiter=n||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return X;const r={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(r[t[0]]=t[1])}),r}(e,this.patternSeparator),this.prepare()}clone(){const e=new ce(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}prepare(e,t,r){let n;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],ie.test(e[0])&&(n.positive.isFunctional=!0),e[1]?ie.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?ie.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1;const i="U"===this.type;n.positive.isFunctional||ue(n.positive,t,r,i),n.negative&&!n.negative.isFunctional&&ue(n.negative,t,r,i),n.zero&&!n.zero.isFunctional&&ue(n.zero,t,r,i)}formatValue(e){let t,r,n,i,o,a,s,l,u,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=se(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let n,i,o=t[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);o<=r&&s<t.length;)s++,o=t[s];s>0&&(n=t[s-1]),n&&r>0&&n>0?i=n:(r<0&&n<0||!n)&&(o<0&&o-r<=c.maxPrecision?i=o:n<=r&&!(o>0&&-r<=c.maxPrecision)&&(i=n)),i&&(p=this.abbreviations[i],e/=10**i)}if(n=Math.abs(e),t=c.temp,l=c.numericPattern,u=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let r=l.split(o)[0];if(r+=o,e=G(r,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),r=u.replace(/#+$/,"").length;let i=("I"===this.type?0:n%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<r;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(n>=10**t||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=G(l,e)}e=e.replace(c.numericRegex,e=>e===a?c.groupTemp:e===o?c.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function pe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:r=5e3,multipleArguments:n=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),u=0,c=0;return o=n?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=r&&(delete s[l[c]],delete l[c],u--,c++),s[e]=t,l[u]=e,u++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),u=0,c=0},o.size=()=>u,o}function de(e,t,r,n,i){const o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new ce(...t)}(i,e,t,r,n),a=pe(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,r,n){return a.clear(),o.format(t,e,r,n)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const fe="D",me="T",he="TS",ge="IV",ye=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],be=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ve=["January","February","March","April","May","June","July","August","September","October","November","December"],xe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qe(e,t){for(let r=e.length;r<t;r++)e="0".concat(e);return e}function De(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Se(e,t){let r,n=function(e){const t=e,r=24*De(t),n=60*De(r),i=60*De(n),o=1e3*De(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}(e),i=n.d,o=n.h,a=n.m,s=n.s,l=n.f,u=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=r?r.getDay()-1:0,u<0&&(u=6));let c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}class Me{constructor(e,t,r){const n=e||{};n.qCalendarStrings||(n.qCalendarStrings={qLongDayNames:ye,qDayNames:be,qLongMonthNames:ve,qMonthNames:xe}),this.localeInfo=n,this.locale_days=n.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=n.qCalendarStrings.qDayNames.slice(),this.locale_months=n.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=n.qCalendarStrings.qMonthNames.slice(),t||(t={[me]:n.qTimeFmt||"hh:mm:ss",[fe]:n.qDateFmt||"YYYY-MM-DD",[he]:n.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[r]),this.pattern=t}clone(){const e=new Me(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const r=/t+/gi.test(t);let n;e instanceof Date?n=function(e,t){let r=e.getUTCHours(),n=e.getUTCDay()-1;return t&&(r%=12,r||(r=12)),n<0&&(n=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:n,date:e.getUTCDate(),h:r,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,r):(e<0&&(e=-e,t="-".concat(t)),n=Se(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:qe("".concat(t.year).slice(-2),2),YYY:qe("".concat(t.year).slice(-3),3),def:e=>qe("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:qe("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:qe("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>qe("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>qe("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>qe("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>qe("".concat(t.s),e.length)},"f+|F+":{def(e){let r="".concat(t.f),n=e.length-r.length;if(n>0)for(let e=0;e<n;e++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def(e){let r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r=r.slice(0,e.length),r}}}}(this,n),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g");return t.replace(a,e=>{let t,r,n;for(r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&(t=new RegExp(r),t.test(e)))break;if(!t)return"";for(const t in i[r])if(t===e||t.toLowerCase()===e){n=i[r][t],void 0===n&&(n=i[r][t.toLowerCase()]);break}return void 0===n&&(n=i[r].def),"function"==typeof n&&(n=n(e)),n})}}function we(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new Me(...t)}function Ae(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=we(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),n=pe(r.format.bind(r),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==ge?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),n(e)}return o.format=function(e,t){return n.clear(),t=i(t),r.format(t,e)},o.locale=function(i){return r=we(i,e,t),n=pe(r.format.bind(r),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,n.clear()),t},o}function Ee(){let e,{meta:t,id:r,key:n,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===s?"first":"avg",p=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ae(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(r="#".concat(i,"##"),o="U"),de(r,n,i,o,t)}(t,i),d={id:()=>r,key:()=>n,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(d)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:"dimension"===s?"first":(e,t)=>p(t),formatter:()=>p,tags:()=>t.qTags};return d}function Ce(e,t,r,n,i){return(t[e]||[]).map((t,o)=>{const a="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(o),s={instance:Ee(p({id:"".concat(r?"".concat(r,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Ce("qAttrDimInfo",t,r,a,p({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Ce("qAttrExprInfo",t,r,a,p({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Ce("qMeasureInfo",t,r,a,p({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function ke(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=t;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const a=ke.util,s={cache:i,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={key:()=>e,raw:()=>o,field:e=>function(e,t){let{cache:r}=t;if("number"==typeof e)return r.fields[e];const n=r.allFields;if("function"==typeof e){for(let t=0;t<n.length;t++)if(e(n[t]))return n[t];return!1}if("string"==typeof e){for(let t=0;t<n.length;t++)if(n[t].key()===e||n[t].title()===e)return n[t]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,s),fields:()=>i.fields.slice(),extract:e=>s.extractor(e,l,i,a),hierarchy:e=>s.hierarchy(e,l,i,a),_cache:()=>i};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(s.extractor=K,s.hierarchy=W,s.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(s.extractor=h,s.pages=o.qDataPages,s.hierarchy=W):s.extractor=()=>[],s.fieldExtractor=e=>s.extractor({field:e},l,i,a);const u="S"===o.qMode?e=>e.qElemNumber:void 0,c="S"===o.qMode?e=>e.qNum:void 0;i.wrappedFields.push(...Ce("qDimensionInfo",o,e,"",p({},s,{value:u,type:"dimension"}))),i.wrappedFields.push(...Ce("qMeasureInfo",o,e,"",p({},s,{value:c,type:"measure"}))),i.fields=i.wrappedFields.map(e=>e.instance);const d=e=>{e.forEach(e=>{i.allFields.push(e.instance),d(e.measures),d(e.attrDims),d(e.attrExps)})};return d(i.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=l.field(t.from),o=Ee(r({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>s.extractor({field:e},l,i,a),key:t.key,type:n.type(),localeInfo:s.localeInfo,value:n.value},t.override||{}));i.virtualFields.push(o)}),i.allFields.push(...i.virtualFields),l}const Ne=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ie=/\/qDimensionInfo(?:\/(\d+))?/,Oe=/\/qMeasureInfo\/(\d+)/,Te=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Le=/\/qAttrExprInfo\/(\d+)/,Re=/\/?qHyperCube/,Fe=/\/?qTreeData/,Pe=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),_e=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;const n=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach(e=>{const t=function(e,t){let r=e,n=-1,i=-1,o="",a=e=>e;Re.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),a=Pe):Fe.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),a=_e);let s=!0;if(Ie.test(e)&&(n=+Ie.exec(e)[1]),Oe.test(e)&&(i=+Oe.exec(e)[1]),Te.test(e)){i=-1,n=0;const e=+Te.exec(r)[2];isNaN(e)||(n=e,r=r.replace(/\/\d+$/,"")),s=!1}if(Le.test(e)){const e=i;if(t){i=0;const a=O(o,t);i+=(a.qMeasureInfo||[]).length,n>-1?(i=a.qDimensionInfo.slice(0,n).reduce((e,t)=>e+t.qAttrExprInfo.length,i),n=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+Le.exec(r)[1]}else n>-1?(n=-1,i=+Le.exec(r)[1]):i+=+Le.exec(r)[1]+1}return Ne.forEach(e=>{let[t,n]=e;r=r.replace(t,n)}),s&&(r=a(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:i,dimensionIdx:n,path:r}}(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const r=e.brush.ranges();r.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const r=e.brush.ranges();r.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),r.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const r=e.brush.ranges();r.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),r.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(n)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){const n=r.qHyperCube,o=n.qNoOfLeftDims,s=n.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const r=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?r.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):r.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const r=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!r.length,o.push({params:[t.path,t.dimensionIdx,r,!1],method:"selectHyperCubeValues"})}}}),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function Ve(e){ke.util=e.data("matrix").util,e.data("q",ke),e.formatter("q-number",de),e.formatter("q-time",Ae)}return Ve.qBrushHelper=He,Ve.selections=He,Ve}());Pt(Zr);const Qr=/xyz/.test(()=>{})?/\b_super\b/:/.*/,en=function(){};en.extend=function e(t,r){const n=this.prototype;"string"!=typeof t&&(r=t,t="Class");const i=Object.create(this.prototype);for(const e in r)i[e]="function"==typeof r[e]&&"function"==typeof n[e]&&Qr.test(r[e])?function(e,t){return function(){const r=this._super;this._super=n[e];const i=t.apply(this,arguments);return this._super=r,i}}(e,r[e]):r[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const tn={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function rn(){return tn.id()}const nn="scrollbar";function on(e,t,r){return"y"===e?an(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function an(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var sn={getAxisDock:on,getOppositeAxisDock:function(e,t,r){return on(e,"far"===t?"near":"far",r)},getYAxisDock:an};const ln=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),un=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),cn=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function pn(e){return ln.test(e)}function dn(e){return un.test(e)||cn.test(e)}var fn={lrm:String.fromCharCode(8206),detectTextDirection:function(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],pn(n))return"ltr";if(dn(n))return"rtl"}return"ltr"}};var mn={lineSettings:function(e,t){var r;const n={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(r=t.style)||void 0===r?void 0:r.lineType}};return q(!0,n,e||{})},lineLabelSettings:function(e,t){const r=t&&t.chartID;let n=t.theme.getStyle(r,"referenceLine.label.name","color");const i=t.theme.getStyle(r,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(r,"referenceLine.label.name","fontFamily");return t.paletteColor?n=t.theme.getColorPickerColor(t.paletteColor):n||(n="transparent"),q(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:r}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${fn.lrm}(${r})${fn.lrm}`:`${fn.lrm}(${r})${fn.lrm}`:!1!==e.showLabel?t:""}};const hn={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};hn.DEFAULT_CHART_ORIENTATION=hn.HORIZONTAL;function gn(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||hn.DEFAULT_CHART_ORIENTATION,a=o===hn.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=hn.SHOW_AXIS_LABELS_OPTIONS,c=hn.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),f=r.includeDimensionAxis&&u.includes(i.show),m=r.includeDimensionAxis&&!!r.dimensionTitleText&&c.includes(i.show),h=r.gridlines&&!(!r.gridlines.auto&&0===r.gridlines.spacing),g=r.refLines&&r.refLines.some(e=>e.show),y=[];if(p&&function(e,t,r,n){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:n&&!n.autoMinMax&&n.showBounds};i=q(i,hn.LAYOUTSETTINGS.measureAxis);const o=bn(t,r);e.addComponent(`${r}-axis`,i,o)}(e,r,s,n),d&&function(e,t,r){let n={text:t.measureTitleText,style:t.axisTitleStyle||{}};n=q(n,hn.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return bn(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,s),function(e,t,r,n){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=q(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),f&&function(e,t,r){let n={scale:"dimension",settings:t.axisLabelStyle||{}};n=q(n,hn.LAYOUTSETTINGS.dimensionAxis);const i=vn(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent(`${r}-axis`,n,i)}(e,r,l),m&&function(e,t,r){let n={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};n=q(n,hn.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return vn(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){const n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===hn.HORIZONTAL?hn.VERTICAL:hn.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){let n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};n=q(n,hn.LAYOUTSETTINGS.gridLines),n[r]={scale:"measure"},e.addComponent("grid-line",n)}(e,r.gridlines,s),r.hasNavigation&&function(e,t,r,n){const i=e.getSettings();i.scroll={dimension:{viewSize:r.scrollSettings&&r.scrollSettings.viewSize||0,max:r.scrollSettings&&r.scrollSettings.max||0}};const o={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},a=q({},hn.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),yn(t,function(e){function t(t,r){if(!r||!e())return!1;const n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some(e=>e.settings.key===nn)}const r={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(nn).emit("tap",e)}}},n={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(nn).emit("panStart",e)},pan(e){this.chart.component(nn).emit("panMove",e)},panend(e){this.chart.component(nn).emit("panEnd",e)},pancancel(e){this.chart.component(nn).emit("panCancel",e)}}};return[r,n]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=sn.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,hn.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${rn()}`,require:["renderer","chart"],dock:sn.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize(){if("x"===r)return 26;const t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map(e=>{const r=!1!==e.label.showValue?`(${n(e.value)})`:"",i=`${e.label.text} ${r}`,o=e.label.text&&r?` ${r}`:r;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}}),o=i[0];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=q(a,hn.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach(n=>{if(!n.show)return;const s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=mn.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=mn.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"x"===r?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[r].push(c)}),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,r,s,n),r.enableLasso&&r.selectionsEnabled){!function(e,t){const r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",hn.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{})}if(r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeDim"};o=q(o,hn.LAYOUTSETTINGS.rangeDim);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.dimRange||{},a,vn(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,hn.LAYOUTSETTINGS.rangeMeasure);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.measureRange||{},a,bn(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,hn.LAYOUTSETTINGS.rangeMinor);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?r:!r,dock:n,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,r.areaRange||{},a,vn(r,l).dock,r.isRtl)}r.brushActions&&yn(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function yn(e,t){t.forEach(t=>{e.push(t)})}function bn(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function vn(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function xn(e,t){const r=t||{},n=!r.orientation||"horizontal"===r.orientation,i=!!r.isRtl,o={name:r.name||"scale",component:{invert:n&&i,minorTicks:{count:1},range:r.range||void 0,domain:r.domain||void 0,trackBy:r.trackBy||"id"}};return q(!0,{},o,e||{})}function qn(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Dn(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.line.major","color"),s=t.theme.getStyle(r,"axis.title","fontSize"),l=t.theme.getStyle(r,"axis.title","color"),u=t.theme.getStyle(r,"axis.label.name","color"),c=t.theme.getStyle(r,"axis.label.name","fontSize"),p=t.theme.getStyle(r,"axis.title","fontFamily"),d=t.theme.getStyle(r,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",renderer:qn(t.flags),dock:sn.getAxisDock(i,n,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},m=q(!0,{},f,e||{});return m.brush.consume.forEach(e=>{e.style.active.strokeWidth=0}),m}function Sn(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.title","fontSize"),s=t.theme.getStyle(r,"axis.title","color"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:sn.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}xn.measureScale=function(e,t){let r=(t||{}).source||[];"string"==typeof r&&(r=[r]);const n={name:"measure",component:{expand:.1,data:{fields:r.map(e=>({field:e}))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(n.component.min=i.min),["max","minMax"].includes(i.minMax)&&(n.component.max=i.max));const o=xn(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},xn.dimensionScale=function(e,t){const r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return xn(q(!0,r,e||{}),t)},Dn.xAxis=function(e,t){return Dn(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},Dn.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:sn.getYAxisDock(r,n)};return Dn(q(!0,i,e||{}),t)},Sn.xAxisTitle=function(e,t){return Sn(q(!0,{key:"x-axis-title"},e||{}),t)},Sn.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:sn.getYAxisDock(r,n)||"left"};return Sn(q(!0,i,e||{}),t)};var Mn={getBublesAlign:function(e,t,r){let n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){const r=[];let n;return e&&r.push(`@${e}`),t&&r.push(`@${t}`),r.length&&(n=r.join(",")),n}};const wn={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function An(){return wn}function En(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}An.getLayoutModeKeys=function(){const e=[];let t;for(t in wn)e.push(t);return e};const Cn={left:"left",right:"right",up:"top",down:"bottom"};function kn(e,t,r){switch(e){case"scale":return xn(t,r);case"measure-scale":return xn.measureScale(t,r);case"dimension-scale":return xn.dimensionScale(t,r);case"axis":return Dn(t,r);case"box-marker":return function(e){return q(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return q(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const r=t&&t.isRtl,n=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":r?"left":"right",settings:{backgroundColor:t.theme.getStyle(n,"","backgroundColor"),invert:r&&i}};return q(!0,{},o,e||{})}(t,r);case"text":return Sn(t,r);case"lasso":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return n.forEach(e=>{o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})}),q(!0,{},o,e||{})}(t,r);case"range":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:Mn.getDock(n,i),settings:{brush:r,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Mn.getBublesAlign(a,s,l)}}};return q(!0,{},u,e||{})}(t,r);case"range-area":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Mn.getDock(n,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Mn.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach(e=>{d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})}),q(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");const a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.title","fontFamily"),p=t.theme.getStyle(r,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:qn(t.flags),dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:n?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${Cn[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return q(!0,{},d,e)}(t,r);case"sequential-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");const o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(n?"right":"left"),major:{invert:"left"===i||"right"===i||n},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return Dn.xAxis(t,r);case"y-axis":return Dn.yAxis(t,r);case"x-axis-title":return Sn.xAxisTitle(t,r);case"y-axis-title":return Sn.yAxisTitle(t,r);case"grid-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return q(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:n},minorTicks:{stroke:n}},e||{})}(t,r);case"interaction":return function(e,t){const r=t&&t.gestures||[];return q(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return q(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:n},padding:{x:7,y:5}}}},e||{})}(t,r);case"event-area":return function(e){return q(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"label.value","color"),i=t.theme.getStyle(r,"label.value","fontSize"),o=t.theme.getStyle(r,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:qn(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:n,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:En}]}}}]}};return q(!0,{},a,e||{})}(t,r);default:return}}function Nn(e){this.options=e||{},this.settings={dockLayout:{layoutModes:An()},components:[],scales:{}}}Nn.prototype.addComponent=function(e,t,r){const n=kn(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},Nn.prototype.addInteraction=function(e,t){const r=kn("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},Nn.prototype.addScale=function(e,t,r){const n=kn(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},Nn.prototype.getSettings=function(){return this.settings},Nn.prototype.getComponent=function(e){return this.settings.components.filter(t=>t.key===e)[0]},Nn.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");gn(t,r)}(e,this,t)},Nn.validateComponentKeys=function(e){const t={};return e.map(e=>{const r=e.key;return r?t[r]?`Duplicate key for component ${e.type}`:(t[r]=!0,null):`Missing key for component ${e.type}`}).filter(e=>!!e)},Nn.create=function(e){return new Nn(e)},Nn.createComponent=kn;const In={CENTER:0,BOTTOM:1};var On={DISCLAIMERS:[{label:"NoDataExist",alignment:In.CENTER,default:!0},{label:"RequireNumericDimension",alignment:In.CENTER,default:!1},{label:"OnlyNanData",alignment:In.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:In.CENTER,default:!1},{label:"LimitedData",alignment:In.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:In.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:In.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:In.BOTTOM,default:!1}],ALIGNMENT:In};const Tn={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx===0,getLimitedDataAttribute(e,t){let r,n=!1;var i;return e?void 0!==t.explicitLimitedData?n=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?n=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,n=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some(e=>e.qDown>0):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):n=!0===t.explicitLimitedData,n},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some(e=>e.qMin<=0),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every(e=>e.qMax<=0&&e.qMax>=e.qMin)||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every(e=>e.qMax<e.qMin||"NaN"===e.qMax),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const r=t.length;let n,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=0;n<r;n++)if(a=Math.min(a,t[n].qMin),s=Math.max(s,t[n].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,On.DISCLAIMERS.forEach(e=>{n[e.label]=!1}),t&&t.qHyperCube?(n.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),n.NoDataExist?n:(n.RequireNumericDimension=r.explicitRequireNumericDimension,n.RequireNumericDimension||(n.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,r),n.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,r),n.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,r)),n)):n}};function Ln(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function Rn(e,t){return e&&t&&t[e]}function Fn(e){this.environment=e,this.clear()}Ln.prototype.isValidAndSupported=function(e,t){return Rn(e.label,this.dataAttributes)&&(e.default||Rn(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Ln.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach(n=>{r.isValidAndSupported(n,e)&&(t=!0)}),t},Ln.prototype.getMessage=function(e,t){let r="";const n=this;return t&&this.disclaimersConfig.forEach(i=>{n.isValidAndSupported(i,e)&&(r+=`${t.get(`Object.Disclaimer.${i.label}`)} `)}),r},Fn.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},Fn._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach(e=>{void 0===r[e.label]&&(r[e.label]=e.default)}),r},Fn.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,r=q(!0,{},this.vizAttributes.supportedDisclaimers),n=new Ln(On.DISCLAIMERS,this.dataAttributes,r);let i,o;if(n.isAnyValidDisclaimer(On.ALIGNMENT.CENTER))i=n.getMessage(On.ALIGNMENT.CENTER,t),o="center";else{if(!n.isAnyValidDisclaimer(On.ALIGNMENT.BOTTOM))return;i=n.getMessage(On.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:i,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},Fn.prototype.set=function(e){if(this.clear(),!e)throw new Error(Fn.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=Tn.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},Fn.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const Pn=en.extend({init(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new Fn(r),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[Nn.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,r)=>function(e,t,r){let n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){const e=r.width||t.qSize.qcx,n=Math.floor(1e4/e);i={qTop:r.top||0,qLeft:r.left||0,qWidth:e,qHeight:r.height?Math.min(r.height,n):n}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};n="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then(e=>{t[n]=e})}(e,t,r),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),r="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),n=this.createChartSettings(this.layout);r?n.components=[t]:t&&n.components.push(t),Nn.validateComponentKeys(n.components).forEach(e=>{console.error(e)}),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:r}=this.environment.options;!r&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=q(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,r){var n,i;const o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map(t=>({type:"q",key:t,config:{localeInfo:o},data:Yr(e,t.replace(/\//g,"."))}));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),_n={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Hn=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,Vn=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,jn=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,zn=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,$n=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,Bn=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Un=Math.floor,Wn=Math.round,Kn=en.extend({init(){let e,t,r,n,i,o,a,s,l,u,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof Kn)d=arguments[0]._r,f=arguments[0]._g,m=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),f=parseInt(c[2],16),m=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),f=parseInt(c[2]+c[2],16),m=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Wn(255*d),f=Wn(255*f),m=Wn(255*m),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),h=parseFloat(c[7]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Wn(255*d),f=Wn(255*f),m=Wn(255*m)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Wn(255*d),f=Wn(255*f),m=Wn(255*m),h=1}else _n[p.toLowerCase()]?(r=p.toLowerCase(),d=_n[r].r,f=_n[r].g,m=_n[r].b,h="number"==typeof _n[r].a?_n[r].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],m=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+m+h)&&(this._invalid=!0),this._r=Un(d),this._g=Un(f),this._b=Un(m),this._a=h,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=Kn.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=Kn.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=Kn.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=Kn.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=Kn.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=Kn.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=Kn.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=Kn.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),n=parseFloat(r[1]),i=parseFloat(r[3]);let o=parseFloat(r[5]);const a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${n},${i},${o},${a})`},isEqual(e){return e instanceof Kn||(e=new Kn(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[Un(this._r+(e._r-this._r)*t),Un(this._g+(e._g-this._g)*t),Un(this._b+(e._b-this._b)*t),Un(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),r=this._g<126?1:1+this._g/512,n=this.shiftLuminance(20*(t*r<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new Kn(n)}});Kn.toRGB=function(e){if(e instanceof Kn)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=Kn.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},Kn.toRGBA=function(e,t){if(e instanceof Kn)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=Kn.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},Kn.toHex=function(e){let t,r,n;return e instanceof Kn?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`):("string"==typeof e&&(e=Kn.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`)},Kn.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Kn(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*r},${100*n})`},Kn.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Kn(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)r=0,o=0;else{switch(i=c-p,r=n>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*r},${100*n},${u})`},Kn.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new Kn(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,n=0;else{switch(r=s-l,t=0===r?0:r/u,s){case i:n=(o-a)/r+(o<a?6:0);break;case o:n=(a-i)/r+2;break;case a:n=(i-o)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*u}},Kn.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof Kn)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(r=parseInt(e[1],16),n=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(r<<16)+(n<<8)+i},Kn.blend=function(e,t,r){const n=(16711680&(e=Kn.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=Kn.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},Kn.getBlend=function(e,t,r){const n=e._r+(t._r-e._r)*r,i=e._g+(t._g-e._g)*r,o=e._b+(t._b-e._b)*r,a=e._a+(t._a-e._a)*r;return new Kn(n,i,o,a)},Kn.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Hn.test(e)||Vn.test(e)||jn.test(e)||zn.test(e)||$n.test(e)||Bn.test(e)||_n[e.toLowerCase()])},Kn.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},Kn.getContrast=function(e,t){if(!e||!t)return;const r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},Kn.isDark=function(){const e={getLuminance:Kn.prototype.getLuminance,isInvalid:Kn.prototype.isInvalid};return Kn.prototype.init.apply(e,[].slice.call(arguments)),Kn.prototype.isDark.call(e)},Kn.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const Gn=".scrollHandler";function Yn(e,t,r,n,i){if(!e||!t||!r)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=r,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=n,this._legendKey=i}function Xn(){const e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function Jn(e){const t=function(e){let t=0,r=0,n=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),n=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(n=0,r=-1*t),void 0!==e.wheelDeltaY&&(n=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(r=-1*e.wheelDeltaX/60),{delta:t,deltaX:r,deltaY:n,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,r,n){if(n&&r.componentsFromPoint(t).some(e=>e.settings.key===n))return r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const r=t.delta<0?3:-3;this._scrollApi.move(r)}function Zn(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then(t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)}).catch(e=>{})}Yn.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},Yn.prototype.setDisabled=function(e){this._disabled=e},Yn.prototype.getDisabled=function(){return this._disabled},Yn.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,Xn.call(this))},Yn.prototype.getItemSize=function(){return this._itemSize},Yn.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Xn.call(this);return this._scrollViewSizeInItem},Yn.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Zn.bind(this)));this._$chartElement.on(`mousewheel${Gn} DOMMouseScroll${Gn}`,Jn.bind(this)),this._$chartElement.on(`touchstart${Gn}`,e=>{e.preventDefault()}),this._on=!0},Yn.prototype.isOn=function(){return this._on},Yn.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(Gn),this._on=!1},Yn.prototype.updateViewState=function(e){Xn.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},Yn.prototype.onResize=function(){this._sizeChanged=!0,Xn.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},Yn.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},Yn.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},Yn.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},Yn.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},Yn.prototype.getScrollState=function(){return this.getScrollApi().getState().start},Yn.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var Qn={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter(e=>-1!==t.indexOf(e.settings.key))[0]},isOnComponentForLasso:function(e,t,r){return e&&r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter(e=>e.settings.key===t.keys.componentKey)[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some(e=>e.settings.key===t)}};var ei={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable(n,i){if(e.lassoing)return t.isSelectionEnabled();const o=Qn.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((a=r.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart(n){Qn.isOnComponentForLasso(n,r,this)&&(t.switchTo("lasso",this.chart,n),e.lassoing=!0,r.handlers.selectionHandler.pauseEngineCalls(r.keys.lassoBrushKey),n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",n))},lassomove(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var ti={callMeasureRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Qn.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];Qn.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.measureRangeBrushKey))},measurerangemove(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function ri(e,t){let r;return r="x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,r}var ni={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:ri(n,r.isHorizontal),event:"arearange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Qn.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];Qn.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.areaBrushKey))},arearangemove(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var ii={callDimensionRangeGesture:function(e,t,r,n){const i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Qn.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];Qn.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.dimRangeBrushKey))},majorrangemove(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var oi={callDragGesture:function(e,t,r,n,i){let o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"drag",enable(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>e.settings.key===r.keys.componentKey)[0],e.dragging)}},requireFailure:n?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let n=-(r.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(n=-n),r.handlers.scrollHandler.getScrollApi().move(n),o={x:t.deltaX,y:t.deltaY}},dragend(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var ai={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&Qn.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach(t=>{const r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)})}}}}};var si={create:function(e,t,r,n,i){const o={};t=t||"vertical";const a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=n.areaBrushKey||null,c=n.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},m="horizontal"===t,h=m?"y-axis":"x-axis",g=m?"x-axis":"y-axis";function y(e,t,r){if(f.gesture===e)return;let n=a;const i=t||f.chart;switch(f.gesture){case"majorrange":b(i,"rangeDim","rangeClear",r),n=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",r),n=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}f.gesture=e;const o="range"===e?"range":"item";f.type&&f.type!==o&&i.brush(n).clear(),f.chart=t,f.type=o}function b(e,t,r,n){if(e){const i=e.component(t);i&&i.emit(r,n)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:n,isHorizontal:m,active:f,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(ai.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(ei.callLassoGesture(d,x,q)),s?l?(v.push(ii.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(ti.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(ii.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(ni.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(ti.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(ni.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(oi.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function li(e,t,r,n,i){let o=!1;n=n||"tooltip",r=r||["self"];const a=e.brush(n),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;const r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},s.toggleInterceptor=function(e){if(r.length>1){const t={},r=[];return e.forEach(e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))}),r}return e},s}var ui={create:(...e)=>li(...e)},ci={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};const pi=e=>({h:t,data:r,style:n})=>{const i=function(e,t){const r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const r=o.data[i[e]].value;if(-2===r.qElemNo||-2===r.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map(t=>{const n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)}).filter(e=>!!e);const l=di(e,o);l&&a.rows.unshift(l),n.push(a)}}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,r),o={h:t,style:n,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function di(e,t){var r,n,i;const o=t.data.color,a=null===(r=e.colorService)||void 0===r||null===(n=r.getSettings)||void 0===n?void 0:n.call(r);if(!a||"color"===a.type||!o||!a.fieldType)return;const s=[];e.data.forEach(e=>{const r=t.data[e];r&&s.push(r.value)});const l=function(e){let t=-1;for(let r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const fi="dist-flow-tooltip",mi=`#${fi}`;function hi(){if(!document.querySelector(mi)){const e=document.createElement("div");e.id=fi,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function gi({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){hi()},beforeUpdate(){hi()},destroyed(){!function(){const e=document.querySelector(mi);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(mi),content:i,filter:n,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:r,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:yi}=fn;const bi={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:ci.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:r,style:n,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach(e=>{if(e.header){const t={...n.cell,textAlign:s,fontWeight:"bold",direction:yi(e.header)};a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach(e=>{let t=e.value;if(e.color){const n={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=r("div",{style:n});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...n.cell,textAlign:s,direction:yi(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:yi(e.value)};a.push(r("tr",null,r("td",{style:l},i),r("td",{style:u},t)))})}),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...n.cell,textAlign:s,direction:yi(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function vi(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");let n={},i=!1;const o={};function a(e){e.listeners.update=function(t,r){e.action.update(t,r,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(n).forEach(e=>{l(n[e])})}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(n).forEach(e=>{n[e].action.closeTooltip()})}function c(){u();for(const e in n)n[e].brush.clear()}return o.setUp=function(t){const o=q(!0,{},bi,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:ui.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);n[o.contexts[0]]=s,i&&a(s);const u=gi({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach(e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)}),t}(e)),content:pi(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map(e=>({context:e})),component:u}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(n).forEach(e=>{a(n[e])}),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var xi={create:(e,t,r)=>vi(e,t,r)};const qi=166/26,Di=12/11;function Si(e){return(12*Math.min(e,3)+Math.max(e-3,0)*qi)/11}function Mi(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}}function wi(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach(e=>{const t=Mi(e.qText);r.latin+=t.latin,r.cjk+=t.cjk}):e.forEach(e=>{const n=Mi(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk});const n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function Ai(e,t,r){return e*(e<=24?t:r)}var Ei={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:Si,getCharacterRatios:Mi,getTotalCharacterRatios:wi,getAdjustedMaxGlyphCount:function(e,t,r){const n=wi(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(Si(i)+o*Di)},estimateLatinLabelWidth:Ai,estimateLabelWidth:function(e,t,r,n,i){return e*r+Ai(t,n,i)}};var Ci={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=kt.getColorForPositiveValue(e,t),a=kt.getColorForNegativeValue(e,t),s=kt.getColorForSubtotal(e,t),l=e=>`${e}`,u=[];let c,p,d=0,f=0,m=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0;for(let e=0;e<i;e++)p=Number.isNaN(+n[0][e].qNum)?0:n[0][e].qNum,r[e].valueType!==kt.valueTypes.SUBTOTAL?(d=f,f+=p*(r[e].valueType===kt.valueTypes.INVERSE?-1:1),c=d<f?o:a,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:c},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}]),r[e].subtotal&&r[e].subtotal.enable&&u.push([{qText:r[e].subtotal.label||"",qElemNumber:b++},{qText:s},{qNum:0},{qNum:f},{qNum:f,qText:l(f)}])):(d=0,f=p,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:s},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}])),m=Math.max(m,d),h=Math.min(h,d),g=Math.max(g,f),y=Math.min(y,f);const v=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,q=e.qDef.isCustomFormatted,D={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:u.length},qMatrix:u}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:m,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q}]}};e.generatedMatrix=u,e.generated=D},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return`qDimensionInfo/${e}`},getGeneratedMeasurePath:function(e){return`qMeasureInfo/${e}`}};function ki(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ni(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ii(e){let t,r,n;function i(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=ki,r=(t,r)=>ki(e(t),r),n=(t,r)=>e(t)-r):(t=e===ki||e===Ni?e:Oi,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){const a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<=0?i=t+1:o=t}while(i<o)}return i}}}function Oi(){return 0}const Ti=Ii(ki).right;Ii(function(e){return null===e?NaN:+e}).center;const Li=Math.sqrt(50),Ri=Math.sqrt(10),Fi=Math.sqrt(2);function Pi(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=Li?10:o>=Ri?5:o>=Fi?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?Pi(e,t,2*r):[s,l,u]}function _i(e,t,r){return Pi(e=+e,t=+t,r=+r)[2]}function Hi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Vi(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ji(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function zi(){}var $i=.7,Bi=1/$i,Ui="\\s*([+-]?\\d+)\\s*",Wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gi=/^#([0-9a-f]{3,8})$/,Yi=new RegExp(`^rgb\\(${Ui},${Ui},${Ui}\\)$`),Xi=new RegExp(`^rgb\\(${Ki},${Ki},${Ki}\\)$`),Ji=new RegExp(`^rgba\\(${Ui},${Ui},${Ui},${Wi}\\)$`),Zi=new RegExp(`^rgba\\(${Ki},${Ki},${Ki},${Wi}\\)$`),Qi=new RegExp(`^hsl\\(${Wi},${Ki},${Ki}\\)$`),eo=new RegExp(`^hsla\\(${Wi},${Ki},${Ki},${Wi}\\)$`),to={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 ro(){return this.rgb().formatHex()}function no(){return this.rgb().formatRgb()}function io(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Gi.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?oo(t):3===r?new lo(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ao(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ao(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=Yi.exec(e))?new lo(t[1],t[2],t[3],1):(t=Xi.exec(e))?new lo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ji.exec(e))?ao(t[1],t[2],t[3],t[4]):(t=Zi.exec(e))?ao(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qi.exec(e))?ho(t[1],t[2]/100,t[3]/100,1):(t=eo.exec(e))?ho(t[1],t[2]/100,t[3]/100,t[4]):to.hasOwnProperty(e)?oo(to[e]):"transparent"===e?new lo(NaN,NaN,NaN,0):null}function oo(e){return new lo(e>>16&255,e>>8&255,255&e,1)}function ao(e,t,r,n){return n<=0&&(e=t=r=NaN),new lo(e,t,r,n)}function so(e,t,r,n){return 1===arguments.length?((i=e)instanceof zi||(i=io(i)),i?new lo((i=i.rgb()).r,i.g,i.b,i.opacity):new lo):new lo(e,t,r,null==n?1:n);var i}function lo(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function uo(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}`}function co(){const e=po(this.opacity);return`${1===e?"rgb(":"rgba("}${fo(this.r)}, ${fo(this.g)}, ${fo(this.b)}${1===e?")":`, ${e})`}`}function po(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mo(e){return((e=fo(e))<16?"0":"")+e.toString(16)}function ho(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new yo(e,t,r,n)}function go(e){if(e instanceof yo)return new yo(e.h,e.s,e.l,e.opacity);if(e instanceof zi||(e=io(e)),!e)return new yo;if(e instanceof yo)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new yo(a,s,l,e.opacity)}function yo(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function bo(e){return(e=(e||0)%360)<0?e+360:e}function vo(e){return Math.max(0,Math.min(1,e||0))}function xo(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Vi(zi,io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ro,formatHex:ro,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return go(this).formatHsl()},formatRgb:no,toString:no}),Vi(lo,so,ji(zi,{brighter(e){return e=null==e?Bi:Math.pow(Bi,e),new lo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?$i:Math.pow($i,e),new lo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lo(fo(this.r),fo(this.g),fo(this.b),po(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:uo,formatHex:uo,formatHex8:function(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}${mo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:co,toString:co})),Vi(yo,function(e,t,r,n){return 1===arguments.length?go(e):new yo(e,t,r,null==n?1:n)},ji(zi,{brighter(e){return e=null==e?Bi:Math.pow(Bi,e),new yo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?$i:Math.pow($i,e),new yo(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new lo(xo(e>=240?e-240:e+120,i,n),xo(e,i,n),xo(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new yo(bo(this.h),vo(this.s),vo(this.l),po(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=po(this.opacity);return`${1===e?"hsl(":"hsla("}${bo(this.h)}, ${100*vo(this.s)}%, ${100*vo(this.l)}%${1===e?")":`, ${e})`}`}}));var qo=e=>()=>e;function Do(e){return 1===(e=+e)?So:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):qo(isNaN(t)?r:t)}}function So(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):qo(isNaN(e)?t:e)}var Mo=function e(t){var r=Do(t);function n(e,t){var n=r((e=so(e)).r,(t=so(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=So(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function wo(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function Ao(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=To(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function Eo(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Co(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ko(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=To(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var No=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Io=new RegExp(No.source,"g");function Oo(e,t){var r,n,i,o=No.lastIndex=Io.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=No.exec(e))&&(n=Io.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Co(r,n)})),o=Io.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 r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function To(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?qo(t):("number"===i?Co:"string"===i?(r=io(t))?(t=r,Mo):Oo:t instanceof io?Mo:t instanceof Date?Eo:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?Ao:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ko:Co:wo))(e,t)}function Lo(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Ro(e){return+e}var Fo=[0,1];function Po(e){return e}function _o(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function Ho(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=_o(i,n),o=r(a,o)):(n=_o(n,i),o=r(o,a)),function(e){return o(n(e))}}function Vo(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=_o(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=Ti(e,t,1,n)-1;return o[r](i[r](t))}}function jo(){var e,t,r,n,i,o,a=Fo,s=Fo,l=To,u=Po;function c(){var e,t,r,l=Math.min(a.length,s.length);return u!==Po&&(e=a[0],t=a[l-1],e>t&&(r=e,e=t,t=r),u=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?Vo:Ho,i=o=null,p}function p(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),Co)))(r)))},p.domain=function(e){return arguments.length?(a=Array.from(e,Ro),c()):a.slice()},p.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},p.rangeRound=function(e){return s=Array.from(e),l=Lo,c()},p.clamp=function(e){return arguments.length?(u=!!e||Po,c()):u!==Po},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}function zo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $o(e){return(e=zo(Math.abs(e)))?e[1]:NaN}var Bo,Uo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wo(e){if(!(t=Uo.exec(e)))throw new Error("invalid format: "+e);var t;return new Ko({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 Ko(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 Go(e,t){var r=zo(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}Wo.prototype=Ko.prototype,Ko.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 Yo={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Go(100*e,t),r:Go,s:function(e,t){var r=zo(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Bo=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+zo(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xo(e){return e}var Jo,Zo,Qo,ea=Array.prototype.map,ta=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ra(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?Xo:(t=ea.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Xo:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(ea.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=Wo(e)).fill,r=e.align,p=e.sign,d=e.symbol,f=e.zero,m=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):Yo[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===r)&&(f=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=Yo[b],D=/[defgprs%]/.test(b);function S(e){var i,o,l,d=v,S=x;if("c"===b)S=q(e)+S,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0===+e&&"+"!==p&&(M=!1),d=(M?"("===p?p:u:"-"===p||"("===p?"":p)+d,S=("s"===b?ta[8+Bo/3]:"")+S+(M&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}h&&!f&&(e=n(e,1/0));var w=d.length+e.length+S.length,A=w<m?new Array(m-w+1).join(t):"";switch(h&&f&&(e=n(A+e,A.length?m-S.length:1/0),A=""),r){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,w=A.length>>1)+d+e+S+A.slice(w);break;default:e=A+d+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:p,formatPrefix:function(e,t){var r=p(((e=Wo(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor($o(t)/3))),i=Math.pow(10,-n),o=ta[8+n/3];return function(e){return r(i*e)+o}}}}function na(e,t,r,n){var i,o=function(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?_i(t,e,r):_i(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}(e,t,r);switch((n=Wo(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($o(t)/3)))-$o(Math.abs(e)))}(o,a))||(n.precision=i),Qo(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$o(t)-$o(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-$o(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Zo(n)}function ia(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){if(!((r=+r)>0))return[];if((e=+e)===(t=+t))return[e];const n=t<e,[i,o,a]=n?Pi(t,e,r):Pi(e,t,r);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return na(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=_i(l,u,r))===n)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}n=i}return e},e}function oa(){var e=jo()(Po,Po);return e.copy=function(){return t=e,oa().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Hi.apply(e,arguments),ia(e)}Jo=ra({thousands:",",grouping:[3],currency:["$",""]}),Zo=Jo.format,Qo=Jo.formatPrefix;const aa={getMinorTicks({majorTicks:e,minorTickCount:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r},adjustTicks({ticks:e,majorTicks:t,minorTicks:r,autoMinMax:n,minMax:i,min:o,max:a}){const s=r[0]-t[0],l=t[0]-o;l>s&&e.unshift({value:t[0]-s,isMinor:!0});const u=a-t[t.length-1];return u>s&&e.push({value:t[t.length-1]+s,isMinor:!0}),n||(("min"===i||"minMax"===i)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===i||"minMax"===i)&&u>0&&e.push({value:a,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:r,minMax:n,spacing:i}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map(e=>e.qMin)),a=Math.max(...e.generated.qHyperCube.qMeasureInfo.map(e=>e.qMax));if(!r)switch(n){case"min":o=e.measureAxis.min;break;case"max":a=e.measureAxis.max;break;case"minMax":({min:o,max:a}=e.measureAxis)}const s=100*i,l=Math.max(1,Math.round(t/s)),u=oa().domain([o,a]).ticks(l),c=aa.getMinorTicks({majorTicks:u,minorTickCount:1}),p=[...u.map(e=>({value:e,isMinor:!1})),...c.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value);return aa.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},sa=kt.chartID;function la(e){this._scrollHandler.setDisabled(!!e)}function ua(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach(e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==kt.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))}),Math.min(20,Math.max(0,t))}function ca(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Ei.stringWidthOverMWidth(ua(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function pa(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return ci.formatMeasureValue(r,t)}function da(e,t){const r=e.getStyles(),n=((e,t,r)=>{var n,i,o,a;const s=null===(n=wt("value",r))||void 0===n?void 0:n.label,l=(null==s||null===(i=s.value)||void 0===i?void 0:i.fontFamily)||t.label.value.fontFamily;let u=(null==s||null===(o=s.value)||void 0===o?void 0:o.fontSize)||t.label.value.fontSize;return u=parseFloat(u),{fontFamily:l,fontSize:u,fill:null==s||null===(a=s.value)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color}})(0,r,t),i=(null==n?void 0:n.fill)||r.label.value.color,o=r.label.value.darkColor,a=r.label.value.lightColor;return{settings:{sources:[{strategy:{settings:{...n,direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:i},{fill:null!=n&&n.fill?i:e=>Kn.isDark(e.node.attrs.fill)?a:o},{position:"opposite",fill:i,justify:0}],label:pa}]}}}]}}}function fa(e,t){return{viewSize:t,max:e.generatedMatrix.length}}function ma(e,t,r){const{theme:n,translator:i}=e,o=kt.getColorForPositiveValue(t,n),a=kt.getColorForNegativeValue(t,n),s=kt.getColorForSubtotal(t,n),l=i.get("waterfall.legend.positiveValue.label"),u=i.get("waterfall.legend.negativeValue.label"),c=i.get("waterfall.legend.subtotal.label"),p=((e,t,r,n)=>{var i,o,a,s;const l=n.isEnabled("CLIENT_IM_3051")?null===(i=wt("legend",r))||void 0===i?void 0:i.legend:{};return{fontFamily:(null==l||null===(o=l.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==l||null===(a=l.label)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==l||null===(s=l.label)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"legend.label","color")}})(sa,n,t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[l,u,c],range:[o,a,s]},style:{item:{label:{fontSize:p.fontSize,fontFamily:p.fontFamily,fill:p.color}},title:{show:!1}}}}const ha=Pn.extend("WaterfallChart",{namespace:".waterfallchart",chartID:sa,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=xi.create(this.chartInstance,r,sa),this._scrollHandler=new Yn(this.chartInstance,r,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"]),this.flags=n},updateConstraints:function(e){const t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:r}=this.environment,n=!!e.snapshotData,i=Nn.create({chartID:sa,theme:r,isRtl:t,flags:this.flags}),o=this.picassoElement.clientWidth,a=this.picassoElement.clientHeight,s={};s.box=this._tooltipHandler.setUp({chartBuilder:i,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,r){const n=r.boxColor.value;return{value:ci.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=si.create(l,"vertical",t,{componentKey:"box-marker"}),i.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:r,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:ca.call(this,e),dimensionSource:Ci.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[Ci.getGeneratedMeasurePath(0),Ci.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>aa.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:fa(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:At(sa,r,e)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:Ci.getGeneratedDimensionPath(0),props:{start:{field:Ci.getGeneratedMeasurePath(0)},end:{field:Ci.getGeneratedMeasurePath(1)},measure:{field:Ci.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:Ci.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:r,consume:n}}}(s,e)),i.addComponent("point-marker",function(e,t){const r=t.getStyle(sa,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:Ci.getGeneratedDimensionPath(0),props:{x:{},y:{field:Ci.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,r)),e.legend&&!e.legend.show||i.addComponent("categorical-legend",ma(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a});const u=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,i=n.id,o=n.resolve,a=void 0===o?[]:o,s=n.transform,l=void 0===s?[]:s,u=n.extend,c=void 0===u?[]:u,p={theme:t,matrix:Dt(a),styles:void 0};return p.styles=Mt({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=Mt({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:r,config:{id:"waterfallChart"}});e.dataPoint.showLabels&&i.addComponent("labels",da(u,e));const c=i.getSettings();return this.addSnapshotChartSettings(c,e),c},updateData:function(e){const{theme:t,options:r}=this.environment,n=this;return this._super(e).then(()=>{if(n._destroyed)return Promise.reject();let i,o;if(!!e.snapshotData){const e=n.layout.generated.qHyperCube.qDataPages[0].qArea;i=e.qTop,o=e.qHeight,Ci.generateHyperCube(n.layout,t)}else{Ci.generateHyperCube(n.layout,t),la.call(n,!0);const{viewState:e}=r;e?(n._scrollHandler.updateViewState(n.layout.generatedMatrix.length),n._scrollHandler.setScrollState(e.scroll),i=e.scroll):(n._scrollHandler.resetScroll(),i=0),o=n._scrollHandler.getScrollViewSizeInItem()}Ci.generateSlicedHyperCube(n.layout,i,o)})},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||la.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally(()=>e.call(t))}return this._super()},getSlicedData:function(e,t){return Ci.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function ga(q){return function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(D).forEach(t=>{e.add(D[t])})}}(q.translator),{qae:L(q),ext:Lt(q),component(){const D=d(),w=function(){const e=i(),r=o(),n=a(),c=t(),p=s(),d=l();return u(()=>({app:e,appLayout:r,deviceType:n,options:c,theme:p,translator:d}),[e,r,c.direction,c.freeResize,d.language(),p.name(),n])}(),A=w.options.renderer,E=u(()=>function(e){const t=y();return t.renderer.prio([e||"canvas"]),t.use(b),t.use(v(x)),t.use(S),t.component("disclaimer",M),t}(A),[A]),C=f(),k=r(),[N,I]=m();var O;h(()=>{const e=g(D),t=new ha({picasso:E,environment:w,$element:e,flags:q.flags});return I(t),()=>{t.destroy()}},[]),function(...e){const[,t]=n(...e);if(t)throw t}(async()=>{N&&(N.updateEnvironment(w),N.updateConstraints(k),await N.updateData(C),await N.paint())},[C,N,w]),function(i){const o=e(),a=t(),s=r(),[,l]=n(async()=>{i&&(i.updateConstraints(s),i.options=a,await i.resize())},[o.width,o.height]);if(l)throw l}(N),O=N,c(e=>{if(O)return O.setSnapshotData(e)}),p(()=>({getViewState(){if(O)return O.getViewState()}}),[O])}}}export{ga as default};
10
10
  //# sourceMappingURL=index.js.map